Help solve the problem produces such an error

Warning: mysql_num_rows () expects parameter 1 be resource, boolean given in / home / gtiradio / domains

Indicates:

if (mysql_num_rows($result_1) == 0) { ... } 

What's wrong?

Reported as a duplicate by Ipatiev php Feb 3 at 3:41 pm

A similar question was asked earlier and an answer has already been received. If the answers provided are not exhaustive, please ask a new question .

  • request fell off with error deprecated This extension is outdated since PHP 5.5.0 and will be removed in the future. Use MySQLi or PDO_MySQL instead. See also the MySQL instruction: API selection and the corresponding FAQ for more details. Alternatives to this function: mysqli_connect () PDO :: __ construct () - zb '
  • the trick is that literally 5 days ago everything worked fine, I did not change anything - Alexander Sizintsev
  • one
    @Alexander Sizintsev, if you want to complain that some time ago there was no error (and not the reason for its occurrence), then you are here , here or here . If you are still interested in deploying the ball of error back, listen to the comment from @Andrey Talanin. I assume that in one or another part the DB schema is broken. - etki

2 answers 2

And you have a boolean type in $ result_1, this is what the error says. See where and how this variable gets a boolean value, there shouldn't be one .

  • and why it worked literally 5 days ago, but right now, you no longer see ... - Alexander Sizintsev
  • Andrei Spachibo, solved the problem. - Alexander Sizintsev

Most likely the result of the query is an error. Try to see the result of the mysql_error () function .

  • one
    Please try to publish detailed answers containing a specific example of the minimum solution, supplementing them with a link to the source. Answers –references (as well as comments) do not add knowledge to the Runet. - Nicolas Chabanovsky