note 34406 modified in function.mysql-data-seek by andrey
| From: | andrey@php.net | Date: | Tue, 27 Jan 2004 14:29:30 +0000 |
| Subject: | note 34406 modified in function.mysql-data-seek by andrey | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-64252@lists.php.net to get a copy of this message | ||
With reference to bobby dot jack at excite dot com's comment:
PHP actually gives a warning, not an error, that looks like:
mysql_data_seek(): Offset 0 is invalid for MySQL result index X in (file) Y on line Z.
[EDITOR's NOTE
The version of the mysql extension is quite old, nevertheless 0 is a valid offset even in this
version. It's probably an user error. The check condition is :
if ((*offset)->value.lval<0 || (*offset)->value.lval>=(int)mysql_num_rows(mysql_result))
{
If the query has returned a 0 rows result set, it's a script error to try to seek to row 0.
andrey]
--was--
With reference to bobby dot jack at excite dot com's comment:
PHP actually gives a warning, not an error, that looks like:
mysql_data_seek(): Offset 0 is invalid for MySQL result index X in (file) Y on line Z.
http://www.php.net/manual/en/function.mysql-data-seek.php