Re: INNER JOIN
http://groups.google.com/group/cake-php/browse_thread/thread/9f092441185a5b72/f32a7b86bc9ec5d1

I believe the TranslateBehavior uses an INNER JOIN if you're looking
for an example on how to dynamically change the binding although I
haven't actually used this myself yet.
http://api.cakephp.org/1.2/translate_8php-source.html#l00070

For GROUP BY I believe the norm is to use the conditions to pass in
your group by clause.
https://trac.cakephp.org/browser/branches/1.2.x.x/cake/tests/cases/libs/model/datasources/dbo_source.test.php#L1354

When has this not proved sufficient? Do you have a specific example?

On Feb 21, 6:51 pm, rtconner <[EMAIL PROTECTED]> wrote:
> I have no found a good way to do GROUP BY queries or INNER JOIN's in
> cake.
> Was wondering if any of you have come across these and how you handled
> them. I have not been able to do either of them in conjunction with
> the find() method in any normal way.Perhaps I am missing something?
> I'd love to find out if I am. Are these some sort of database specific
> constructs?
>
> With Group by, sometimes I can get away with appending $conditions[] =
> 'GROUP BY field'; annd the in addition to that, manually passing in
> the fields to find() and prepending DISTINCT to the id column.
>
> Inner Join I have seen zero support from in Cake. Any time I've wanted
> to Inner join I've had to write the query manually. You know,
> sometimes you just need to filter your queries based on two tables,
> not just your primary table.
>
> Any help on these issues would be greatly appreaciated. I know I am
> not the only one who has had trouble with them.
--~--~---------~--~----~------------~-------~--~----~
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