This is a discussion on MDB2 and fetchRow within the PHP General forums, part of the PHP Programming Forums category; Hi, I'm converting a PEAR DB based application to MDB2 and am a little stuck on converting fetchRow. I'...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
Hi, I'm converting a PEAR DB based application to MDB2 and am a little stuck on converting fetchRow. I'm getting "Call to undefined method MDB2_Error::fetchRow()" and guess something needs to be done ... Here's the current code ... $result = $db->query($query); while ($row = $result->fetchRow()) { $items[$row["id"]] = $row; } I've read in one place that fetchRow is no longer available, but it seems to be in the documentation [1]. I'm just a little stuck and wondered if anyone here could kindly help :) Thanks [1] http://pear.php.net/reference/MDB2_D...methodfetchRow |
|
|||
|
On 26 Jul, 12:10, elyob <newsprof...@gmail.com> wrote:
> Hi, I'm converting a PEAR DB based application to MDB2 and am a little > stuck on converting fetchRow. I'm getting "Call to undefined method > MDB2_Error::fetchRow()" and guess something needs to be done ... > > Here's the current code ... > > $result = $db->query($query); > while ($row = $result->fetchRow()) { > $items[$row["id"]] = $row; > } > > I've read in one place that fetchRow is no longer available, but it > seems to be in the documentation [1]. I'm just a little stuck and > wondered if anyone here could kindly help :) > > Thanks > > [1]http://pear.php.net/reference/MDB2_Driver_mysql-0.2.0/MDB2/MDB2_Drive... You can safely ignore this message ... I did a PEAR::isError and found the problem. The SQL statement was wrong. Thanks |