Stop a User warning message

2003-09-15 Thread Tom Sparks
I am doing a mysql_num_rows after a SELECT statement and am getting the following warning message: Warning: Supplied argument is not a valid MySQL result resource in {pathname to program} on line 40 Line 40 - $result = mysql_num_rows($res); The SELECT statement: $res = mysql_query(SELECT *

Re: Stop a User warning message

2003-09-15 Thread Paul DuBois
At 11:06 AM -0700 9/15/03, Tom Sparks wrote: I am doing a mysql_num_rows after a SELECT statement and am getting the following warning message: Warning: Supplied argument is not a valid MySQL result resource in {pathname to program} on line 40 Line 40 - $result = mysql_num_rows($res); The

Re: Stop a User warning message

2003-09-15 Thread Tom Sparks
Paul, It is not an error for $category to be 'no' in all records. The warning is just telling me that it didn't find any 'yes' records. I need to read up and find out how to error check the SELECT statement, I guess... -tom

Re: Stop a User warning message

2003-09-15 Thread Paul DuBois
Paul, It is not an error for $category to be 'no' in all records. The warning is just telling me that it didn't find any 'yes' records. Well, no, it is not. The error you showed was: Warning: Supplied argument is not a valid MySQL result resource in {pathname to program} on line 40 PHP is

Re: Stop a User warning message

2003-09-15 Thread Kelley Lingerfelt
Yep, you're right Paul, it is a bad query, one thing I've been burnt on a lot in the past, is using the variables inside those double quoted lines. I've started expanding everything, mostly objects and arrays won't get interpreted correctly, try building the query in a string, and then printing