note 36275 added to ref.mysql

From: Date: Fri, 03 Oct 2003 04:38:58 +0000
Subject: note 36275 added to ref.mysql
Groups: php.notes 
Request: Send a blank email to php-notes+get-57643@lists.php.net to get a copy of this message
If you're looking for a way to test if a variable is a valid mysql result resource then this may help: assign a variable to the result of a mysql_num_fields() call like this: $numFields = @mysql_num_fields($resultSet); the @ symbol suppresses errors, if the result set is invalid $numFields will be NULL which you can then test for with: is_null($numFields) which will return a boolean. ---- Manual Page -- http://www.php.net/manual/en/ref.mysql.php Edit Note -- http://master.php.net/manage/user-notes.php?action=edit+36275 Delete Note -- http://master.php.net/manage/user-notes.php?action=delete+36275&report=yes Reject Note -- http://master.php.net/manage/user-notes.php?action=reject+36275&report=yes

« previous php.notes (#57643) next »