Is there an easy, non-JOIN way, to perform this task?
mysql_query("select DISTINCT artist, id from ringtones where artletter='A'");
Result should be: all artist values without duplicates with corresponding id.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You can get one row per artist, with all the IDs for that artist on one line by doing this:
If you want only the first
idfor each artist, try this:(you could get the last
idby usingMAXinstead ofMIN)If you want the first or last row (based on
id) for that artist, you can do a groupwise max as described in that link.