I have a table in my database, named “folders”.
How do I make a query that output everything but always list a specific ID first?
Lets use ID “12345” for the folder I want to be listed first.
I currently use this:
mysql_query("SELECT id, name FROM folders WHERE memberid='$session_userid' ORDER BY name ASC ") or die(mysql_error());
I tried to Google it, but nothing comes up and I’m totally blank 🙁
You just need to add another
ORDER BYclause for your special criteria. Any expression that will give one value for your “preferred” record and a second value for all the other records will work.