ronnie88 Posted June 14, 2010 Share Posted June 14, 2010 Hello I am having a problem I have this code below that outputs all the data in the users table, but when I use DESC in rankid column it doesn't get the "full number" just the first number of that number. Here is what I am talking about http://crytell.com/roster.php that 35 should be at the top but I'm thinking its only going by first number how do I get it to go by all the number... thanks <html> <head><title>Clan Roster</title></head> <body> <?php include 'db.php'; $result = mysql_query( "SELECT * FROM users ORDER by rankid DESC" ) or die("SELECT Error: ".mysql_error()); $num_rows = mysql_num_rows($result); print "There are $num_rows members in VerX<P>"; print "<table width=650 border=1>\n"; while ($get_info = mysql_fetch_row($result)){ print "<tr>\n"; foreach ($get_info as $field) print "\t<td><font face=arial size=1/>$field</font></td>\n"; print "</tr>\n"; } print "</table>\n"; ?> </body> </html> <p style=" position: absolute; bottom: 0; left: 0; width: 100%; text-align: right;"><a href="http://www.Crytell.com">Roster Script Made By Vital</a></p> Quote Link to comment Share on other sites More sharing options...
ronnie88 Posted June 14, 2010 Author Share Posted June 14, 2010 nvm I got it mysql row had to be set as integer Quote Link to comment Share on other sites More sharing options...
JackAtack Posted June 14, 2010 Share Posted June 14, 2010 have you tried the natsort() function http://php.net/manual/en/function.natsort.php 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.