Cosizzle Posted July 7, 2009 Share Posted July 7, 2009 Hey guys, Alright so im kinda stuck with this query. Basically what im wanting to do is layout information in a column layout opposed to a row layout. So currently the query may look like this: sorry about the formatting id event_id detail_id event fname lname 2 5 1 Sporting Events bert reijne 1 1 1 Film Festival bert reijne 3 2 2 Concerts bert reijne 5 2 3 Concerts kira orr 7 4 3 Theatre kira orr 8 5 3 Sporting Events kira orr 6 3 3 Movies kira orr 4 1 3 Film Festival kira orr] As you can see, the event column (nudged over so may need to use your imagination) has a lot of redundent info. What im wanting to do is have something like: bert reijne Sporting Events Film Festival Concerts kira orr Concerts Theatre Sporting Events Movies Film Festival Can this be done? Currently my query looks like: SELECT de.id, de.event_id, de.detail_id, e.event, d.fname, d.lname FROM detail_event de INNER JOIN details d ON (d.id = de.detail_id) INNER JOIN events e ON (e.id = de.event_id) ORDER BY d.id Quote Link to comment https://forums.phpfreaks.com/topic/165082-grouped-layout/ Share on other sites More sharing options...
fenway Posted July 15, 2009 Share Posted July 15, 2009 well, you could group-concat the events.... Quote Link to comment https://forums.phpfreaks.com/topic/165082-grouped-layout/#findComment-875974 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.