kam Posted June 16, 2011 Share Posted June 16, 2011 Hello Larry. I followed your book and almost second day I have problem config files. Please help. define ('BASE_URI', 'C:/xampp/htdocs/server/commerce/'); define ('BASE_URL', 'localhost/'); define ('MYSQL', BASE_URI . 'mysql.inc.php'); database coonection DEFINE ('DB_USER', 'commerce'); DEFINE ('DB_PASSWORD', 'password'); DEFINE ('DB_HOST', 'localhost'); DEFINE ('DB_NAME', 'ecommerce2'); // Make the connection: $dbc = mysqli_connect (DB_HOST, DB_USER, DB_PASSWORD, DB_NAME); AND here is the error. An error occurred in script 'C:\xampp\htdocs\SERVER\commerce\html\views\home.html' on line 14: 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] => C:\xampp\htdocs\SERVER\commerce\html\views\home.html [3] => 14 [4] => Array ( [GLOBALS] => Array *RECURSION* [_POST] => Array ( ) [_GET] => Array ( ) [_COOKIE] => Array ( [sESSION] => ba0249306d8d4ca114d87bd61d5270a0 ) [_FILES] => Array ( ) [live] => [contact_email] => you@example.com [page_title] => Coffee - Wouldn't You Love a Cup Right Now? [dbc] => mysqli Object ( [affected_rows] => -1 [client_info] => mysqlnd 5.0.7-dev - 091210 - $Revision: 304625 $ [client_version] => 50007 [connect_errno] => 0 [connect_error] => [errno] => 1305 [error] => PROCEDURE ecommerce2.select_sale_items does not exist [field_count] => 0 [host_info] => localhost via TCP/IP [info] => [insert_id] => 0 [server_info] => 5.5.8 [server_version] => 50508 [sqlstate] => 42000 [protocol_version] => 10 [thread_id] => 12 [warning_count] => 0 ) [r] => ) ) ) [1] => Array ( [file] => C:\xampp\htdocs\SERVER\commerce\html\views\home.html [line] => 14 [function] => mysqli_num_rows [args] => Array ( [0] => ) ) [2] => Array ( [file] => C:\xampp\htdocs\SERVER\commerce\html\index.php [line] => 20 [args] => Array ( [0] => C:\xampp\htdocs\SERVER\commerce\html\views\home.html ) [function] => include ) ) Welcome to Our Online Coffee House! Link to comment Share on other sites More sharing options...
Paul Swanson Posted June 16, 2011 Share Posted June 16, 2011 Looks like an error in your query > "[error] => PROCEDURE ecommerce2.select_sale_items does not exist" 1 Link to comment Share on other sites More sharing options...
kam Posted June 17, 2011 Author Share Posted June 17, 2011 Looks like an error in your query > "[error] => PROCEDURE ecommerce2.select_sale_items does not exist" Thank you very much Paul for pointing me the error. It looks solved for now. Thanks alot. Link to comment Share on other sites More sharing options...
Recommended Posts