TEENFRONT Posted December 2, 2008 Share Posted December 2, 2008 Hey I need to group and order mysql results and display them like this $row['group_name'] $row['group_text'] $row['group_text'] $row['group_text'] so this would look like Articles article1 article2 article3 Other Stuff stuff1 stuff2 stuff3 etc etc How do i go about doing this? Quote Link to comment https://forums.phpfreaks.com/topic/135203-group-and-order-results/ Share on other sites More sharing options...
DeanWhitehouse Posted December 2, 2008 Share Posted December 2, 2008 In the statement use GROUP BY ORDER BY e.g. SELECT * FROM users GROUP BY dob ORDER BY dob DESC Quote Link to comment https://forums.phpfreaks.com/topic/135203-group-and-order-results/#findComment-704167 Share on other sites More sharing options...
TEENFRONT Posted December 2, 2008 Author Share Posted December 2, 2008 Nice one, how do i then show the group by value above the results? So im grouping by article_type this could = "Site Articles", "Site Rules", "Other" etc Id need to show the article_type once, above the results. So Site Articles article1 article2 article3 Quote Link to comment https://forums.phpfreaks.com/topic/135203-group-and-order-results/#findComment-704180 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.