Calvin Lough wrote:
That means that you dont have any rows to work with. It could mean
that you are not connected to the database, or the query you performed
did not return any rows.


On Tue, 8 Mar 2005 16:11:10 +0300, Tsegaye Woldegebriel <[EMAIL PROTECTED]> 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.

Just to clarify - you won't get this error if a valid SQL query is performed and it returns no rows. This means just what it says - the argument passed to it is not the result of a valid SQL query that has been executed on the server. (note: result of a query, not the query itself - it should print_r as a number not as a "select blah" - it's a result resource, a pointer of sorts).

More likely is the query is invalid, go ahead and print_r() the variable being passed to mysql_num_rows() on line 61 (put it before the mysql_num_rows call) and see what info you get back in there.

- Martin Norland, Sys Admin / Database / Web Developer, International Outreach x3257
The opinion(s) contained within this email do not necessarily represent those of St. Jude Children's Research Hospital.

PHP Database Mailing List (
To unsubscribe, visit:

Reply via email to