dmccabe Posted January 18, 2010 Share Posted January 18, 2010 Can anyone tell me why regardless of which way I order the info retreived the database the "Scanner" always comes out on top? <?php $sql = "SELECT ASSET_TYPE_ID, ASSET_TYPE_NAME FROM tblassettype ORDER BY ASSET_TYPE_NAME ASC"; $result=mysql_query($sql); while ($row=mysql_fetch_array($result)) { $id=$row["ASSET_TYPE_ID"]; $name=$row["ASSET_TYPE_NAME"]; echo "<option VALUE=\"$id\">".$name."</OPTION>"; } ?> Contents of table: 1 Monitor 2 Laptop 3 PC 4 Printer 5 Switch 6 Router 7 Scanner 8 Server 9 KVM 10 Tape Drive Yet regardless of if the table is sorted ASC or DESC, the item 7 Scanner is either very top or very bottom of list? Quote Link to comment Share on other sites More sharing options...
Buddski Posted January 18, 2010 Share Posted January 18, 2010 Do you have any other characters in front of it (ie a space)? Quote Link to comment Share on other sites More sharing options...
dmccabe Posted January 18, 2010 Author Share Posted January 18, 2010 D'oh thanks Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.