Yii Custom Query - Now() Function

Hello everyone!!!

I have written one custom query in YII and I want to pass NOW() function of MySQL as one value inside it.

Query :

Yii::app()->db->createCommand()->insert(‘temp_log’, array(





This query Running fine but now() function gives Incorrect result as "0000-00-00 00:00:00", It is not storing current Date-Time…

Thanks in Advance!!!

Got The answer :

new CDbExpression(‘NOW()’)

Gives the correct value.