I've been trying to count records that match my query in MySQL using the
examples given in the on-line manual as well as the user comments and I'm
still getting the error:

Warning: mysql_num_rows(): supplied argument is not a valid MySQL result
resource.

Here's the code.

mysql_connect ($local_host, $local_user, $local_pass);
mysql_select_db ($local_db);                               
$result = mysql_query ("SELECT count(id) FROM listings WHERE agent = 
'$agent' AND child = '0'");
$rc = mysql_num_rows($result);
mysql_close();                    

 Is there something I'm missing here? I've tried using just about every
example in the on-line manual and get the same error. I can run other
queries just fine though.

Thanks,

Ed



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

Reply via email to