RE: [PEAR] MDB data seek error
| From: | Lukas Smith | Date: | Sat, 15 Nov 2003 09:28:00 +0000 |
| Subject: | RE: [PEAR] MDB data seek error | ||
| References: | 1 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-8964@lists.php.net to get a copy of this message | ||
> From: jacob@keystreams.com [mailto:jacob@keystreams.com]
> Sent: Saturday, November 15, 2003 6:28 AM
> I'm receiving the following error when debugging a query using MDB.
>
> Debug session started.
> Debug Warning: /usr/share/pear/MDB/mysql.php line 1352 -
> mysql_data_seek(): Offset 3 is invalid for MySQL result index 27 (or the
> query data is unbuffered)
> Debug session ended.
>
> My intuition is telling me that this may be a problem with MySQL and that
> Offset is referring to int row_number from mysql_data_seek(). But if that
> is the case there is a third row (257 actually) present. I have rebuilt
> the table from scratch a few times to try and rule this possibility out.
> It's not halting the application and the data set I'm needing is being
> returned but I would like to fix this before proceeding further... Any
> ideas are appreciated.
Could you show me the code you are using?
This looks like the classical "fetchRow" used in a loop mistake that a lot
of people are stumbling over (which will therefore be changed in MDB 2.x).
The following methods free the result set after every query:
fetchRow, fetchOne, fetchCol, fetchAll
(this also applies to all equivalent methods that start with query and get)
Regards,
Lukas