Home  >  Article  >  Backend Development  >  php mysql_fetch_object 返回错误?

php mysql_fetch_object 返回错误?

WBOY
WBOYOriginal
2016-06-06 20:11:261612browse

<code>while($res = mysql_fetch_object($getRes))
</code>

执行的时候,只有第一条记录是正确处理,然后就跳出循环了。
但我用mysql_fetch_array,和mysql_num_rows 明明是可以得到多条数据,这是什么原因?

回复内容:

<code>while($res = mysql_fetch_object($getRes))
</code>

执行的时候,只有第一条记录是正确处理,然后就跳出循环了。
但我用mysql_fetch_array,和mysql_num_rows 明明是可以得到多条数据,这是什么原因?

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn