Re: mysql_num_rows

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Use the mysql_error() function which may give you more answers. In addition you can use something like

$num = mysql_num_rows($test);
echo $num;

If it returns 0 you have no entries, if nothing happens then you have problem with your query or connection. If you get a number then there is something else wrong. This is a test I haa to use to sort out some code. It is best if you use mysql_error() whenever possible during testing so that you can know exactly what goes wrong where. But I am a noob. There are probaly others with better answers.

Tsegaye Woldegebriel wrote:

Dear Sir or Madame,
I found the following error,
Warning: mysql_num_rows(): supplied argument is not a valid MySQL result
resource in /home/xxx/public_html/sitename/dynamicfile.php on line 61
What is the reason?
I want anyone who knows to answer to reply me.
Thank you in advance for sharing your precious time.




-- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux