Reputation:
What I mean is that I want logged in members to add their own tags to any given question they see fit. So far, I have got the following script that calls the tags entered into the database which is below.
<?php
function tag_info() {
$result = mysql_query("SELECT * FROM tags GROUP BY tag ORDER BY count DESC");
while($row = mysql_fetch_array($result)) {
$arr[$row['tag']] = $row['count'];
}
Upvotes: 0
Views: 104
Reputation: 12976
Based on what you've put here, it sounds like your database schema needs some love. I recommend looking at this article, which addresses a number of the most common 'tag schemas' and their benefits, drawbacks, and performance characteristics.
Upvotes: 1