Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

Archive /

Our old forums are still available as a read-only archive.

Moderators: martimiz, Sean, biapar, Willr, Ingo, simon_w

Need to Compare Contents of Table with Existing Blog Entry Tags


Reply


677 Views

Avatar
Garrett

Community Member, 245 Posts

28 August 2008 at 7:20am

Hi,

I have a challenge in my Blog module that I'd really like some code help on.

For my blog, I have created a Categories table in the database which contains the Category Name and the Tag which corresponds to that Category. These Tags are unique (e.g., Category Name "Media & PR" would correspond to the Tag "mediaandpr") so that they are not mixed up with regular tags entered by authors for individual posts.

Now, in my Tag Cloud (and also in the posts themselves), I would like to EXCLUDE these Tags from the display, as they are misleading.

So, how can I COMPARE the Tags in this DB table with the Tags in the PHP Tags collection? I obviously need some sort of nested loop, but this isn't going to work in the template. I want to display only the Tags which do NOT appear in this table ("Categories").

Any help anyone could offer on this would be greatly apperciated.

Thanks,
Garrett