Hello,
I use:
*date('Y-m-d H:i:s', time())*
instead 'NOW()' and it works fine.
Regards.
2009/2/5 Miles J <[email protected]>
>
> I have this method that updates login information on a user. It all
> works, except I cant figure out how to get the mysql NOW() to work.
> Any ideas?
>
> function updateLogin($user, $ip) {
> $data = array();
> $data['currentIP'] = $ip;
> $data['lastLoginTime'] = $user['User']['currentLoginTime'];
> $data['currentLoginTime'] = 'NOW()';
>
> $this->id = $user['User']['id'];
> return $this->save($data, false);
> }
>
> >
>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"CakePHP" 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
-~----------~----~----~----~------~----~------~--~---