while($ row = mysql_fetch_array($ query))在第二次不起作用
问题描述:
我有:
$query = mysql_query("SELECT ... ");
while($row = mysql_fetch_array($query)) { first time used; }
...
while($row = mysql_fetch_array($query)) { second time used; }
第二次不起作用.为什么?
In second time it doesn't work. Why?
答
这是因为内部数据指针已到达末尾.要重新读取查询,请使用mysql_data_seek()
倒退指针,或重新发出查询.
That's because the internal data pointer has reached its end. To reread the query, either rewind the pointer with mysql_data_seek()
, or reissue the query.