Re: dataobjects newbie question

From: Date: Mon, 18 Oct 2004 06:37:40 +0000
Subject: Re: dataobjects newbie question
References: 1  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-14934@lists.php.net to get a copy of this message
On Sun, 17 Oct 2004 11:28:33 +0200, Alexander Petri <alex.petri@gmx.de> wrote: > Hi! > how can i select the whole table with dataobject... > i chose this way: > > $firma = DB_DataObject::factory('crm_firmen'); > $firma->query("SELECT * FROM {$firma->__table} "); > while ($firma->fetch()) { > $rs[]= $firma->toArray(); > } > > but isnt there a better way to selectAll > isnt there a method to do this? > $firma = DB_DataObject::factory('crm_firmen'); if ($firma->find()) { while ($firma->fetch()) { $rs[]= clone($firma); } } -- paperCrane --Justin Patrin--

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