Hi guys,
I am trying to make a photo album system in php and mysql. I have this code for list all photo albums:
SELECT albums.*, count(pictures.id) AS countpic
FROM albums
LEFT JOIN pictures ON (albums.id=pictures.album_id)
GROUP BY albums.id
ORDER BY albums.date DESC");
I want to list title of photo albums with photo thumbnails (thumb_id si written in table pictures) and also with number of all pictures assigned to each albums.
Dont you know how to select thumb_id and also number of all pictures in album by using one select?
Thanks