Adam, you genius, it works perfectly, thanks a lot! Cheers to you man, Mauro
On Jun 19, 2:32 am, Adam Royle <a...@sleekgeek.com.au> wrote: > 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 manyviews, > > according to a custom defined criteria (location). I want to access > > theseviewsdynamically, 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()); > > } > > > Myviewsare 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 -~----------~----~----~----~------~----~------~--~---