Hi

In one controller add some like that

$uses = array('Post','User');

function myfunction() {

$this->set('users',$this->User->find('all'));
$this->set('users',$this->Post->find('all'));
}

then in router.php

        Router::connect('/', array('controller' => 'yourcontroller', 'action'
=> 'myfunction'));



On Mon, Dec 27, 2010 at 12:52 AM, Amit Badkas <amit.sanis...@gmail.com> wrote:
> Hi,
> Please follow http://book.cakephp.org/view/1528/Blog to build a basic blog
> application in CakePHP so that you will get familiar with CakePHP working.
> Amit Badkas
> PHP Applications for E-Biz: http://www.sanisoft.com
>
>
> On Sun, Dec 26, 2010 at 7:38 PM, Ahmed - CakePHP <ahmed.amo...@gmail.com>
> wrote:
>>
>> Hello Everybody,
>>
>> As you know, I am a beginner in CakePHP.
>> I trying to do a blog, simple blog, just as a training in how to build
>> a websites using CakePHP.
>>
>> I created few Controllers, such as (users, posts, comments and
>> categories).
>> Also I designed the Home Page, which is empty now.
>>
>> I want to know:
>> How can I display data from the Tables in the database in the Home
>> Page.
>>
>> For example:
>> - I want to display the latest posts.
>> also, may be, the latest registered users
>> or whatever
>>
>>
>> Can you please tell me how CakePHP deals with this.
>>
>>
>>
>> Thank you in Advance,
>> Ahmed
>>
>> Check out the new CakePHP Questions site http://cakeqs.org and help others
>> with their CakePHP related questions.
>>
>> 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
>
> Check out the new CakePHP Questions site http://cakeqs.org and help others
> with their CakePHP related questions.
>
> 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
>



-- 
Stefano Salvatori M.
http://stefano.salvatori.cl/

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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