i want to fetch a field in controller where id=$ad.
below is my code .
i am not able to get value in $command
public function actionCreatecashform()
{
$model=new Fees;
if(isset($_POST['Fees']))
{
$model->attributes=$_POST['Fees'];
if($model->save())
{
$ad= $model->admission_id;
$command = Yii::app()->db->createCommand('select status from preadmission where id='.$ad)->execute();
if($command==0)
{
Yii::app()->db->createCommand('UPDATE preadmission set sc_id=5 where id='.$ad)->execute();
//Preadmission::model()->updateAll(array( 'status' => 1 ), 'id =.$ad' );
$this->redirect(array('viewfullcash','id'=>$model->id));
}
}
}