Oh, the clue train just pulled in. You're trying to use a variable
when setting the class var $paginate. You can't do that. What you can
do, though, is adjust the $paginate var in your method/action.
So, if you have other stuff to put in $paginate ('order', 'limit',
etc.) go ahead and do so. Then in your method, do:
$this->paginate['conditions'] = array('Group.site_id' => $variable);
Obviously, if you already have other conditions, you'll want to append them:
$this->paginate['conditions'][] = array('Group.site_id' => $variable);
On Thu, Feb 19, 2009 at 2:07 PM, Stu <[email protected]> wrote:
>
> Well, this is interesting:
>
> var $paginate = array(
> 'conditions' => array(
> 'Group.site_id' => $variable
> )
> );
>
> this no longer gives me a missing " ) " parse error, but now I get
> this:
>
> Parse error: parse error in C:\web-dev\www\TelHD\controllers
> \group_details_controller.php on line 9
>
> and line 9 would be this bad boy: 'Group.site_id' => $variable
>
> On the other hand if I try this:
>
> var $paginate = array(
> 'conditions' => array(
> 'Group.site_id' => 28
> )
> );
>
> It works great...
>
> No doubts the problem comes from my variable now.
>
>
>
>
> >
>
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---