求救:mysql_fetch_row(): supplied argument is not a valid MySQL result resource
function db_connect()
{
$result = new mysqli('localhost', 'root', '654321', 'smsprj');
//$result = new mysqli('localhost', 'root', '654321');
if (!$result)
{
throw new Exception('Could not connect to database server');
}
else
{
return $result;
}
}
?>
$conn = db_connect();
$sql = $conn->query("SELECT * FROM user");
if (!$sql)
{
echo ("wrong");
}
else
{
echo "
userid | name | pssword | maxsmscount | maxuseday | leftday | leftsmscount |
$row[0] | $row[1] | $row[2] | $row[3] | $row[4] | $row[5] | $row[6] |
上一篇: Warning: mysql_free_result(): supplied argument is not a valid MySQL result
下一篇: 总是出现mysql_fetch_array(): supplied argument is not a valid MySQL result resource
推荐阅读
-
php错误提示: mysql_fetch_row(): supplied argument is not a valid MySQL
-
mysql_fetch_row(): supplied argument is not a valid MySQL result resource,何人能解?该如何解决
-
mysql_fetch_array(): supplied argument is not a valid MySQL result resource,该如何处理
-
mysql_fetch_array(): supplied argument is not a valid MySQL result resource....
-
mysql_fetch_array(): supplied argument is not a valid MySQL result resource....
-
Warning: mysql_fetch_object(): supplied argument is not a valid MySQL result res,该怎么解决
-
php出现Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result解决办法
-
mysql_fetch_array(): supplied argument is not a valid MySQL result resource,该怎么解决
-
mysql_fetch_array(): supplied argument is not a valid MySQL result resource
-
Warning: mysql_fetch_row(): supplied argument is not a valid MySQL result resour,该怎么解决
网友评论
文明上网理性发言,请遵守 新闻评论服务协议
我要评论