Page 1 of 1

Grab 1 image from 2nd table per listing

Posted: Mon Sep 26, 2011 3:07 am
by Jim_Bo
Hi,

I have 2 tables.. one for listings and the other for photos.. I havnt been able to display one image per listing trying a query within a loop and also a table join.. Both options are briging back the same photo for all listings, even listings with no photos..

the link between the tables is "listingid"

How can I acheive this?


Thanks

Re: Grab 1 image from 2nd table per listing

Posted: Mon Sep 26, 2011 7:13 pm
by Eric!
You'll have to show us some code and your database structures. Is there a common key between the two tables? How are you linking the right photo to the right listing?