1st question answered, thanks, I was trying to put the order in with
the conditions, I missed that there was another order field ;P.

> $this->table->save() will insert if the table id isn't filled in
> otherwise it'll try and update the current record.

2nd question: the problem is that I don't want to insert a new record
and I also don't want to update the current record. I want to update a
bunch of records that are not the current record, and which are
related to the current record by a field other than "id" so setting
This->table->id doesn't help.

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")?

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" 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/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to