Hi Thanks for that, I have checked out your blog article, and I have
also played around with the standard code, and I have found that if I
use

'Message.message_status_id' => '<= 2'

It works... So not sure how that does the job actually, but seems to
be working.. Is there a reason why the paginate doesn't accept an SQL
Query string like the findAll etc does? Seems like that would be a
logical addition to it..

Thanks

Patrick

On Apr 26, 10:05 am, "Chris Hartjes" <[EMAIL PROTECTED]> wrote:
> On Fri, Apr 25, 2008 at 9:30 PM, AussieFreelancer
>
>
>
> <[EMAIL PROTECTED]> wrote:
>
> >  Right you are! :D Man I'm going crazy... passed the object to the view
> >  using $data = $this->paginate('Message'); and it started working :D
> >  Sorry for the hassle, thanks for the help :)
>
> >  On a slightly side note, when it comes to adding conditions, I need
> >  the following condition:
>
> >  'Message.user_id = ' . $this->Auth->user('id') . ' AND
> >  Message.message_status_id IN (1, 2)'
>
> >  How do I do this using the paginate variable? I have tried to pass it
> >  as the scope, and the userid works fine, but I cant seem to get the
> >  message_status_id part working. I need to use either IN() or an OR
> >  statement, but can't see how it is done... Is this possible?
>
> I have a posting on my blog about doing custom pagination, which is
> exactly what you need.
>
> --
> Chris Hartjes
> Internet Loudmouth
> Motto for 2008: "Moving from herding elephants to handling snakes..."
> @TheKeyBoard:http://www.littlehart.net/atthekeyboard
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to