Hi!

I wonder if it is possible to make some kind of auto_increment in php that first changes all the id values of the rows so that they are increasing 1-x without jumping over any numbers.. I mean if there are 5 rows in a database and the id values are

1
2
5
6
7

because I've removed 3 and 4.. I'd want a php script to change those to

1
2
3
4
5

when I put in a new object, and then put in the id 6 for the new object. So it would result in

1
2
3
4
5
6

instead of

1
2
5
6
7
12

Which is a pretty irritating thing that the mysql auto_increment does if you remove some stuff and put some stuff in, etc..

Could someone help me with the script for that?

Cheers,
Artheus