Re: CustomQuery with Pagination
hey, > I had been looking for a pagination solution that I could use when I > needed to write a custom queries using CakePhp as the framework. I did > a lot of google searching and looked at a number of examples. However, > I couldn't find the solution I needed. When you look at the controller source[1] - paginate method you will see on lines 991 and 1008 that it looks for functons paginate() and paginateCount() in the object(model) that you want to paginate. just create these functions in the model with your custom logic. [1] http://api.cakephp.org/1.2/libs_2controller_2controller_8php-source.html#l00887 -- Marcin Domanski http://kabturek.info --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
CustomQuery with Pagination
Hello, I had been looking for a pagination solution that I could use when I needed to write a custom queries using CakePhp as the framework. I did a lot of google searching and looked at a number of examples. However, I couldn't find the solution I needed. Looking at the cakeapps in the wild page and noticed phtagr. Checked out the demo and noticed that it wasn't using the native cakephp pagination. I started reading and hacking and ended up with a solution based on that code and wanted to share. Download it from here: http://mashupkeyword.com/blog/?p=23 HTH Thanks P.S. if it helps you say Thanks to Sebastian Felis who developed phtagr. -- Chauncey Thorn PHP Developer/Systems Administrator email: [EMAIL PROTECTED] url: http://www.cthorn.com/ url: http://www.mashupkeyword.com/ --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---