How to get database data in cakephp

how to get specific data in database using specific id and show index.ctp using Cakephp

Have you even finished the tutorial?
Get the data from the controller using the ORM and pass the result to the view.

yes i did but specific user login then who logged in it only get user data I want
it is my problem.
so how do i
public function index()
{
$idd=$this->Auth->user(‘id’);
echo $idd;
$users = $this->paginate($this->Users); //this show all data
$this->set(compact(‘users’));
}
but i want only suppose idd=1 then only show who id 1 get record only show.

how to solve?

Why are you trying to paginate users if you’re only getting one user anyways?
Just do this and you’re pretty much done:

$this->set('user', $this->Auth->user());

Thanks.
I did below tricks,
$id=$this->Auth->user(‘id’);
$query = $this->Users->findById($id);
$this->set(compact(‘query’));
that’s it …
it works.
Thank you for ,
“$this->set(‘user’, $this->Auth->user());”
that’s I remember.
Thank you for support.