当前位置: 动力学知识库 > 问答 > 编程问答 >

Update 100+ record in cakephp 2x

问题描述:

i am new in cakephp2x . i want to update my table which has two field like userid and point. This table content atleast 500 record now in my function i have to update atleast 100+ record ie i have to change the users point according to the userid.

thanks in advance

网友答案:

You can use the Cake ORM. Please read this page

http://book.cakephp.org/2.0/en/models/saving-your-data.html

my guess is that you'll need to use the updateAll() method, something like:

$this->User->updateAll(
    array('point' => 'something')
);

Hope this helps

分享给朋友:
您可能感兴趣的文章:
随机阅读: