Nothing returned

From: Date: Sat, 03 Nov 2001 22:29:41 +0000
Subject: Nothing returned
Groups: php.db 
Request: Send a blank email to php-db+get-13976@lists.php.net to get a copy of this message
Why am I not getting anything returned from this function? I have code doing a if user exists and b if user doesn't exist. I'm not getting any numRows result apparently. The query is OK and returns 1 user for $name=admin. I'm not getting any errors from isError. Martin function exists($name) { $sql = "SELECT * FROM users WHERE (name='$name')"; $res = $db->query($sql); if (DB::isError($res)) { die ($res->getMessage()); } if($res) { $Rows = $res->numRows(); if($Rows > 0) { return(TRUE); } else { return(FALSE); } } }

« previous php.db (#13976) next »