Re: Arranging lists

From: Date: Tue, 01 May 2001 02:34:34 +0000
Subject: Re: Arranging lists
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-50935@lists.php.net to get a copy of this message
You'll have to assign some sort of order to them using an integer tag column or something similar... and then order by that when you select.... That's my best suggestion. -Brian http://www.zaam.com ""Peter Houchin"" <peterh@vfsa.com.au> wrote in message news:NFBBJNAGDIPHLCGPBLKDIEGLCEAA.peterh@sunrentals.com.au... > 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 (#50935) next »