Jump to content

Little Help With ORDER BY and DESC


ronnie88

Recommended Posts

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>

Link to comment
https://forums.phpfreaks.com/topic/204709-little-help-with-order-by-and-desc/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.