![php中将指针移动到数据集初始位置的实现代码[mysql_data_seek] php中将指针移动到数据集初始位置的实现代码[mysql_data_seek]](https://www.52bi.cn/wp-content/uploads/2026/01/bd50f-202312092057417956.jpg)
// Start snipit 1
$sql = “SELECT * from
“;
$result = mysql_query($sql);
while ($row = mysql_fetch_assoc($result)) {
// do stuff with $row
}
mysql_data_seek($result, 0); //关键是这儿
while ($row = mysql_fetch_assoc($result)) {
// do other stuff with $row
}
?
© 版权声明
文章版权归作者所有,未经允许请勿转载。
相关文章
暂无评论...