The mysql_num_rows () function returns the number of rows in a recordset. This function returns FALSE on failure. Get number of rows in result.
This extension was deprecated in PHP 5. Returns the number of rows in the result set. The use of mysql_num_rows () depends on whether you use mysql_store_result() or mysql_use_result() to return . The error message sounds to me, that you have forgotten to use mysql_query first , before using mysql_num_rows $strQuery=SELECT . We can get the number of rows or records present in a table by using mysql_num_rows () function. The behaviour of mysql_num_rows () depends on whether buffered or unbuffered result sets are being used. For unbuffered result sets, mysql_num_rows () will . Warning: mysql_num_rows () . This is confirmed by the result of the query ran directly in phpMyAdmin.
Hello, How can I get the number of result returned by a find (or findByAttributes) method ? Thank you, Best Regards, Jack. Try to use mysql_affected_rows() instead of mysql_num_rows (). Retrieves the number of rows from a result set. This command is only valid for statements like SELECT or SHOW that . Olá, novamente eu estou tendo problemas com PHP , mas agora também inclui do Mysql. O prolema parece que está em mysql_num_rows ();.

You get that error because mysql_num_rows () expects a result (the value you get from mysql_query()).


