drewjoh Posted September 16, 2008 Share Posted September 16, 2008 Hi guys, Is it possible (I imagine it surely is somehow) to sort by a field that is just referenced in a table? For example: I have the following tables: 'users' with the fields: user_id, group_id, name, username 'groups' with the fields: group_id, name Is there a way to form a query that will display all the users, but sorted by their group name alphabetically? I can obviously, easily sort by their group_id, but that doesn't benefit me much! (Hope I explained that well enough!) Quote Link to comment Share on other sites More sharing options...
drewjoh Posted September 16, 2008 Author Share Posted September 16, 2008 Figured it out, just had to use a JOIN and then sort by the field in the JOINed table. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.