MySql Query to return number of photos in each album
- by GivenPie
MY table is set up like this, all I need to do is call a query to my Photos table.
I have PhotoID as the primary key and GalleryID as the foreign key to Gallery. How can I could the number of unique PhotoID's for each multiple GalleryIDs.
So to speak there are may duplicate GalleryIDs because there are many photos in a gallery. So I just need to could the number of unique PhotoIDs associated with that GalleryID.
Can it be done in one query?