note 26082 deleted from function.mysql-result by didou

From: Date: Wed, 09 Jul 2003 15:20:22 +0000
Subject: note 26082 deleted from function.mysql-result by didou
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-51790@lists.php.net to get a copy of this message
Note Submitter: se[FUNNYSYMBOL]designlinks[DOT]net ---- If you wish to select a field value in a SQL statement like: $sql = "SELECT uid FROM global_lookup WHERE id='$fid'"; $result = mysql_query($sql, $db) or die($sql."->".mysql_error()); This is quicker: return @mysql_result($result,0); than: $row = mysql_fetch_array($result); return $row["uid"]; In both cases, 'uid' is returned if it exists, otherwise NULL.

« previous php.notes (#51790) next »