Jump to content

Mysql Order BY


lalnfl

Recommended Posts

Lets say I have this query:

 

$sql = mysql_query("SELECT * FROM Member ORDER BY posts DESC LIMIT 10");

while ($get = mysql_fetch_array($sql)){

 

$row .= $get['id'];

$posts .= $get['posts'];

 

echo "$row - $posts<br />";

 

}

 

Lets say I have two of rows, with posts fields of 84 and 803. When it displays it, it grabs the 84 row first, when I want the bigger number 803 first. Is there a way to fix this?

Link to comment
https://forums.phpfreaks.com/topic/234521-mysql-order-by/
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.