I don't really need them sorted. Just one photo displayed in the PAL.
ex.
page loads, photo #1 is displayed
page loads again, photo # 2 is displayed
page loads again, photo #3 is displayed
if there are a total of three photos in the list and photo #3 was the last one, the next time the page is loaded it starts all over again with photo #1 and so forth.
I was thinking of a loop. There would be a check to see if there was a variable set, if not then pull the first photo in the list. If it was set, add 1. Query the data base. Count the number of rows. If the number is more than the sum of rows..... pull the first phot, if not then grab that number pic. But then there's the case of a deleted row and how to pass the variable from page to page. um... You know what? Maybe it's more trouble than it's worth.
I know what I want, but I don't think there's an easy way to do it. Thanks anyway. I'll mull over it a while and get some other things done. Maybe something will go off in my head.