I have the following query:
$query = "SELECT - AS -
FROM -
WHERE ID = '".$id."'
ORDER BY 'PRIMARY' DESC
LIMIT ".$start.", ".$limit."";
However, for some reason the query is always returned in ascending order, even though I have told it to order by descending.
I’m not exactly sure why this is happening. When I do the query via phpMyAdmin, it returns correctly, but the PHP query is not listing the results in descending order.
note: the -‘s in the query are names from my database that I have snipped. They are filled with the correct names in the actual query.
Use backticks instead of single quotes near
PRIMARY