This might help http://snippets.symfony-project.org/snippet/50
On Mon, Sep 14, 2009 at 8:44 AM, HAUSa <[email protected]> wrote: > > Is there a fast way to update all records matching a criteria? > > What I could do, is this: > $results = MyPeer::doSelect(new Criteria()); > foreach($results as $result){ > $result->setValue('new'); > $result->save(); > } > > But that executes many database requests. Is there a way to execute > this query: > UPDATE mytable SET value='new' > > > -- Blue Horn Ltd - System Development http://bluehorn.co.nz --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -~----------~----~----~----~------~----~------~--~---
