Here is my PHP Query, but it doesn't seem to order the results. Everything else works fine.
SELECT *
FROM `main`
WHERE `user_legacy` LIKE '%".$name."%'
ORDER BY 'user_legacy' DESC LIMIT ".$limit
You use backticks (') to quote column names in SQL, not the normal single quote (').
ORDER BY `user_legacy` DESC
Also, if you don't do any kind of vetting or your input, that query is potentially vulnerable to an SQL injection.
ORDER BY 'user_legacy'