On Thu, Feb 19, 2009 at 12:42 PM, Stu <[email protected]> wrote:
>
> Hi,
>
> I have an array with Permissions which contains the "id" of the
> "Posts" that will be allowed for that user in particular
>
> Now I'm using this line here to filter out it's contents through
> 'paginate'.
>
> var paginate = array('conditions' =>array('Group.site_id = VALUE'));
>
> I can easily put a hardcoded value such as 28 and it will work fine,
> but I was wondering how would you give a variable to VALUE
>
> I tried the following:
>
>
> var paginate = array('conditions' =>array('Group.site_id = '.
> $variable .''));
>
> and:
>
> var paginate = array('conditions' =>array('Group.site_id ' =>
> $variable
> ));

What is the parse error? That last one should be fine. Does this work?

var paginate = array('conditions' =>array('Group.site_id ' => 28));

Perhaps the error is due to something else.

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to