开发者

mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in php [duplicate]

开发者 https://www.devze.com 2022-12-13 05:19 出处:网络
This question already has answers here: 开发者_JS百科Closed 10 years ago. Possible Duplicate: Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result
This question already has answers here: 开发者_JS百科 Closed 10 years ago.

Possible Duplicate:

Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result

$query  = "SELECT UniqueID FROM configuration";
$result = mysql_query($query)or die(mysql_error());;

while($row = mysql_fetch_assoc($result)) { }

throwing exception as

Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in C:\Program Files\Apache Group\Apache2\htdocs\ehp\hello.php on line 10


That's slightly confusing, since this sort of thing is usually caused by an SQL error, however the line ..or die(mysql_error()); should have picked that up. Check the contents of your loop that you're not overwriting the $result variable.

0

精彩评论

暂无评论...
验证码 换一张
取 消