Model::query() is used correctly and should work correctly.
But use http://book.cakephp.org/2.0/en/models/saving-your-data.html#model-updateall-array-fields-array-conditions instead of query().
Or you use save() and use the id field to update the entry.
Steffen
On Friday, July 26, 2013 11:26:16 PM UTC+2, farisi wrote:
Halo All,--Could you help me, I have problem when update data in cakephp 2.3$this->MyModel->query("update baskets set isSealed=1 where product_detail_id=13");but it failed, those worked in cakephp 1.3.Thank you
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP
---
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscribe@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/groups/opt_out.
No comments:
Post a Comment