dominod Posted December 16, 2010 Share Posted December 16, 2010 Hi there Im just wondering how I can prevent the query from outputing the same name twice in a query? Example: If I query and it outputs: Name- Age- Location- Roger 23 New York Eric 29 Miami Eric 48 Boston Is there a way to make it recognize that it already outputed "Eric" then make it skip the next eric so it just outputs: Name- Age- Location- Roger 23 New York Eric 29 Miami ? Thanks alot guys Quote Link to comment https://forums.phpfreaks.com/topic/221855-how-can-i-prevent-multiple-outputs-from-a-query/ Share on other sites More sharing options...
Adam Posted December 16, 2010 Share Posted December 16, 2010 Use a group by: (...) GROUP BY name Quote Link to comment https://forums.phpfreaks.com/topic/221855-how-can-i-prevent-multiple-outputs-from-a-query/#findComment-1148058 Share on other sites More sharing options...
dominod Posted December 16, 2010 Author Share Posted December 16, 2010 Thank you soooooo much! Quote Link to comment https://forums.phpfreaks.com/topic/221855-how-can-i-prevent-multiple-outputs-from-a-query/#findComment-1148093 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.