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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.