Re: Simple GROUP BY ?

2008-01-22 Thread Marcin Jaworski
be enough in your situation, so you need to add an order value to findAll to order it by photo_id. On 20 Sty, 23:10, cronet [EMAIL PROTECTED] wrote: Hi, I'm siting here for about 2 hours and get it not work. I need a simple group by in an association. This is in my controller

Re: Simple GROUP BY ?

2008-01-22 Thread grigri
value to findAll to order it by photo_id. On 20 Sty, 23:10, cronet [EMAIL PROTECTED] wrote: Hi, I'm siting here for about 2 hours and get it not work. I need a simple group by in an association. This is in my controller: $this-Hotel-bindModel( array('hasMany

Re: Simple GROUP BY ?

2008-01-21 Thread Claudia
a group by - grouping by one column when selecting multiple columns often yields arbitrary results. Good luck Claudia On Jan 20, 11:10 pm, cronet [EMAIL PROTECTED] wrote: Hi, I'm siting here for about 2 hours and get it not work. I need a simple group by in an association. This is in my

Re: Simple GROUP BY ?

2008-01-21 Thread Marcin Jaworski
to add an order value to findAll to order it by photo_id. On 20 Sty, 23:10, cronet [EMAIL PROTECTED] wrote: Hi, I'm siting here for about 2 hours and get it not work. I need a simple group by in an association. This is in my controller: $this-Hotel-bindModel( array('hasMany

Re: Simple GROUP BY ?

2008-01-21 Thread cronet
by' in your query. I think that use of 'order by' would be enough in your situation, so you need to add an order value to findAll to order it by photo_id. On 20 Sty, 23:10, cronet [EMAIL PROTECTED] wrote: Hi, I'm siting here for about 2 hours and get it not work. I need a simple group

Simple GROUP BY ?

2008-01-20 Thread cronet
Hi, I'm siting here for about 2 hours and get it not work. I need a simple group by in an association. This is in my controller: $this-Hotel-bindModel( array('hasMany' = array( 'HotelDescriptionTranslation' = array