Jump to content

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

 

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.