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 * FROM company WHERE $category='yes'",$db); ($category is passed to this program from an input form.)
Is there a way to stop this warning to the user when $category = 'no' for all records?
It indicates an error in your program. You have no error checking on the result of the mysql_query() call, I take it?
-tom
-- Paul DuBois, Senior Technical Writer Madison, Wisconsin, USA MySQL AB, www.mysql.com
Are you MySQL certified? http://www.mysql.com/certification/
-- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]