|
Turns out just adding the from in the setTable doesn't act as expected. $select = $tbl->select()->columns('id'); would still include an all columns in the select. 'select `table`.* , `table`.`id` from `table`' Attached is a patch I used to fix the bug for me. short version: This issue is already known as Was fixed as of 1.9. Marking issue closed. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Agreed.
I already told Zend (ralph probably) that a Zend_Db_Table_Select should be given it's own table in the from clause, just after creating it.
It's not logic to have a Zend_Db_Table_Select entirely empty at creation, it should at least contains its own table as its first from clause.
See :
// that's not logic $table->fetchall($table->select()->from($table, array('my', 'cols')));// that seems more logic $table->fetchall($table->select()->columns(array('my', 'cols')));