Now that I think about it maybe its not that difficult. The paginate function has a scope parameter which can be used to pass sql condition. I could try and pass some kind of hint in this array about the search I want to preform. hmmmmmmmmmmmm..... Should work.
Too late to check it now but will do it tomorrow and write about it afterwards. On Oct 29, 12:34 am, Ita <[EMAIL PROTECTED]> wrote: > Hello, > I have just implemented pagination successfully but seem to have a > problem with expanding this. > Iĺl explain. > > I have a controller that can do several kind of searches. > lets say it has the following functions: > searchByAAA > searchByBBB > searchByCCC > searchByDDD > > each search is complicated and has to be done using custom SQL query. > Now when I implement pagination I need to pass this SQL to the > paginator which I undestand cannot be done. > I know I can override the model paginate and paginateCount functions > but this will only help me in one case. > How do I know which SQL to run? > Can I pass some kind of parameter to the paginate function so Iĺl know > from where I´m coming? --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to [email protected] 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 -~----------~----~----~----~------~----~------~--~---
