Skip to main content
Participating Frequently
Mar 30, 2008 8:42 PM UTC
Question

Recordset question involving table relationships

I set up two tables for a photo gallery. One for the gallery details and the other for photo details.

In my gallery index page, I want it to list the galleries available for choosing and a thumbnail for that gallery.

I made up the recordset that combined the galleryID that it is both tables and made a repeat region. I was hoping it would repeat teh gallery's (only 3 of them), but it ended up repeating all the photos (11 of them) down the page.

I know theres gotta be a quick fix for this in the sql right?
This topic is closed to new replies. Start a new post to keep the conversation going.

1 reply

JohnGJAuthor
Participating Frequently
Mar 30, 2008 9:14 PM UTC
Here's the Sql that I have now....:

SELECT galleries.galleryID, galleryTitle, galleryDate, galleryDesc, photos.thumbSrc
FROM galleries, photos
WHERE photos.galleryID = galleries.galleryID
ORDER BY galleryDate DESC
Translate