开发者

created and modified in CakePHP 1.1

开发者 https://www.devze.com 2023-03-27 05:01 出处:网络
A simple question: in both CakePHP 1.2 and 1.3, created and modified fields will be automatically populated:

A simple question: in both CakePHP 1.2 and 1.3, created and modified fields will be automatically populated:

By defining a created or modified field in your database table as datetime fields, CakePHP will recognize those fields and populate them automatically whenever a record is created or saved to the database (unless the data being saved already contains a value for these fields).

A preliminary search of the Cookbook finds no such section for CakePHP 1.1开发者_如何学JAVA. Is this functionality in 1.1 at all, or was it introduced with 1.2? If the former, bonus points given for ideas on how to replicate it in 1.1...


This feature is available in CakePHP 1.1, see http://api11.cakephp.org/model__php5_8php-source.html#l00867

0

精彩评论

暂无评论...
验证码 换一张
取 消