the framework uses version 1.1 of Yii,
$count=EblsGoods::model()
->updateAll(
["Stock"=>100],"Id=:test1andBeeGoodId=:test2",array(":test1"=>1,":test2"=>8)
);
the condition for updating the database is that it conforms to Id = 1 and BeeGoodId = 8, and the Stock is changed to 100, but syntax errors are reported all the time. Why?
CDbException: CDbCommand failed to execute the SQL statement: SQLSTATE [42S22]:
Column not found: 1054 Unknown column"1 and BeeGoodId" in "where clause".
The SQL statement executed was: UPDATEyh_open_ebls_goods
SETStock
=: yp0 WHERE Id=:test1 and BeeGoodId=:test2. Bound with: yp0="100",: test1=1,: test2=8