Remove the @ in front of the mysql_num_rows function call. The @ symbol supresses errors, so that's likely where your error would be printed. Cheers - Martin Norland, Database / Web Developer, International Outreach x3257 The opinion(s) contained within this email do not necessarily represent those of St. Jude Children's Research Hospital. -----Original Message----- From: ed@xxxxxxxxxxxx [mailto:ed@xxxxxxxxxxxx] Sent: Thursday, November 18, 2004 1:15 PM To: php-db@xxxxxxxxxxxxx Subject: I'm less experienced please be gentle :) Can anyone tell me whats wrong with the below code? it doesnt execute. $ip=$_SERVER["REMOTE_ADDR"]; $banned="SELECT * FROM banned WHERE ip='$ip'"; if(@mysql_num_rows(mysql_query($banned)) > 0) { echo "You have been Banned."; }else{ echo "$ip"; } -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php