Re: Pagination using multiple models and custom queries
Thank you. I am looking into that snippet now. Does anyone know whether or not it is easy to integrate the pear datagrid tool into cake? Thank you, codecowboy --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" 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 -~--~~~~--~~--~--~---
Re: Pagination using multiple models and custom queries
Hi Codecowboy, The problem with pulling data from more than one table, is that if it triggers more than one sql statement you canĀ“t apply a sort to it. This means that with the execption of belongsTo HasOne sorting queries becomes "difficult". What you describe is a grid sorting rather than paginating task; there is an ajax grid sorter thingy on cakeforge that might do what you want. Incidentally, if you pass the total to the pagination code I wrote, you can use it just to spit out the page and sort parameters that were passed in from the web (or taken from defaults if absent). HTH, AD7six --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" 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 -~--~~~~--~~--~--~---
Re: Pagination using multiple models and custom queries
Sohei Okamoto wrote: > I haven't tried this yet, but I think this is what you are looking for. > http://wiki.cakephp.org/tutorials:pagination > > It looks promising. > > Sohei Thanks Sohei, but we have already looked into that it doesn't seem to work. We are looking for a pagination tool that takes in an array and creates a sortable columns from the array. The reason we need this is so that we can query multiple tables as opposed to being locked into one model. We think that pear data grid will work but we aren't sure how easily we can integrate it into cake. Thank you, codecowboy --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" 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 -~--~~~~--~~--~--~---
Re: Pagination using multiple models and custom queries
I haven't tried this yet, but I think this is what you are looking for.http://wiki.cakephp.org/tutorials:pagination It looks promising.Sohei --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" 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 -~--~~~~--~~--~--~---
Pagination using multiple models and custom queries
Hi, I'm working on creating an index of a certain models, however I want to be able to take columns from several tables and be able to sort and paginate according to any of those columns. I was wondering if anyone knew the best way to do this. Also, I would like to know if I could create custom queries, and have it sort and paginate according to the results of those queries. Thanks. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" 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 -~--~~~~--~~--~--~---