I have no problem getting negative numbers to be ordered from highest to lowest ... Here is my code and CREATE query for your reference:
CREATE TABLE `test` (
`score` INT(10) NULL
)
COLLATE='latin1_swedish_ci'
ENGINE=InnoDB;
select * from test order by score desc;
And a dump from my database:
INSERT INTO `test` (`score`) VALUES (10);
INSERT INTO `test` (`score`) VALUES (5);
INSERT INTO `test` (`score`) VALUES (1);
INSERT INTO `test` (`score`) VALUES (-1);
INSERT INTO `test` (`score`) VALUES (-5);
INSERT INTO `test` (`score`) VALUES (-10);
INSERT INTO `test` (`score`) VALUES (-11);
INSERT INTO `test` (`score`) VALUES (7);
Hope this helps ...
source
share