Home > Backend Development > PHP Tutorial > mysql_fetch_array警告的问题

mysql_fetch_array警告的问题

WBOY
Release: 2016-06-23 14:16:24
Original
783 people have browsed it

MySQL PHP

while($rows = mysql_fetch_array($request))
Copy after login

为什么每次写这个都给警告?
while(($rows = mysql_fetch_array($request))!=false)
Copy after login

这样写就好了,有什么区别呢

回复讨论(解决方案)

你说的这个警告应该是在IDE环境下提醒的吧,IDE认为这是一种意外赋值,其实是没有问题的

$rows = mysql_fetch_array($request)
返回值是array
($rows = mysql_fetch_array($request))!=false
返回值是bool

告警是正常的吧

警告是什么??

while(($rows = mysql_fetch_array($request)))

source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template