0
的數量有用於降低一本書,在我們項目的賣家數量是該函數SQLSTATE [HY093]:無效的參數編號:綁定變量的數量不符令牌dotrine和學說
class listab_Model_Books extends listab_Model_BaseBooks
{
public function decreaseSeller($code)
{
$row = Doctrine_Query::create()
->from('listab_Model_Books b')
->where('b.code = ?',$code)
->fetchOne();
// var_dump($row['seller']);
$q = Doctrine_Query::create()
->from('listab_Model_Books b')
->set('b.seller = ?',$row['seller']-1)
->where('b.code = ?',$code)
->execute();
}
}
功能
,當我嘗試使用此功能,它給了我這個錯誤
SQLSTATE[HY093]: Invalid parameter number: number of bound variables does not match number of tokens dotrine
我在做什麼錯:(