« Return to Thread: "Adding columns to an existing FROM" Fatal error!

"Adding columns to an existing FROM" Fatal error!

by Benjamin.Gonzales :: Rate this Message:

Reply to Author | View in Thread

I was trying the method columns, but I get error,



$select = $db->select()
   ->from(array('t1' => 'employee'), 'employee_id')
    ->columns('name');

I am doing wrong?
------------------------------------------------ERROR---------------------------------------------------
Fatal error: Uncaught exception 'Zend_Db_Select_Exception' with message 'Unrecognized method 'columns()''

in /Zend_library/ZendFramework-1.5.2/Zend/Db/Select.php:1086 Stack trace: #0

[internal function]: Zend_Db_Select->__call('columns', Array) #1

/appweb/application/modules/cms/controllers/EmployeeController.php(18): Zend_Db_Select->columns('emp_id', 'a1a') #2

/Zend_library/ZendFramework-1.5.2/Zend/Controller/Action.php(502): EmployeeController->indexAction() #3

/Zend_library/ZendFramework-1.5.2/Zend/Controller/Dispatcher/Standard.php(293): Zend_Controller_Action->dispatch('indexAction') #4

/Zend_library/ZendFramework-1.5.2/Zend/Controller/Front.php(914): Zend_Controller_Dispatcher_Standard->dispatch(Object(Zend_Controller_Request_Http), Object(Zend_Controller_Response_Http)) #5

/appweb/library/Gnbit/Init.php(199): Zend_Controller_Front->dispatch() #6

/var in /Zend_library/ZendFramework-1.5.2/Zend/Db/Select.php on line 1086

 « Return to Thread: "Adding columns to an existing FROM" Fatal error!

LightInTheBox - Buy quality products at wholesale price!