How to show some fields with data using fetchAll in zend framework?
In a table say users i have 5 fields i want to show 3 fields with all data using fetchAll in zend framework. how to do that ?
My code is
$astrology = new Application_Model_DbTable_开发者_如何学CAstrology();
$row = $astrology->fetchAll($astrology->select());
$rowArray = $row->toArray();
i want to show id,user_name,create_date field ..
Use $astrology->select()->from($tablename, array(columns)); You can specify fields in from method
http://framework.zend.com/manual/en/zend.db.select.html
精彩评论