Jump to content

mysql_num_rows error


narjis

Recommended Posts

why does my mysql_num_rows always give the same err

Warning: mysql_num_rows() expects parameter 1 to be resource, boolean given in C:\wamp2\www\e_commerce\e_commerce\admin\viewProducts.php on line 8

 

$conn= mysql_connect("localhost","root","");
mysql_select_db("ecommerce",$conn);
$product_list="";
$sql = "SELECT * FORM products";
$query = mysql_query($sql,$conn);
$exist = mysql_num_rows($query);

although the very same code is running fine in another file of the same project.

Please help me.

Link to comment
https://forums.phpfreaks.com/topic/240261-mysql_num_rows-error/
Share on other sites

why does my mysql_num_rows always give the same err

Warning: mysql_num_rows() expects parameter 1 to be resource, boolean given in C:\wamp2\www\e_commerce\e_commerce\admin\viewProducts.php on line 8

 

$conn= mysql_connect("localhost","root","");
mysql_select_db("ecommerce",$conn);
$product_list="";
$sql = "SELECT * FORM products";
$query = mysql_query($sql,$conn);
$exist = mysql_num_rows($query);

although the very same code is running fine in another file of the same project.

Please help me.

 

So what was the error ?

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.