当前位置: 代码迷 >> PHP >> mysql_fetch_array(): supplied argument is not a valid MySQL result resource,该怎么解决
  详细解决方案

mysql_fetch_array(): supplied argument is not a valid MySQL result resource,该怎么解决

热度:936   发布时间:2012-02-19 19:43:38.0
mysql_fetch_array(): supplied argument is not a valid MySQL result resource
mysql_connect("localhost","root","1"); 
$query="select id from computer where user ='test2'";
$result=mysql_query($query);

echo "test2 使用了<br>";
while($row = mysql_fetch_array($result))
{
echo $row['id']."开始时间".$row[starttime]."<br>";
}
  Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in D:\myapacheweb\test\self_info.php on line 7


------解决方案--------------------
没有选择数据库
mysql_select_db(表名)
------解决方案--------------------
mysql_select_db
  相关解决方案