http://snippets.symfony-project.org/snippet/50

On Sun, Sep 13, 2009 at 22:44, 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'
> >
>

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to