t_machine Posted November 3, 2006 Share Posted November 3, 2006 hi, how would I group in a table but display the rest of the result for each.example:username | groupmembershipsam | 2jessica | 5sam | 7paul | 5how can i group username but display all the groupmembership that they are in? As you can see "sam" is in the table twice but in two different groupmembership.Thanks :) Quote Link to comment Share on other sites More sharing options...
gluck Posted November 4, 2006 Share Posted November 4, 2006 post the details of the table Quote Link to comment Share on other sites More sharing options...
fenway Posted November 4, 2006 Share Posted November 4, 2006 That depends on what you want back -- you could use a GROUP_CONCAT(), or use a subquery to get the groups, and then pull back details. Quote Link to comment Share on other sites More sharing options...
t_machine Posted November 5, 2006 Author Share Posted November 5, 2006 Thank you both :) Yeah, I decided to run a sub query to get back all the groups data. 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.