Re: fetchInto() not defined

From: Date: Sun, 18 Aug 2002 23:06:16 +0000
Subject: Re: fetchInto() not defined
References: 1  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-2151@lists.php.net to get a copy of this message
You should every time check if pear db returns an error.. like that: $res = $db->query($sql); if(DB::isError($res)) die($res->getMessage()); that's maybe not the problem, but if it is, you get error message with some details.. On Sun, 2002-08-18 at 22:42, Kevin Breit wrote: > Hey, > I am using PEAR for some database abstraction stuff. However, I am > getting the following error: > > Fatal error: Call to undefined function: fetchinto() in > /home/kbreit/personal/kdjournal/comments/comment_manip.php on line 58 > > I can't tell why that is happening. The code which calls the offending > code is: > > include('kdconnect.php'); > > retr_comments($db, $reply_to_id); > > include('kddisconnect.php'); > > retr_comments is: > > function retr_comments($db, $reply_to_id) > { > $sql = "SELECT * FROM message_board WHERE reply_to_id=$reply_to_id"; > > $res = $db->query($sql); > > for($i = 0 ; $i < count($res) ; $i++) > { > while ($res->fetchInto($row)) > { > display_comment($row[0], $row[5], $row[1], $row[2], $row[3] ); > } > } > } > > kdconnect.php is: > > <? > > require_once 'DB.php'; > ...lots of stuff... > > so it does call DB.php. > > Why am I getting this error? > > Thanks! > -- > Kevin Breit <mrproper@ximian.com> > > > -- > PEAR General Mailing List (http://pear.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php >

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