Re: DB_DataObject multiple deletes
| From: | Justin Patrin | Date: | Wed, 27 Jul 2005 16:19:00 +0000 |
| Subject: | Re: DB_DataObject multiple deletes | ||
| References: | 1 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-20164@lists.php.net to get a copy of this message | ||
On 7/27/05, Etienne van Tonder <evt@infoware.com.au> wrote:
> Is it possible to perform a delete in a loop using the same DO object, ie
>
> foreach ($ridarray as $rid => $val)
> {
> if ($rid > 0)
> {
> if ($fDBTable->get($rid) > 0)
> {
> $fDBTable->delete();
> }
> }
> }
Yes, this should work fine. You should also be able to delete with a
fetch() loop. Are you sure the data is being fetch properly? Try
doing:
DB_DataObject::debugLevel(1);
and watching for errors. You can use up to 5 for more information.
--
Justin Patrin