Hi Guys,

I'm trying to figure out the best way to consolidate a record set of
photos, with each photo being given a certain 'position'. All in all,
my process works great, but I've run across a couple of instances
during multiple deletes and updates where I end up with gaps in the
order. I've posted on some other forums but haven't gotten much good
info. I'm hoping maybe someone here will have a quick answer. I just
need some direction...

For instance

1
2
3
5
8
11

I would need that consolidated down to

1
2
3
4
5

Each photo has a record in a database that tells what core record it
is associated with (aka a classified ad), the photo file name, url,
position, etc.

Here is a quick mockup of the table

Photos

photo_id
master_id
file_name
directory
position

I'm hoping for some kind of loop that runs until the max position is
equal to the number of photos.

Example, if the max position found is 11, but there are only 5
records, then it's obvious things aren't ordered correctly.


-- 
Open BlueDragon Public Mailing List
 http://www.openbluedragon.org/   http://twitter.com/OpenBlueDragon
 mailing list - http://groups.google.com/group/openbd?hl=en

 !! save a network - please trim replies before posting !!

To unsubscribe from this group, send email to 
openbd+unsubscribegooglegroups.com or reply to this email with the words 
"REMOVE ME" as the subject.

Reply via email to