mysql auto increment jumping 1

mysql auto increment jumping

Everytime there is a failed entry the AURO_INCREMENT increases.

Here is what the above code is Doing:
1. It’s creating a variable called AURO_INCREMENT and setting it to 0.
2. It’s creating a while loop that will run as long as the value of AURO_INCREMENT is less than 5.
3. Inside the while loop, it’s asking the user to enter a number.
4. If the number is not divisible by 7, it prints a message and increases the value of AURO_INCREMENT by 1.
5. If the number is divisible by 7, it prints a message and breaks out of the loop.
6. Outside the while loop, it prints a message that the loop has ended.

Similar Posts