»
S
I
D
E
B
A
R
«
Sorting on aggregate and composite fields using pagination in 1.2
March 12th, 2010 by wood

While it may not be a common problem, I ran into this while working on a simple website I was building, and have recieved permission to share it with the community. I had a paginated table, and wanted a SUMed column to support sorting. This is how I did it.

Note that the coming release of CakePHP 1.3, has an awesome feature known as Virtual Fields http://book.cakephp.org/view/1608/Virtual-fields, which are far superior to this little trick.


Leave a Reply

»  Substance: PHP Frameworks   »  SiteMap