Sorry maybe to make it more clear

In the chapter models in the manual you have following complex
condition (http://manual.cakephp.org/chapter/models)

array
("or" =>
    array
    (
        "Post.title" => array("First post", "Second post", "Third
post"),
        "Post.created" => "> " . date('Y-m-d', strtotime("-2 weeks"))
    )
)

And now i want to group the result by Post.title. How should i do that.


Thanks in advance

Cheers





On Nov 15, 5:38 pm, "floepi" <[EMAIL PROTECTED]> wrote:
> hmm well that works if i have a string as the condition but not the
> array. I tried appending the group bit to the conditions array but that
> won't work.
>
> Array
> (
>     [Job.jobName] => LIKE bc%
>     [0] => group by User.userName
> )
>
> Thanks
>
> Phil
>
> On Nov 14, 10:15 pm, "bingo" <[EMAIL PROTECTED]> wrote:
>
> > hi floepi,
>
> > for grouping you can do this
> > $conditions = 'Job.location = testGroupby Col';
> > $this->Job->findAll($condition);
>
> > you can set debug to 3 and see the actually query that is being issued
> > by Cake
> 
> > regards,
> > Bingo


--~--~---------~--~----~------------~-------~--~----~
 You received this message because you are subscribed to the Google Groups 
"Cake PHP" 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