什么是 PDO 可滚动游标?

2021-12-26 00:00:00 php mysql pdo

什么是使用可滚动游标获取行"?

What is "Fetching rows with a scrollable cursor" all about?

推荐答案

它创建了一个 cursor 用于查询,它允许您迭代结果集而无需立即获取整个结果.可滚动游标,特别是允许向后迭代的游标.

It creates a cursor for the query, which allows you to iterate over the result set without fetching the whole result at once. A scrollable cursor, specifically, is one that allows iterating backwards.

使用示例:您可以向前滚动,直到找到您需要的记录,如果您也需要,则可以返回以获取先前的记录.

Example use: You can scroll forward until you find the record you need and iterate back to fetch the previous records, if you need them, too.

相关文章