Please could you explain us your method better?
I dont understand how you write the custom query inside the findAll
method.
Any example? Thanks a lot


On 3 oct, 10:32, Mike Green <[EMAIL PROTECTED]> wrote:
> I had exactly the same problem, however the *easiest* way to do this
> (and I have done it) - is to write your own findAll() in your model.
> Paginate will then call this twice. the first time to find how many
> rows ( count(*) ) and then again to get the result with a limit.
>
> In your custom findAll you then have the choice, either construct your
> own sql query or pass some data back to the parent findall - I
> personally would just construct the sql directly from the findall
> parameters, this is fairly straightforward.
>
> Using this method I've been able to paginate just about everything -
> even queries over several databases using UNION and across tables and
> even hosts!
>
> If you need any help please ask - as I would have loved to have know
> about this when I wasted the same amount of time trying it myself and
> reaching several dead ends.
>
> Best regards
>
> Mike
>
> On Sep 25, 10:04 pm, burzum <[EMAIL PROTECTED]> wrote:
>
> > This manipulates an association in the model and uses it somehow 
> > forpagination. But it does NOT paginate a custom mySQL query.
>
> > On Sep 25, 5:39 pm, rtconner <[EMAIL PROTECTED]> wrote:
>
> > > If you want, you can use these two functions in your model to do
> > > custom paginating...
>
> > >http://bin.cakephp.org/saved/21687

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" 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
-~----------~----~----~----~------~----~------~--~---

Reply via email to