Jump to content

[SOLVED] mysqli_fetch_array() expects parameter 1 to be mysqli_result


jakebur01

Recommended Posts

I am getting this error: PHP Warning: mysqli_fetch_array() expects parameter 1 to be mysqli_result

 

 

 @ $db = mysqli_connect('localhost', '0', '0', '0');

if (mysqli_connect_errno())
{
	echo 'Error: Could not connect to database. Please try again later.';
exit;
}
$result=mysqli_query($db, "select catname  ".

"from itemclass ". 
"where catid = $catid");

  while ($myrow=mysqli_fetch_array($result)) {


echo$myrow["catname"];  
   
   }

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.