@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 <[email protected]> wrote:
> 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://book.cakephp.org/view/439/recursive
>
> On Jul 28, 5:48 am, Abraham Boray <[email protected]> wrote:
>
> > 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);
> >            $this->layout = 'ajax';
> >            $this->RequestHandler->setContent('json', 'text/javascript');
> >            $this->RequestHandler->respondAs('json');
> >            $this->Category->recursive = 2;
> >            $this->set('category', $this->paginate());
>
> > this code won't work!!!
> > Configure::write('debug', 0);
> >            $this->layout = 'ajax';
> >            $this->RequestHandler->setContent('json', 'text/javascript');
> >            $this->RequestHandler->respondAs('json');
> >            $this->set('category', $this->Category->read(null, 1));//here I'm
> > just getting the record with the id 1
>
> > it's  little confusing 4 me how can the first code work and the second
> > one not
>
> > regards
> > Abraham
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"CakePHP" 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