Does this work?

$this->Item->setSource($locationId.'_items');

Cheers,
Adam

On Jun 19, 12:43 pm, VisionIzoizo <mauro.tr...@googlemail.com> wrote:
> Hi, I have one big table named 'items'. It's split into many views,
> according to a custom defined criteria (location). I want to access
> these views dynamically, I tried the 'useTable' property, but it
> doesn't work at all. This is my controller action:
>
>         function listLocation($locationId)
>         {
>                 $this->Item->useTable = $locationId.'_items';
>                 $this->Item->recursive = 0;
>                 $this->set('items', $this->paginate());
>         }
>
> My views are named according to the location Id, i.e. 1_items,
> 2_items, ...
>
> Is there any way to make this work?
>
> Thanks in advance.
--~--~---------~--~----~------------~-------~--~----~
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 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to