I like to use a column in Zend both in the Where clause as well as the Order:
$select = $this->select();
$select = $select->where('year = ?', $year)
->where('order != ?', 0)
->order('order');
$rows = $this->fetchAll($select);
But when I do this, I get the following error:
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
orderASC' at line 1
Why??!
->order()-call, does it work?