[SOLVED] Limit DATE to 1 instance in dropdown list/menu
Posted: Sun Aug 15, 2004 11:34 am
I'm working on an administrative area where the client can access order information placed online.
One of the selections is to view orders by date. If there are multiple orders for a given date, how do I limit each date to appearing only once?
My current code - which lists the same date multiple times - is:
One of the selections is to view orders by date. If there are multiple orders for a given date, how do I limit each date to appearing only once?
My current code - which lists the same date multiple times - is:
Code: Select all
<select name="selectDate">
<?php
do {
?>
<option value="<?php echo $row3['order_date']?>"><?php echo $row3['order_date']?></option>
<?php
} while ($row3 = mysql_fetch_assoc($result3));
$rows = mysql_num_rows($result3);
if($rows > 0) {
mysql_data_seek($result3, 0);
$row3 = mysql_fetch_assoc($result3);
}
?>
</select>