Re: Weired cakePHP behavior!!

2009-07-28 Thread Miles J
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

Re: Weired cakePHP behavior!!

2009-07-28 Thread Abraham Boray
@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

Re: Weired cakePHP behavior!!

2009-07-27 Thread phpcurious
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

Re: Weired cakePHP behavior!!

2009-07-27 Thread Miles J
$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')? --~--~-~--~

Re: Weired cakePHP behavior!!

2009-07-27 Thread Abraham Boray
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

Re: Weired cakePHP behavior!!

2009-07-27 Thread Miles J
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

Weired cakePHP behavior!!

2009-07-27 Thread Abraham Boray
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);