Re: returning unique value

2006-11-01 Thread Dan Buettner
Ross - In your query you can add a "LIMIT" clause to get just one row in the result, a la: SELECT * FROM thumbnails where gallery=$id LIMIT 1 If you want the "first" image, say the one with lowest ID number, you could do this: SELECT * FROM thumbnails where gallery=$id ORDER BY id LIMIT 1 Dan

Fw: returning unique value

2006-11-01 Thread Ross Hulford
I have atable which contains the number and name of the photo galleries and 'thumnails' the images that are conenected to the galleries. I am trying to create a 'pick a gallery' screen where it selects all the galleries and then output the first thumbnail image associated with that gallery.

returning unique value

2006-11-01 Thread Ross Hulford
I have two tables galleries which contains the number and name of the photo galleries and 'thumnails' the images that are conenected to the galleries. I am trying to create a 'pick a gallery' screen where it selects all the galleries and then output the first thumbnail image associated with t