Here is my code :
$sql1 = 'SELECT * FROM login WHERE age= "$age", town = "$town" and ID != "$id"';
$result1 = mysql_query($sql1);
$numResults1 = mysql_num_rows($result1);
My variables are fine, they have data in them. The error is this :
Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in.....
There is a possibility that numResults could equal 0 but it still should not cause this.
Could it be the != in the first line that is causing it??