MDB2 and fetchRow

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'...


Go Back   Usenet Forums > PHP Programming Forums > PHP General

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 07-26-2007
elyob
 
Posts: n/a
Default MDB2 and fetchRow


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

Reply With Quote
  #2 (permalink)  
Old 07-26-2007
elyob
 
Posts: n/a
Default Re: MDB2 and fetchRow

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

Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 08:40 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0