Sunday, July 17, 2011

CakePHP PaginatorHelper-Sorting problem solved

Hello Friends,
CakePHP provide its own Pagination helper using which you can easily add paging and sorting functionality in your CakePHP application. Using this helper class for one model, all instruction is given in below link. If you works with more than one model. means using belongsTo or hasManyrelation and getting records from more than one table than paging is as simple as one table. But for sorting, you might face some problem. This can be solved by adding Model name before field name. Look at below syntax.

$paginator->sort(‘Title’, ‘Category.title’); ?>
If you find any problem in this than let me know by comment.



Post a Comment

Any Questions or Suggestions ?


Professional & Experienced Freelance Developer From India, Technologist, Software Engineer, internet marketer and Open Sources Developer with experience in Finance, Telecoms and the Media. Contact Me for freelancing projects.

Enter your email address:

Delivered by FeedBurner

PHP Freelancer India - Google+