日期:2014-05-17  浏览次数:20483 次

while mysql_fetch_array问题

刚学PHP,有点疑问
正常取出记录循环用while
while($num_rows=mysql_fetch_object($result)){
  输入字段内容等。。
}

就是上面的while后面的条件语句不是很明白。正常的while 后面肯定是跟一条件的表达式,如($i <= 10)。而上面为什么直接赋值了。并且结果也正常循环了。
不是很明白。有谁指点下。。。

同样的语句还是mysql_fetch_array等。在线等

------解决方案--------------------
其实就相当于 while(NULL != ($num_rows=mysql_fetch_object($result)))
------解决方案--------------------
Returns an object with properties that correspond to the fetched row and moves the internal data pointer ahead. 

or FALSE if there are no more rows.