Warning: mysql_num_rows() expects parameter 1 to be resource, boolean given in C:\xampp\htdocs\E-COMMERCE\admin\inventory_list.php on line 66
line 66:
$productCount= mysql_num_rows($sql); //count the output amount

<?php
//block grab the whole list for viewing
$product_list = "";
$sql = mysql_query("SELECT * FROM products ORDER BY date_added DESC");
$productCount= mysql_num_rows($sql); //count the output amount
if($productCount > 0)
{
Member Avatar for LastMitch

@hwoarang69

Warning: mysql_num_rows() expects parameter 1 to be resource, boolean given in C:\xampp\htdocs\E-COMMERCE\admin\inventory_list.php on line 66

Line 66 is this:

$productCount= mysql_num_rows($sql);

Your mysql_num_rows() can't fetch the $sql because

on Line 65 is this:

$sql = mysql_query("SELECT * FROM products ORDER BY date_added DESC");

Your mysql_query() is not getting the data from your table because

It means that you can't connect to the database correctly because there's something wrong with your query!

You need to fixed your query in order for it to work.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.