Cool! Thanks looks good.

I have modified it a bit to suit my needs but 1 question not so much
related...

My results returns the same post sometimes 2 or 3 times in the array. If I
am viewing a post tagged with TagA TagB TagC it will return PostA 2 times if
it was tagged with TagA and TagB 

Seems like its finding post with TagA , TagB, TagC so what I wantto do is
remove duplicate results before sending to the view. How can I remove based
on the Post.id?

I do not have an array to compre against for array_diff_key()

Ideas? Thoughts? Suggestions?

Dave

-----Original Message-----
From: brian [mailto:[email protected]] 
Sent: June-08-09 2:11 PM
To: [email protected]
Subject: Re: Find similar


Have a look here:

http://bakery.cakephp.org/articles/view/quick-tip-doing-ad-hoc-joins-in-mode
l-find

On Sun, Jun 7, 2009 at 3:37 PM, Dave Maharaj ::
WidePixels.com<[email protected]> wrote:
> Wondering where to start on something like this.
>
> Post HABTM Tags
>
> Viewing a Post it may be tagged with "environament' , "earth" , "eco". 
> I want to add to the Post view a "Related Posts" section so how do I 
> get Posts that were also tagged with all or any of the tags 
> "environament' , "earth" , "eco".
>
> Thanks,
>
> Dave
> >
>



--~--~---------~--~----~------------~-------~--~----~
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