如何将mysql指针重置回PHP中的第一行? [英] How to reset mysql pointer back to the first row in PHP?
本文介绍了如何将mysql指针重置回PHP中的第一行?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
while($row = mysql_fetch_array($result)){ echo $row['id'];}
如果我连续两次使用上面的代码,则该行不会被打印两次.
If I use the above code two times consecutively, the row does not get printed twice.
如何重置它?
推荐答案
use mysql_data_seek. This function will allow you to move the internal result pointer.
这篇关于如何将mysql指针重置回PHP中的第一行?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文