note 21961 added to function.mysql-result
| From: | bradley at holt dot net | Date: | Sat, 01 Jun 2002 21:07:35 +0000 |
| Subject: | note 21961 added to function.mysql-result | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-31328@lists.php.net to get a copy of this message | ||
Just a warning, if your result set is empty mysql_result will return an error like this:
Warning: Unable to jump to row 0 on MySQL result index...
I got around it by simply using an if statement as such:
if(mysql_num_rows($resultID)>0){$foo=mysql_result($resultID,0);}
--
http://www.php.net/manual/en/function.mysql-result.php
http://master.php.net/manage/user-notes.php?action=edit+21961
http://master.php.net/manage/user-notes.php?action=delete+21961
http://master.php.net/manage/user-notes.php?action=reject+21961