)->expression('send_count + 1'),
'sent' => $this->Invite->getDataSource()->expression('NOW()')
));
$this->Invite->save();
~Jonathan
On Wednesday, September 7, 2011 2:54:12 AM UTC-4, Richard Neil Roque wrote:
>
>
@Richard: I model-ise my user_visits so I know latest and previous
visits etc. and then have a CounterCache on that join.
But, this certainly works $this->ShopProduct-
>updateAll(array('ShopProduct.view_count'=>'view_count + 1'),
array('ShopProduct.id'=>$product['ShopProduct']['id']));
HTH, Paul
On Thu, Sep 8, 2011 at 6:14 AM, Ryan Schmidt wrote:
> You really do want to be doing it the way the OP said: by running an atomic
> UPDATE statement that does the increment directly in the database, not in PHP
> code. I'm sure it's easy to do that in CakePHP but I don't have the code
> handy; p
Thanks for your reply.
--
Our newest site for the community: CakePHP Video Tutorials
http://tv.cakephp.org
Check out the new CakePHP Questions site http://ask.cakephp.org and help others
with their CakePHP related questions.
To unsubscribe from this group, send email to
cake-php+unsubscr...@
On Sep 7, 2011, at 02:38, Dr. Tarique Sani wrote:
> On Wed, Sep 7, 2011 at 12:24 PM, Richard Neil Roque wrote:
>>
>> Hi i'm a new developer using CakePHP.
>> I would like to know
>> How can i update a field using a function.
>> Example is
>>
;last_login'] = date('Y-m-d H:i:s');
Then just save it
Read http://book.cakephp.org/view/1031/Saving-Your-Data
HTH
Tarique
On Wed, Sep 7, 2011 at 12:24 PM, Richard Neil Roque
wrote:
>
> Hi i'm a new developer using CakePHP.
> I would like to know
> How can
Hi i'm a new developer using CakePHP.
I would like to know
How can i update a field using a function.
Example is
UPDATE Users SET AGE=AGE+2+3+4 WHERE id=1???
Currently i do have a code like this one.
$this->User->id = $user['User']['id'];
$this->User->