I have a last_login field in my user model and I needed to update it whenever the user would login. Of course cakephp should make thisÃ‚Â ridiculouslyÃ‚Â easy and straightforward, you know, a single call to updateField would be nice, but that doesn’t exist. So here’s how to update a single field with a datetime type (mysql) using something that does exist in cakephp.

So basically the code above updates last_login with date(DATE_ATOM), which I encourge you to try out as it makes a mysql datetimeÃ‚Â compatibleÃ‚Â string. It looks up the correct user to update via the username.