You should see what I’m trying to do here but it’s not working
$getquery = "SELECT *
FROM highscore
WHERE score >= '$score'
ORDER BY score ASC
LIMIT 6
UNION
SELECT *
FROM highscore
WHERE score < '$score'
ORDER BY score DESC
LIMIT 5";
mysql_error() returns: “improper usage of ORDER BY and UNION”.
Try:
See the comments to my answer on the related question.
Or consult the fine manual.