Re: DB_DataObject

From: Date: Fri, 22 Sep 2006 00:37:13 +0000
Subject: Re: DB_DataObject
References: 1 2 3  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-25197@lists.php.net to get a copy of this message
On 9/21/06, Chris Boget <chris.boget@wild.net> wrote:
//$users->find(); // Actually, I'm not even sure this is needed
Of course you need this. It's how the query is run. The only reason I was sceptical was because if I commented out the find(), I would still get the error. That made me think that there was some db connection going on in selectAdd() which wasn't apparent to me in the code. :| $do = DB_DataObject::factory('table'); if ($do->find()) { while ($do->fetch()) { echo $do->field."\n"; } } This works but for some reason my code doesn't. I'm still looking into this to determine if I'm somehow doing something wrong.
It's the selectAdd('*') and lack of find(). -- Justin Patrin

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