Never mind...i figured it out.

Thanks.

Dave

-----Original Message-----
From: Dave Maharaj :: WidePixels.com [mailto:d...@widepixels.com] 
Sent: June-08-09 3:30 PM
To: cake-php@googlegroups.com
Subject: RE: Find similar


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:bally.z...@gmail.com]
Sent: June-08-09 2:11 PM
To: cake-php@googlegroups.com
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<d...@widepixels.com> 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 cake-php@googlegroups.com
To unsubscribe from this group, send email to 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to