A
Anonymous
Guest
how to view a record in a List/Menu type (not text field)? i got the List/Menu already got recordset inside, but when it show up, i want it to show certain record first, but how? the current code for the List/Menu is:
<select name="category" id="category">
<?php
do {
?>
<option value="<?php echo $row_rsCategory['CategoryName']?>"><?php echo $row_rsCategory['CategoryName']?></option>
<?php
} while ($row_rsCategory = mysql_fetch_assoc($rsCategory));
$rows = mysql_num_rows($rsCategory);
if($rows > 0) {
mysql_data_seek($rsCategory, 0);
$row_rsCategory = mysql_fetch_assoc($rsCategory);
}
?>
</select>
this code is to list all the records in a table, but i want it to show certain record first, how? thanks
<select name="category" id="category">
<?php
do {
?>
<option value="<?php echo $row_rsCategory['CategoryName']?>"><?php echo $row_rsCategory['CategoryName']?></option>
<?php
} while ($row_rsCategory = mysql_fetch_assoc($rsCategory));
$rows = mysql_num_rows($rsCategory);
if($rows > 0) {
mysql_data_seek($rsCategory, 0);
$row_rsCategory = mysql_fetch_assoc($rsCategory);
}
?>
</select>
this code is to list all the records in a table, but i want it to show certain record first, how? thanks