lol
lol

Reputation:

Can someone show me how I can let a member add their own tags to a question using PHP?

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

Answers (1)

TML
TML

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

Related Questions