I promised myself I would not bother anyone, but I've scoured the web and spent countless hours pulling my hair. I have a list of properties that a realtor is selling. I originally had the main image in the same database as the property information, but now it is in the 'propertyimages' database.
I understand that "repeating a region" meant inserting the items you want to repeat in a do while ($row_rsProperties = mysql_fetch_assoc($rsProperties) ) loop. I also understand that the reason this doesn't work for the image is that the main database is moving up a row, but not the images database. Finally, I understand that adding another do while loop for the image won't work because that will loop through the entire catalog of images for each loop in the original repeat region.
Here's what I don't understand: I tried making the while statement while ($row_rsProperties = mysql_fetch_assoc($rsProperties) && $row_images = mysql_fetch_assoc($rsImages)) . That did not work. I tried adding a do while loop to the image and added if ($row_rsImages['propertyid'] == $row_rsProperties['propertyid']) so that it would only display the image that related to the property that the other do while loop was looping through. That didn't work.
I'm stumped. 'propertyid' in the images database is a foreign key to 'propertyid' in the properties database. Maybe you can help.