Let me say upfront that although I'm not new to PHP, I am only now
discovering databases and SQL, and I'm doing it through Cake. I was
also surprised that I couldn't find an answer already published, but
here goes:

To translate my question into the standard example, I have the
standard articles HABTM tags. In this example, I have a number of tags
associated with each article. All working, all good.

I want to get the related articles. That is, I want a result that will
give me all the articles that share a tag with this article. As there
is more than 1 tag assigned, I want the result for all tags, and
ideally uniques only. I am presuming that there is a much smarter way
than a foreach loop in the controller (searching one tag at a time).

I am hoping for a light bulb moment here, as I can't believe that it's
complicated - it's been such plain sailing to this point...

Thanks,
Jeremy

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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