Arranging lists

From: Date: Tue, 01 May 2001 00:10:43 +0000
Subject: Arranging lists
Groups: php.general 
Request: Send a blank email to php-general+get-50934@lists.php.net to get a copy of this message
Hi, I've got a select box that gets vaules from a DB, now I want these value to be displayed in a certain order that's NOT relating to their id nor in alphabetical order .. can some one suggest a way this might be done?? At present my select box looks like this : <form name="select" method="post" action="machine.php"> <select name="system" size="1"> <?php $query ="SELECT DISTINCT system FROM 1machine ORDER BY system"; $result = mysql_query($query); while($row = mysql_fetch_array($result)){ echo '<option value="'.$row[system].'">'.$row[system].'</option><br>'; } ?> </select> <input type="submit" name="select" value="select"> </form> Peter Houchin peterh@sunrentals.com.au ========================================================= _____ __ /\ /_/_/_\ / |_/ \ /_/_/_ __ __ __ __ / \ \_/_/_\ /_/ /_/ /_/ /_/ \ _ / ___\_\_\/ /_/_/_/ /_//\/_/ \_/ \/\_/ \_//_/_/ /_/_/_/ /_/ \/_/ v ________ ________________________________________ /_/_/_/_/ /_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/ /_/_ _/_/ ______ __ __ /_/ ____ __ ______ /_/_/_/_/ /_/_/_/ /_/ /_/ /_/ /_/\_\ /_/ /_/_/_/ /_/ \_\ /_/ _/ /_//\/_/ /_/ /_/__\_\ /_/___ _\_\_\ /_/ \_\/_/_/_/ /_/ \/_/ /_/ /_/ \_\/_/_/_//_/_/_/ ========================================================= Telephone : (03) 9329 1455 Facsimile : (03) 9329 6755 ************* We rent the dot in .COM! **************

« previous php.general (#50934) next »