Help with php and mysql
Posted: Wed Feb 26, 2003 3:31 pm
In my mysql database users I have a table with 3 fields, ID, fName, lName. The ID field is what everything is sorted by and its auto_increment. Now lets say I fill up this table with these values:
0 Kris Ennay
0 Bob Barker
0 Tommy Hildude
The ids would be 1, 2, and 3. Now lets say I want to delete Tommy from the table so I get rid of his row. Now the data in table is:
0 Kris Ennay
0 Bob Barker
I then add a row, and that rows id turns out to be id 4?? Is there I way I can get the previous rows ID then increment it one and make that the new rows ID?
Thanks for all help and advice provided.
0 Kris Ennay
0 Bob Barker
0 Tommy Hildude
The ids would be 1, 2, and 3. Now lets say I want to delete Tommy from the table so I get rid of his row. Now the data in table is:
0 Kris Ennay
0 Bob Barker
I then add a row, and that rows id turns out to be id 4?? Is there I way I can get the previous rows ID then increment it one and make that the new rows ID?
Thanks for all help and advice provided.