Hello, This is a reply to an e-mail that you wrote on Tue, 29 Jul 2003 at 18:25, lines prefixed by '>' were originally written by you. > If the SQL statement returns an empty set, shouldn't $result be equal > to 1? > Instead, I'm getting $result = 4.
If the query fails, e.g. because you have an error in your SQL $person will contain FALSE. If the query executes succesfully (whether it is an empty set or not) $person could contain any number at all which represents the result resource. I think you want... $numrows = mysql_num_rows($person); if($numrows===0){ // result set was empty } HTH David -- phpmachine :: The quick and easy to use service providing you with professionally developed PHP scripts :: http://www.phpmachine.com/ Professional Web Development by David Nicholson http://www.djnicholson.com/ QuizSender.com - How well do your friends actually know you? http://www.quizsender.com/ (developed entirely in PHP) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php