How to display the rendered query before it’s executed.
$sql="SELECT * from users WHERE user_id = :user_id";
$command=Yii::app()->db->createCommand($sql);
// replace the placeholder ":user_id" with the actual username value
$command->bindParam(":user_id",$user_id,PDO::PARAM_INT);
echo "<br/>".$command->getText();
I would like to print query included with bind param
e.g user_id = 1 then [sql]SELECT * from users WHERE user_id = 1[/sql]