Forum Moderators: coopster
The problem is that every time a category is selected the drop down menu list it an additional time. For example if the list has: apples, pears, oranges. If pears is selected the drop down list will display: apples, pears, pears, oranges.
I'm still learning how to set up inquiries and am not sure how to word it to display UNIQUE records (or even if UNIQUE is the correct command to use). I know there is a way, but not sure what it is.
Any help is appreciated.
Code for MySQL:
-------------------------------------------
SELECT subjects.subject_id, subjects.subject, quotes.quote_id, quotes.subject_pk, quotes.author, quotes.quote
FROM subjects LEFT JOIN quotes ON (subjects.subject_id = quotes.subject_pk)
ORDER BY subjects.subject ASC
Code for Dynamic Drop Down List:
-------------------------------------------
<select name="subject" id="subject">
<?php
do {
?>
<option value="<?php echo $row_rsQuotes['subject_id']?>"><?php echo $row_rsQuotes['subject']?></option>
<?php
} while ($row_rsQuotes = mysql_fetch_assoc($rsQuotes));
$rows = mysql_num_rows($rsQuotes);
if($rows > 0) {
mysql_data_seek($rsQuotes, 0);
$row_rsQuotes = mysql_fetch_assoc($rsQuotes);
}
?>
</select>