joined:Sept 11, 2009
I am trying to put together a number of photo albums. The photo albums show up as images on a page using a repeat region. When you click on the photo album image that will show the photos in the album.
I have set up 2 tables Photos and PhotoAlbums. Each record in the Photos table has an PHotoAlbumID to link it to the photo album.
What I want is to show the first image in the album for each photo album cover. So if the first imageID is 6 then image 6 should show up on the photo albums page as the Album cover if you understand what I mean?
This is the SQL statement I have at the moment but I know it won't do what I want:
"Select * FROM PhotoAlbums left join Photos on PhotoAlbums.AlbumID = Photos.AlbumID ORDER BY Photos.AlbumID asc"
I wonder can anyone enlighten me on what statement I could be putting here?