【发布时间】:2013-02-13 05:39:41
【问题描述】:
$data=$stmt->fetchAll(); //Dumping the data shows the result. It is also setting the cursor at the end
while($data=$stmt->fetch())
{
//Does not enters loop
//If fetchAll() removes it work as usual
}
我知道它不需要两次获取数据。但我的主要问题是如何重置 PDO 中的光标位置?
【问题讨论】:
-
如果不需要两次取数据,那为什么还要重置光标位置呢?
-
@YourCommonSense 你肯定错过了我的意思。我想知道如何在 PDO 中重置光标。 Downvote 完全没有道理。