RE: [PEAR] MDB data seek error

From: Date: Sat, 15 Nov 2003 18:01:47 +0000
Subject: RE: [PEAR] MDB data seek error
Groups: php.pear.general 
Request: Send a blank email to pear-general+get-8969@lists.php.net to get a copy of this message
It does it when I do the following (at least these are the two methods I've tried): $db->queryAll('select tlds_id, tlds_domain from tlds where tlds_active = 1'); $db->fetchAll($q); OR $db->getAssoc('select tlds_id, tlds_domain from tlds where tlds_active = 1'); The debug warning appears after the fetchAll and getAssoc methods are called. >> 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 > > -- > PEAR General Mailing List (http://pear.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > >

« previous php.pear.general (#8969) next »