Mssql Bindparam

I have query like this:


$query="UPDATE $table SET title=(N':title') WHERE id=':id'";

and I can’t bind :title, cuz after


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

it’s response like a string and I can’t use bindParam on it.

Is it possible to do something with this?

so stupid… <_<

I resolved this issue in this way:


$query="UPDATE $table SET title=(N?) WHERE id=':id'";

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

$command->bindParam(1,$title, PDO::PARAM_STR);