You can use : var $uses = array('model1', 'model2'); in the
controller, that will give you access to the corresponding table using
$this->Model1 and $this->Model2 ...
You can use then $this->data['Model1] and $this->data['Model2'] in
your views..

Note that is the model are "linked", such as Model1 hasMany Model2,
you can use $this->Model1->Model2 ....

Hope this help

On Apr 24, 3:02 pm, 浪漫様 <[EMAIL PROTECTED]> wrote:
> Dear mates,
> I was wondering how to display information from different tables on a
> same controller/view.
> For example... i want a control panel, that manages different sections
> of my website, and i want to show the last 5 entries in each table on
> the initial menu [ as a preview ].
> When the login is succeed at "www.mysite.com/cpanel/admins/login" goes
> to "www.mysite.com/cpanel/admins/index" and here i want to show the
> last 5 records of each table on my DB for maintenaice... "users",
> "categories", "items".... but i want them centralized at
> "www.mysite.com/cpanel/admins/index" instead of:
>
> "www.mysite.com/cpanel/users/index"
> "www.mysite.com/cpanel/categories/index"
> "www.mysite.com/cpanel/items/index"
>
> Also... how to limit CakePHP to take only 5 records [ "LIMIT (x,5)" on
> mysql ] ?
> Thank you very much!
> Best Regards,
>
> Rohman


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" 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