I'm running mysql 5.0.19 on Windows 2k. I've got a database that holds band information in 1 table and song info in another. a band can have many songs in the songs table. I'm trying to extract a song from each band (along with other things i.e. pictures, location etc...) but I want only one song per band. my query (shortened for here) is:
$query="SELECT DISTINCT artist.id,songs.title FROM artist,songs WHERE songs.artist_id=artist.id ";
This however, produces a result with a band appearing twice.
Any ideas?
Thanks