Jump to content
Larry Ullman's Book Forums
Sign in to follow this  
artslave

Error "mysqli_Num_Rows() "

Recommended Posts

Hello Larry,

On the coffee website, I got everything working and the database connection works, but when I click on the Wish LIst, add to cart or Cart button, I get the following error below. I wasn't sure if I have a setting wrong. I wasn't sure where to look at this point. Any direction would be helpful. Thank you in advance.

 

In case you need to see the following location of my files and URL:

// Determine location of files and the URL of the site:

define ('BASE_URI', '/Applications/MAMP/htdocs/ecommerce/');
define ('BASE_URL', 'http://localhost:8888/ecommerce/html/');
define('MYSQL', BASE_URI . 'mysql.inc.php');

 

 

 

An error occurred in script '/Applications/MAMP/htdocs/ecommerce/html/wishlist.php' on line 80:
mysqli_num_rows() expects parameter 1 to be mysqli_result, boolean given

Array(    [0] => Array        (            [function] => my_error_handler            [args] => Array                (                    [0] => 2                    [1] => mysqli_num_rows() expects parameter 1 to be mysqli_result, boolean given                    [2] => /Applications/MAMP/htdocs/ecommerce/html/wishlist.php                    [3] => 80                    [4] => Array

Share this post


Link to post
Share on other sites

That normally means your query is failing to return any records. I'd start by testing the query to see if it gives records or an error.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

×
×
  • Create New...