This probably comes under the 'newbie' category but i can't work out why this is happening and i have searched the groups...
I have two models - Users and Subscriptions - each with HABTM relationships with each other...
I want to collect all the Subscriptions for a particular User
this is my query:
$data = "">
and this is what the sql statement looks like:
SELECT `Subscription`.`id`, `Subscription`.`period`, `Subscription`.`name` FROM
`subscriptions` AS `Subscription` JOIN `subscriptions_users` ON
`subscriptions_users`.`user_id` = '113' AND
`subscriptions_users`.`subscription_id` = `Subscription`.`id` WHERE 1 = 1
the problem is that it's restricting records to those that match the
[`subscriptions_users`.`subscription_id` = `Subscription`.`id`] section
which i don't need. The query will work fine if i take this out... but
why is it there in the first place... and how can i get rid of this?
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---
- HABTM select problem Trevor Burton
- Re: HABTM select problem Ismael S. Kafeltz
- Re: HABTM select problem Trevor Burton
- Re: HABTM select problem rdoggsv
