Re: find() returning different array structures.

2009-06-15 Thread Carlos Gonzalez Lavin
Ya, I was just summing up your explanation =) 2009/6/15 Marcelo Andrade > > > 2009/6/14 Marcelo Andrade > >> > >> On Sun, Jun 14, 2009 at 5:46 PM, centr0 wrote: > >> > (..) > >> > the view breaks after this, now i know its simply fixed my question is > >> > is it normal that the array structure

Re: find() returning different array structures.

2009-06-15 Thread Marcelo Andrade
> 2009/6/14 Marcelo Andrade >> >> On Sun, Jun 14, 2009 at 5:46 PM, centr0 wrote: >> > (..) >> > the view breaks after this, now i know its simply fixed my question is >> > is it normal that the array structure changes when calling find('all) >> > vs. find('first')? >> >> Sure it is. In this case

Re: find() returning different array structures.

2009-06-15 Thread Carlos Gonzalez Lavin
Since you are telling cake to only get you the first result with find('first'), it doesnt feel the need to add number to the resulting row as it would to the rows that a find('all') returns 2009/6/14 Marcelo Andrade > > On Sun, Jun 14, 2009 at 5:46 PM, centr0 wrote: > > (..) > > the view breaks

Re: find() returning different array structures.

2009-06-14 Thread Marcelo Andrade
On Sun, Jun 14, 2009 at 5:46 PM, centr0 wrote: > (..) > the view breaks after this, now i know its simply fixed my question is > is it normal that the array structure changes when calling find('all) > vs. find('first')? Sure it is. In this case, there will be: $x= $this->Model->find('all'); $y=

find() returning different array structures.

2009-06-14 Thread centr0
i'm still learning the inner workings of cakephp and have been confused for a while now. heres a simple view: when i call: $books = $this->Book->find('all', array( 'fields' => array ('isbn', 'title'),