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 -

python - Getting next two indexes regardless of current index -

ruby - Prevent Custom Validation Error on Association -