Search code examples
phpmysqlphpactiverecord

Phpactiverecord, updating NOW() for an object


I've been attempting to use phpactiverecord for a project.. and I'm struggling to see if I can actually pass a mysql function through any of its native updating methods. I'm a little surprised I couldn't find an answer to this question anywhere else =P.

EDIT: After a year of using the framework, a simple answer is to simply do: $object->date = 'now'


Solution

  • If I understand correctly you want to call NOW() to update a timestamp field. There are several options.