mysql - What is my error in php code -


what error in php code, following error, hope help

warning: mysqli_num_rows() expects parameter 1 mysqli_result, boolean given in c:\xampp1\htdocs\blog\blog.php on line 45

because aren't supplying code, can't tell... error occurs when query invalid, resulting in "false" (thus boolean). in query, use mysqli_error(), example:

mysqli_query($link, "select * blabla bla=3") or die(mysqli_error($link)); 

don't forget remove "or die " after debugging, because it's cheap way of displaying error.


Comments

Popular posts from this blog

asp.net - How to correctly use QUERY_STRING in ISAPI rewrite? -

jsf - "PropertyNotWritableException: Illegal Syntax for Set Operation" error when setting value in bean -

laravel - Undefined property: Illuminate\Pagination\LengthAwarePaginator::$id (View: F:\project\resources\views\admin\carousels\index.blade.php) -