i need to know not to show duplicates of a certain record within the column
example
question_title | question | reply (column names)
question1 | bla bla |
question1 | | reply
when i show my question, i dont want to see question1 twice
here is my code
Code: Select all
mysql_select_db($database_cnpa, $cnpa);
$query_forum = "SELECT DISTINCT * FROM forum ORDER BY `date` DESC";
$query_limit_forum = sprintf("%s LIMIT %d, %d", $query_forum, $startRow_forum, $maxRows_forum);
$forum = mysql_query($query_limit_forum, $cnpa) or die(mysql_error());
$row_forum = mysql_fetch_assoc($forum);