Does order by work with minus numbers because i wanna sort this range.
Points: 3 Goal Difference: 1
Points: 0 Goal Difference: - 1
Points: 3 Goal Difference: 4
Points: 0 Goal Difference: -4
I am sorting my points desc first and then goal difference.
Mysql Query:
PHP Code:
$sql = mysql_query("SELECT * FROM `manager__tables` WHERE `league` = '" . $league['name'] . "' ORDER BY `goal_difference` DESC, `points` DESC");
The range should look like this:
Points: 3 Goal Difference: 4
Points: 3 Goal Difference: 1
Points: 0 Goal Difference: -1
Points: 0 Goal Difference: -4
But it looks like This
Points: 3 Goal Difference: 4
Points: 3 Goal Difference: 1
Points: 0 Goal Difference: -4
Points: 0 Goal Difference: -1
|