Jump to content

Order by des Not working


Monk3h

Recommended Posts

Why isnt this brining back 10 people from the players database ordered most to least Chatlines. :S

 

<?php
$tsel = mysql_query("select * from players order by chatline desc limit 10");
while ($top = mysql_fetch_array($tsel)) {
	print "<tr><td>$top[user] ($top[id])</td><td>$top[chatline]</td></tr>";
}
?>

 

 

It brings back the data needed.. It just dosnt order it by chatlines..

Link to comment
https://forums.phpfreaks.com/topic/102618-order-by-des-not-working/
Share on other sites

Everytime some one says somthing in chat it changes there chatlines by +1

 

I want to display the top 10 chatty people.. It should display it by Chatlines but instead its ordered like this.

 

Lines in Chat

Name (ID) Chat Lines

Mooie (59) 21

SaRawr (89) 2

Monk3h (2) 18

andis0311 (22) 0

Dunk3r (1) 0

 

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.