hey im writing a user system, and in the admin panel i need the option to ONLY show usernames selected by the Admin (from a dropdown box)
i have the Letter being submitted by a $_POST command, but I'm not sure how to order the results based on that $_POST submission
thanx for your help
Order MySQL results by first letter
Moderator: General Moderators
-
thunderbox
- Forum Newbie
- Posts: 13
- Joined: Wed Mar 07, 2007 4:06 pm
- John Cartwright
- Site Admin
- Posts: 11470
- Joined: Tue Dec 23, 2003 2:10 am
- Location: Toronto
- Contact:
- aaronhall
- DevNet Resident
- Posts: 1040
- Joined: Tue Aug 13, 2002 5:10 pm
- Location: Back in Phoenix, missing the microbrews
- Contact:
To only return results starting with a specified letter:
Code: Select all
SELECT * FROM `table` WHERE `column` LIKE 'a%' ORDER BY `column`;- John Cartwright
- Site Admin
- Posts: 11470
- Joined: Tue Dec 23, 2003 2:10 am
- Location: Toronto
- Contact:
-
thunderbox
- Forum Newbie
- Posts: 13
- Joined: Wed Mar 07, 2007 4:06 pm