note 34406 deleted from function.mysql-data-seek by nlopess
| From: | nlopess@php.net | Date: | Tue, 27 Jan 2004 18:08:19 +0000 |
| Subject: | note 34406 deleted from function.mysql-data-seek by nlopess | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-64277@lists.php.net to get a copy of this message | ||
Note Submitter: harshdeep@graffiti.net
----
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]