MikeMikeMike Posted May 12, 2011 Share Posted May 12, 2011 Hi, This question is about the 2nd ecommerce application (i.e. selling coffee). I loaded all the source code etc into a server to see what the site looks like before working through the chapters. (I also set up the databases and changed the htaccess file according to instructions). When I load the site, however, I am getting this error message about home.html. An error occurred in script '/blah/blah/views/home.html' on line 14: mysqli_num_rows() expects parameter 1 to be mysqli_result, boolean given So this is a database query that has not succeeded, but I don't know what created it. I'm not sure if my database connection has failed, or if it's a path problem, or another reason. Any ideas... Looking at the source code, line 14 of home.html starts if (mysqli_num_rows($r) > 0) { echo '<dl class="special fright"> <dt><a href="/shop/sales/">Sale Items</a></dt>'; // Fetch each item: while ($row = mysqli_fetch_array($r, MYSQLI_ASSOC)) { echo '<dd><a href="/shop/sales/#' . $row['sku'] . '" title="View This Product"><img alt="" src="/products/' . $row['image'] . '" /><span>' . $row['sale_price'] . '</span></a></dd>'; } Link to comment Share on other sites More sharing options...
MikeMikeMike Posted May 12, 2011 Author Share Posted May 12, 2011 sorry problem solved. i hadn't put the stored procedures into the database yet Link to comment Share on other sites More sharing options...
Larry Posted May 13, 2011 Share Posted May 13, 2011 That would do it. Glad you figured it out and thanks for letting us know. Link to comment Share on other sites More sharing options...
Recommended Posts