Cdbcommand Sql Parameters

I am having a hard time with these SQL parameter substitution feature. Can anyone tell what I am doing wrong?


$row = Yii::app()->db->createCommand()





echo $row;

The :item is never substituted with 4;

This is because Yii uses PDO.

CDbCommand::getText() / SQL does not hold the param values.

They are hold in the attribute ‘params’ .

The param values will be submitted to the PDO statement on CDbCommand::queryRow() by PDO::bindParam;


  $command = Yii::app()->db->createCommand()