note 18226 added to function.mysql-result

From: Date: Tue, 15 Jan 2002 10:22:03 +0000
Subject: note 18226 added to function.mysql-result
Groups: php.notes 
Request: Send a blank email to php-notes+get-24833@lists.php.net to get a copy of this message
And what is the result of this function when the result of the query is the empty set? ie: $sql = "select user_id from users where name = 'funny guy'"; if(!$res = mysql_query($sql, $db)) { die("db err"); } $user_id = mysql_result($res, 0); ---> what is $user_id when there are no users in the database table by the name of 'funny guy'? Generally speaking, I wish the documentation would point out things like this much more. Yes I can just "try it out", but the docuementation should state this kind of thing much more clearly. -- http://www.php.net/manual/en/function.mysql-result.php http://master.php.net/manage/user-notes.php?action=edit+18226 http://master.php.net/manage/user-notes.php?action=delete+18226 http://master.php.net/manage/user-notes.php?action=reject+18226

« previous php.notes (#24833) next »