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 *
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
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
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
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