DB.PHP - PHP ORM

Set date on insert on update

You can set predefined action values on insert or on update per property. For only db.php users there is only date action availale. So you can use on insert set date and on update set date. You can specify them to one property at same time. Note that if you specify set date to time type field then will be set current date and time as value.

All cases below are valid and will work:

/**
* on insert set date
* @var date
*/
public $date;
/**
* on insert set date
* @var time
*/
public $date;
/**
* on update set date
* @var date
*/
public $date;
/**
* on update set date
* @var time
*/
public $date;
/**
* on insert set date
* on update set date
* @var date
*/
public $date;
/**
* on insert set date
* on update set date
* @var time
*/
public $date;