You're right Baz,
Chris - I owe you Mad Props :)
On Feb 6, 1:43 pm, Baz <[EMAIL PROTECTED]> wrote:
> Actually, I think you mean Chris is the man. Then (by even further
> extension) Nate would be the main, cuz Chris bugged him on IM for help with
> this.
>
> But, I know what you mean. I've found these group posts time and time again,
> but they never really helped. Telling me you can Override something is one
> thing. But how am I supposed to know what goes into it? I guess the answer
> is that I'm supposed to go digging through the code.
>
> But a better answer would be something like:
>
> Override paginate() to return a model similar to find('all') and
> paginateCount() to return something like find('count')...
>
> But with that said, I looked through the API and it was just daunting.
> Chris' solution seems rather slim to me.
>
> So these are the questions I have for someone more knowledgeable:
>
> 1. It seems that the paginate() function could consist of only a
> find('all') and pageCount() by find('count')?
> 2. If so, what handles all the paging stuff?
> 3. Or is this one of those magic things again where just overriding
> paginate() and pageCount() magically make stuff work?
>
> --
> Baz L
> Web Development 2.0http://WebDevelopment2.com/
>
> On Feb 6, 2008 12:17 PM, DragonI <[EMAIL PROTECTED]> wrote:
>
>
>
> > Baz, you're the MAN.
>
> > This is something I can work with :)
>
> > BTW, in all fairness to patcoll, it was better than him giving me
> > "RTFM" ;) which I actually wish I could instead of digging thru code.
>
> > And patcoll there is absolutely no offense meant. You did try to help.
> > So kudos to you. I know that I was a little opened end with my
> > question and not stating that I had searched for stuff. But typically,
> > I do do my best to try and find / work things out 1st before imposing.
>
> > On Feb 6, 12:11 pm, Baz <[EMAIL PROTECTED]> wrote:
> > > I feel your pain man. Every time I search on the same topic I get
> > generic
> > > responses like "Override the paginate function"....
>
> > > Here seems to be an example:
> >http://www.littlehart.net/atthekeyboard/2007/12/11/cakephp-pagination...
>
> > > Haven't tested though. From the looks of it, you can replace the
> > > $this->findByName() with $this->query() (since they should return the
> > same
> > > structure) and also stick a count in ur statement to populate
> > paginateCount.
>
> > > See if it works.
> > > --
> > > Baz L
> > > Web Development 2.0http://WebDevelopment2.com/
>
> > > On Feb 6, 2008 10:41 AM, DragonI <[EMAIL PROTECTED]> wrote:
>
> > > > Thanks patcoll BUT I've already searched and read all of the threads
> > > > that I could find. Maybe my terminology is wrong manual query vs
> > > > custom query.
>
> > > > 1st link - is NOT using $this->query, i.e. Simple query - mine is more
> > > > complex
>
> > > > SELECT Bookmark.id, Bookmark.name, Bookmark.url, Bookmark.modified,
> > > > User.id, User.username
> > > > FROM bookmarks as Bookmark, users as User
> > > > WHERE Bookmark.user_id = $user_id
> > > > LIMIT .....
>
> > > > 2nd Link - was never answered - see Chad's posting
>
> > > > 3rd Link - read this but they all cover "Custom Query" using cake
> > > > $conditions.
>
> > > > On Feb 6, 11:09 am, patcoll <[EMAIL PROTECTED]> wrote:
> > > > > A search in this group helps:
>
> >http://groups.google.com/group/cake-php/browse_thread/thread/f990a459...
>
> >http://groups.google.com/group/cake-php/browse_thread/thread/d0cb3f77...
>
> > > > > For more tough issues:
>
> > > > >http://groups.google.com/group/cake-php/web/frequent-discussions
>
> > > > > On Feb 6, 10:28 am, DragonI <[EMAIL PROTECTED]> wrote:
>
> > > > > > I'm wondering if it's possible to use cake's pagination with a
> > manual
> > > > > > query ($this->query)?
>
> > > > > > I understand that I have to determine the offset and I have to get
> > the
> > > > > > total records myself. But I'm stumped because paginate is
> > expecting
> > > > > > the model name.
>
> > > > > > Thanks.
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---