开发者

How to show some fields with data using fetchAll in zend framework?

开发者 https://www.devze.com 2023-03-19 03:20 出处:网络
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 ?

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

0

精彩评论

暂无评论...
验证码 换一张
取 消