note 18226 deleted from function.mysql-result by irc-html

From: Date: Sun, 14 Apr 2002 00:16:44 +0000
Subject: note 18226 deleted from function.mysql-result by irc-html
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-29247@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.

« previous php.notes (#29247) next »