I have a preventative issue I would like to remedy. I have a 'repeat region' that has most the data from my 'property' database and the images from the 'images' database. To fix the problem of having the images repeat in the same order as the rest of the data, I added this line to my code: <?php if ($row_rsProperties['propertyid'] != '2') {$row_rsImages = mysql_fetch_assoc($rsImages);} ?> where '2' is the first 'primary key' in the table. I've realized that this function won't work when this property has been deleted in the future. I'd like to replace '2' with whatever is the first 'primary key.' Is there a function to return this data (and will it mess up the mysql_fetch_assoc function)?