1
I have a simple connection that my application uses to connect to the bank mysql
.
Locally everything was fine, but putting it online no longer works. I have changed several possible terms to the error that I saw here in the topic and it did not work. The connection to the bank is correct, but the login check will not.
Follows my code:
Connexion.php
Login.php
Error
conexao_ok Warning: mysqli_num_rows() expects Parameter 1 to be mysqli_result, Boolean Given in /customers/0/f/7/theydo.com.br/httpd.www/bd/Logar.php on line 9 Login_error
Note: I have tried mysql_num_rows
, it still didn’t work out.
Welcome home, my friend edit your question and put the code instead of image! Enjoy and do the Tour to learn how the community.
– NoobSaibot
Possible duplicate of Mysql error "expects Parameter 1 to be Resource, Boolean Given in"
– Filipe Moraes
Tries
if($sql && mysqli_num_rows($sql) > 0)
– Sam
Connection data is correct? Add one
or die($dbcon->error);
after theselect
. Check whether$dbcon->query
is returningfalse
formysqli_num_rows
only acceptedmysqli_result
. Ps.: It makes no sense to use a partPOO
and another partprocedural
.– Valdeir Psr
Thank you personally, I will pay attention, it is the first question I ask in the forum, I will check the two questions, thank you very much, I will give the answer if I have solved or not
– robertsouzalopesify
Due to the error message, there was some error in your query. You need to get the apache log error message.
– rray
I changed the line as suggested by dvd, if($sql && mysqli_num_rows($sql) > 0), connection started to validate and also had to change the table name to lowercase. Perfect now. Interesting as a change from local scripts to online, to these changes.
– robertsouzalopesify