you could do:

$data['currentLoginTime'] = date('Y-m-d H:i:s');

On Feb 5, 2009, at 1:56 AM, Miles J wrote:

>
> 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);
> }
>
> >

Andras Kende
http://kende.com




--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to