M
M
MRcracker2020-05-12 07:36:01
PHP
MRcracker, 2020-05-12 07:36:01

What is causing the error in the console?

Hello. Please tell me what could be causing the error?
Warning: mysqli_num_rows() expects parameter 1 to be mysqli_result, boolean given

Answer the question

In order to leave comments, you need to log in

2 answer(s)
F
FanatPHP, 2020-05-12
@FanatPHP

With the fact that there is an error in the request
Before connecting to the database, there should always be a line

mysqli_report(MYSQLI_REPORT_ERROR | MYSQLI_REPORT_STRICT);

and then php will tell you which one

I
Ilya, 2020-05-12
@rpsv

Translate the error and you will understand.
You send a bool to mysqli_num_rows (probably false), not mysqli_result (probably false was returned to you when you requested, not a cursor)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question