Results 1 to 10 of 10
Mar 24, 2011, 19:04 #1
- Join Date
- Mar 2011
- 0 Post(s)
- 0 Thread(s)
Renumber row in sequential order using PDO
lI have a table with an ID column which is the Primary key and auto incremented. I have another column named ORDER that contains a number. This number is used to define the order in which the row data is displayed on a page.
When I delete a row, the ORDER column will have a gap and I would like to renumber the subsequent rows to remove the gap. ie:
I want to renumber the rows:
When I insert a new row I want the ORDER row to be given the NEXT sequential number
How do I do that using PHP PDO?