title: MYSQL+PHP How to update auto-incremented id when delete row in table?
body: <pre><code> $q = "DELETE FROM newfiles WHERE id=$id LIMIT 1;";
   $q .= "SET @i=0;";
   $q .= "UPDATE newfiles SET id=(@i +:=1)";
  </code></pre>
  
  <p>Ex:- I have 6 Rows</p>
  
  <p><strong>1
  2
  3
  4
  5
  6</strong>
  when i delete Row 4 
  i want the row 5 to become 4 and 6 to 5</p>