I been looking but I cant find any way to do this. I’m trying to order sql result by username but with specific name first, i dont knwo if this is possible, here is the code:
SELECT A.user_id, A.username, B.user_colour FROM likes AS A, users AS B
WHERE sta_id=$sta_id AND A.user_id = B.user_id
ORDER BY username ASC;
the specific name that i want to show first let call it “testing”.
You can place a case statement into the
ORDER BYwhich effectively assigns a lower value to the specific name than everything else. That is then followed by a regularusernameorder for the rest to be alphabetical ASC