i have a jokes database set up, and i want to automate links to categories, using the type field in my table.
when i run my query it shows the same category multiple times because of multiple jokes in that category.
is there anyway of only showing one instance of the category instead of many.
i'm currently using this code
$sql = "SELECT * FROM jokes";
// Request the text of all the jokes
$result = mysql_query($sql);
if (!$result) {
echo("<P>Error performing query: " .
mysql_error() . "</P>");
exit(); }
while ( $row = mysql_fetch_array($result) ) {
echo("<P><font size=1 face=Verdana color=#000080><b>" . $row["type"] . "</P>");
}
thanks in advance 😉