select date from table where ip = php variable?
My PHP variable is an ip address ($ipaddress). So I'm looking to echo the string (simply a date) that is associated with the IP address on the same row. I keep getting some Resource id though it seems to have nothing to do with the auto_increment. Any way what am I doing wrong here?
Code: Select all
$q = "SELECT date FROM jab_ip_addresses WHERE ip='$ipaddress'";
$result=@mysql_query ($q) or die(mysql_error());
echo $result;