I am creating sample application using yii. I have doubts on yii. Could you please help me.
Before insert a new record into database,I need to check condition and return error to user. Suppose in the attached image, if user checks more than one default answer I need to check condition and return error to user.
Before save my code is
public function beforeSave()
{
if ($this->isNewRecord)
{
$this->create_time = new CDbExpression('NOW()');
$this->create_user_id = Yii::app()->user->id;
}
else
{
$this->update_time = new CDbExpression('NOW()');
$this->update_user_id = Yii::app()->user->id;
}
return parent::beforeSave();
}
In the order column I need display like {number) {up arrow image} {down arrow image}. How to include up & down arrow images.