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 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 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! 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
Archived
This topic is now archived and is closed to further replies.