Well you could also use the magic methods.
$this->Category->findById($id);
--~--~-~--~~~---~--~~
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 unsubscrib
@Miles J : actually I dnt want to grab all the records ,just a
specific category with a known ID.
@phpcurious:Thanks , actually I guess that's the problem
"recursion" ,ill check the link out and see .
regards
Abraham
On Jul 28, 1:55 am, phpcurious wrote:
> I noticed that in the frist part of yo
I noticed that in the frist part of your codes you indicated that you
needed a recursion on the pagination, while the other, you only used
read function which reads only a specific row with no recursion.
That's just my guess where you are having trouble with.
To know more about recursion, http://b
$this->paginate() will grab all records based on your controllers
$paginate property.
$this->read() will update the $data property in your model with data
based on ID, and then return the $data.
Which are you trying to retrieve?
Why not just do $this->Category->find('list')?
--~--~-~--~
Retrieve categories records ,very simple isn't it !
but the code seems it doesn't work !
On Jul 27, 10:59 pm, Miles J wrote:
> Well both those functions do completely opposite things, what exactly
> are you trying to retrieve?
--~--~-~--~~~---~--~~
You received th
Well both those functions do completely opposite things, what exactly
are you trying to retrieve?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"CakePHP" group.
To post to this group, send email to cake-php@googlegr
I'm doing ajax call on some models ,and the 1st code seems to be
workin' , but the second one is not !
I'm simply retrievin' data from database and print it in JSON format :
this is my view :
echo $javascript->object($category);
this code work perfectly
Configure::write('debug', 0);