Function name must be a string - during save();


when i am attempting to save my record, i am getting this error.,

Function name must be a string in /data/inetpub/wwwroot/sp/protected/controllers/LifeController.php on line 117

Line 117 is this .


I am saving to a table in MYSQL whose structure is like this

 * @var integer $ID

 * @var integer $USERID

 * @var integer $ACTIVITYID

 * @var date $ONDATE

 * @var integer $TIMESPENT

and i am setting the date as

$activity->ONDATE = date("Y-m-d");



first thought: try to rename your column ondate as it seems to be interpreted as a event assignment, avoid ‘on’ in your column names

Change it to


(No brackets)