Jump to content

mysql ORDER BY


xyn

Recommended Posts

Hi,
I'm not sure if this is right so i tohught i'd get some advice from it. I want to search my members databse and list them in a table, Which has been done. But i want to list them in a particular order. I want to order them like:
rank(admin, super-mod, mod) and then the members by usernames [b]ASC[/b]ending.

is this right:
$sql = mysql_query("SELECT user,rank,rep,mem_mail FROM accounts ORDER BY rank(admin,super-mod,mod),user ASC");
Link to comment
https://forums.phpfreaks.com/topic/14670-mysql-order-by/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.