1
我喜歡在Zend的WHERE子句中使用的列都還有訂單:的Zend DB使用列兩種情況和訂單條款
$select = $this->select();
$select = $select->where('year = ?', $year)
->where('order != ?', 0)
->order('order');
$rows = $this->fetchAll($select);
但是當我這樣做,我得到以下錯誤:
SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'order != 0) ORDER BY
order
ASC' at line 1
爲什麼??!
當您刪除' - > order()'-call時,它是否工作? – 2013-02-28 22:34:44