Hi guys,
I’m using XAMPP with Yii 1.1.15
When I try to use $this->attr = CDbExpression(‘DATE_ADD(NOW(), INTERVAL 30 DAY)’); in my beforeSave function, the field in the database is updated with just NOW() instead of adding the days to date. In MySQL WorkBench the instruction works fine.
The instruction $this->attr = CDbExpression(‘NOW()’); works fine also.
The field is defined as DATETIME in MySQL
Do you have any advice on how could I update the field with the DATE_ADD expression?
Thanks in advance
Regards