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? -tom