tags:

views:

85

answers:

1

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'];
  }
+1  A: 

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.

TML