Yii CDbCommand: getText() with parameters not possible?
By executing the following command:
echo Yii::app()->db->createCommand()
->select('*')
->from('User')
->where('user_id=:uid', array(':uid'=>123))
->getText();
we get
SELECT * FROM User
WHERE user_id=:uid
when we should be getting
SELECT * FROM User
WHERE user_id=123
Binding does not work when using getText(). Why? Is it a bug?
链接地址: http://www.djcxy.com/p/60854.html上一篇: Yii中的数据库请求不好?