hatrickpatrick Posted August 15, 2007 Share Posted August 15, 2007 I'm making a site where people can upload effect pedal settings for songs. So I have a list of pedals, lets say I have 2 in the list, wah 1 and wah 2. I'm trying to count how many songs use each pedal. Problem is, there could be 2 different settings for the same pedal (dependng on how fast you want to play it, etc). So if we have 2 songs, song 1 and song 2, and they each have 2 settings, my num_rows query will return 4. However, I only want it to return 2 since I'm counting songs, not individual effects. Is there any way to do this? SELECT * FROM effects WHERE song='$song_id' AND pedal='$pedal_id' Is the query I have now. Link to comment https://forums.phpfreaks.com/topic/65010-ignoring-duplicate-sql-results/ Share on other sites More sharing options...
Orio Posted August 15, 2007 Share Posted August 15, 2007 http://www.phpfreaks.com/forums/index.php/topic,154856.0.html Orio. Link to comment https://forums.phpfreaks.com/topic/65010-ignoring-duplicate-sql-results/#findComment-324447 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.