title: How do I store image sequence changes to a mysql database with php
body: <p>I am trying to build a photo organization table and am looking for advice and/or examples of how to save the display sequence of photos to a database. 
  I'm using php and mysql</p>
  
  <p>Example: 
  If I have 10 photos in an album and decide to change the sequence of images, so I move a photo from seq 2 to seq 7, then the sequence changes to the following.</p>
  
  <p>1, 2, 3, 4, 5, 6, 7, 8, 9, 10 Original Sequence</p>
  
  <p>1, 7, 2, 3, 4, 5, 6, 8, 9, 10 New Sequence</p>
  
  <p>How do I tell the database that the sequence column for all the affected rows has changed? ...in one operation. </p>
  
  <p>Do I change multiple rows in the db at once?  Can I limit to just the affected rows</p>
  
  <p>the photos table currently has   "rowID, sequence, URL...."</p>