Hello there!
i have a table in a database with an auto incrementing feild and several other feilds one of which is called "name". The auto incrementing feild is called "id". Whenever i delete a row of the table, like this:
mysql_query("delete from staff where name='$name_to_remove'");
It seems delete the row but keep the value of id. For example:
If my table contains this: (the number in front is the id)
1 Bob Vila
2 Tony Danza
3 Dave Barry
and i delete Tony danza, the table will look like this:
1 Bob Vila
3 Dave Barry
If i delete Tony Danza, i want it to look like this:
1 Bob Vila
2 Dave Barry
Can anyone help me out?
Thanks in advance!
i have a table in a database with an auto incrementing feild and several other feilds one of which is called "name". The auto incrementing feild is called "id". Whenever i delete a row of the table, like this:
mysql_query("delete from staff where name='$name_to_remove'");
It seems delete the row but keep the value of id. For example:
If my table contains this: (the number in front is the id)
1 Bob Vila
2 Tony Danza
3 Dave Barry
and i delete Tony danza, the table will look like this:
1 Bob Vila
3 Dave Barry
If i delete Tony Danza, i want it to look like this:
1 Bob Vila
2 Dave Barry
Can anyone help me out?
Thanks in advance!