这样的错误有谁见过,在网上也找不到,还有类似
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in E:\web\common\mysql.class.php on line 126
我在服务器上运行的程序就可以,我下到自己电脑上就老是有这个警告,我屏蔽就没数据读出来了。是不是我的环境的问题。
谢谢大家 了。
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in E:\web\common\mysql.class.php on line 126
我在服务器上运行的程序就可以,我下到自己电脑上就老是有这个警告,我屏蔽就没数据读出来了。是不是我的环境的问题。
谢谢大家 了。
mysql_connect("localhost", "mysql_user", "mysql_password") or
die("Could not connect: " . mysql_error());
mysql_select_db("mydb"); $result = mysql_query("SELECT id, name FROM mytable"); while ($row = mysql_fetch_array($result,)) {
printf ("ID: %s Name: %s", $row["id"], $row["name"]);
} mysql_free_result($result);