News Feed
Sections




News Archive
Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Lee Blue's Blog:
How To Sort A Zend_Db_Table_Rowset
February 14, 2008 @ 17:11:00

Lee Blue has posted a handy tip for users of the Zend Framework, specifically when sorting the results from a query to tables linked in a Zend_Db_Table setup.

So you figured out how to define the relationships between your Zend_Db_Tables and you have issued a call to findDependentRowset(). You get your Rowset back but you need to sort the results by one of the columns in the dependent table. How do you do that?

Unfortunately, he's found out that you just simply can't - well, not without a custom function (until the 1.5 release of the framework rolls around). He shows his table set up and some sample database classes to relate to the tables (and link between them). The magic comes in with his DU_Utils class that takes in the data and sorts it based on the given column name in the given direction.

0 comments voice your opinion now!
zendframework zenddb table relationship sort order column


blog comments powered by Disqus

Similar Posts

7PHP.com: Interview with Matthew Weier O'Phinney - Project Lead of Zend Framework

Padraic Brady's Blog: The PHPSpec Zend Framework App Testing Manifesto: ZF Integration

David Coallier's Blog: Zend_Db Without PDO part #3 (SVN Repository)?

Zend.com: WEBINAR: Unit Testing since Zend Framework 1.8

Chance Garcia's Blog: Zend_log_exception 'bad log priority'


Community Events





Don't see your event here?
Let us know!


release mvc language interview symfony library opinion version community composer framework voicesoftheelephpant package security laravel update series tool podcast introduction

All content copyright, 2014 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework