Forum Moderators: coopster
$sql = "SELECT * FROM RESELLER WHERE SITENAME = ".$sitename." ";
$result = mysql_query($sql);
$inuse = mysql_num_rows($result);
Hello all,
I am getting this error "Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in..." I have scowered this code and can not find the reason this is happening. Please suggestion this problem has me stumped.
Thanks,
Robeysan
$sql = "SELECT * FROM RESELLER WHERE SITENAME = ".$sitename." ";
The variable $sitename should have been surrounded by single quotes as well!
Like so:
$sql = "SELECT * FROM RESELLER WHERE SITENAME = '".$sitename."' ";
Sorry about that guys, as soon as I posted this I figured it out ;) thanks anyway
-Robeysan
[edited by: Robeysan at 6:25 am (utc) on Jan. 28, 2009]