Supplied argument is not a valid MySQL result resource
<p>i have the following code which generates the following message, i have used num rows before without any issue and even though it is now giving me a warning it still show the results.  Any ideas would be appreciated.</p>

<pre><code>code
$days_ago1 = date('Y-m-d', mktime(0, 0, 0, date("m") , date("d") - 1, date("Y")));
$result = mysql_query("SELECT * FROM daily_count WHERE date='$days_ago1' and  member ='$site_id'");
$num_rows1 = mysql_num_rows($result);
</code></pre>

<p>and this is the warning.</p>

<p>Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/track003/public_html/livetrack/data/graph_data.php on line 5</p>

<p>line 5 is the last line of the code.</p>

<p>Thanks</p>
