Ok, so let's say I have a mysql database table with two columns, one for id and one for password. If I have three rows of data, and the id values go from 1 to 3, and I delete row 3 and then create another row of data, I will see id = 4 instead of id = 3 in the newly created row. I know that this is related to the value of automatic growth, but I was wondering if I can add code to the php file, which will automatically reset all identifier numbers that you start with id = 1, and go to the last id number in steps of 1 after deleting a row?
My goal is to create a form in which the user enters a password, and the system will match the password with the password in the database. If there is a match, the row with the matching password will be deleted, and the column of identification numbers will be reordered so that id numbers are not skipped.
Update. I create a rotating banner advertising system by setting a random number from 1 to 4 in a variable so that the php file gets a random declaration from id = 1 to id = 4 using a random number variable.If the random number turns out to be 3 and id = 3 does not exist , there will be a space in the banner line. If there is a way around big gaps in this situation, please tell me. thank you in advance
source share