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

php - Autoloader issue not returning Class -

java - How to put two numbers separated by a space into two different arrays -

c++ - Why am i getting wrong values when performing PE base relocation? -