Hrm.
I have a similar sort of thing I'm trying to do, but I keep getting a "Supplied argument is not a valid MySQL result resource".
I'm doing the select, then doing a while statement and printing the results out. (I'm doing this through PHP.)
I have 2 tables: artist and album. artist contains the fields 'artistid' and 'artist', and album contains the fields 'albumid', 'artistid', and 'album'.
My query is this:
SELECT artist.artistid,artist,album,COUNT(artist.artistid)
WHERE artist.artistid = album.artistid
GROUP BY artist.artistid
And I get that error.
Any help is much appreciated! 🙂