eits Posted December 13, 2007 Share Posted December 13, 2007 I'm trying to output a list in PHP using the following MySQL statement: "SELECT DISTINCT quote_id, comp_id, date, description, item_type, status FROM quote"; However, I want to only show one of each from quote_id but it isn't working. Can anybody help????? Link to comment https://forums.phpfreaks.com/topic/81500-mysql-statement/ Share on other sites More sharing options...
fenway Posted December 13, 2007 Share Posted December 13, 2007 That's because you're using distinct instead of group by... but aren't all the other columns going to be different? Why do you have dupes? Link to comment https://forums.phpfreaks.com/topic/81500-mysql-statement/#findComment-413818 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.