YourNameHere Posted April 2, 2010 Share Posted April 2, 2010 Hi, I am writing a blogging system. I want to have the ability to add tags to each post. I know this has been done before but I cant seem to find any reliable info on how to set it up. This is my problem. I need to keep the computation low (as much as possible) on the server. I have considered having a database cell populated with an array of tags. but that seems way too intense when searching for specific tags. Is that the only way (stupid question), is there a better way to search so I can index each tag? Link to comment https://forums.phpfreaks.com/topic/197307-organizing-a-tag-system-for-a-blog/ Share on other sites More sharing options...
oni-kun Posted April 16, 2010 Share Posted April 16, 2010 Hi, I am writing a blogging system. I want to have the ability to add tags to each post. I know this has been done before but I cant seem to find any reliable info on how to set it up. This is my problem. I need to keep the computation low (as much as possible) on the server. I have considered having a database cell populated with an array of tags. but that seems way too intense when searching for specific tags. Is that the only way (stupid question), is there a better way to search so I can index each tag? You may want to look at the provided FULLTEXT fields MySQL provides: http://dev.mysql.com/doc/refman/5.1/en/fulltext-search.html It shouldn't be too hard to implement with when ALTERing the table: http://www.pui.ch/phred/archives/2005/05/tags-with-mysql-fulltext.html Link to comment https://forums.phpfreaks.com/topic/197307-organizing-a-tag-system-for-a-blog/#findComment-1042851 Share on other sites More sharing options...
shedokan Posted April 30, 2010 Share Posted April 30, 2010 You can save tags as a VARCHAR string in the databse where each tag is seperated by a comma. Link to comment https://forums.phpfreaks.com/topic/197307-organizing-a-tag-system-for-a-blog/#findComment-1051246 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.