开发者

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

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜