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
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You use backticks (‘) to quote column names in SQL, not the normal single quote (‘).
Also, if you don’t do any kind of vetting or your input, that query is potentially vulnerable to an SQL injection.