I've an app that load some result from a mysql database. I'm doing this connection with php using this query:
$query = mysql_query("SELECT * FROM question ORDER BY id DESC LIMIT ".$intLimit)
and this is ok.
Now i want the same query but for example i want that the object with id = 7000 stays on top.
i tried:
$query = mysql_query("SELECT * FROM question ORDER BY id WHEN id = '7000' then 0 else 1 LIMIT ".$intLimit)
but this query return nothing.
how solve it? Thanks
EDIT 1
using this:
SELECT * FROM question ORDER BY case when id = '7000' then 0 else 1 end
the result is 7000, 6999, 6998... without showing the new question
but i want something like 7000, 7100, 7099, 7098...