Newbie needs help with arrays and database for Tagging

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
david swain
Forum Newbie
Posts: 6
Joined: Sat Feb 10, 2007 5:01 am

Newbie needs help with arrays and database for Tagging

Post by david swain »

Hello


Im working on adding tagging to the item i am building. I have the following tables: blog and tags. the blog tables has a field called 'tags' which stores an comma delimited string of numbers. These numbers correspond to the ID of the tags tables which has the following feilds:

ID
tags
count
timestamp.

What i want to do is when i log out of the site, a script polls the tags field of the blog table and updates the count. I'm just not sure how to do it (newbie to all this). Now i presume i explode the tags feild of the blog table with a coma to get the id values, but i need to do this for every record in the table.

Further more i need to get a running total of the id and if it has changed update both the count and timestamp fields of the tags table.

Or am i doing this all wrong ? Like i say i am new to this...

thanks in advance

David
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

What is the count field used for?
Post Reply