On Dec 28, 2007 4:37 PM, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> I guess I could do a findall with the conditions I am looking for, do
> a foreach on the results, set each result to the current record and
> update each record individually, but this seems very inefficient. Is
> there no way to update a bunch of records unrelated to the current
> record based on conditions (like "UPDATE table SET field=value WHERE
> any_field_other_than_id="some_value")?

Well, you could always just write some custom SQL to do it.  There are
times where the CakePHP DB model stuff just won't do what you need.
No shame in writing custom model functions that use hand-built SQL.

-- 
Chris Hartjes

My motto for 2007:  "Just build it, damnit!"

@TheKeyboard - http://www.littlehart.net/atthekeyboard

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to