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????? Quote 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? Quote Link to comment https://forums.phpfreaks.com/topic/81500-mysql-statement/#findComment-413818 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.