0

Hello Everybody,
i m facing problem that how i increment the values, first when i set the ID_No as auto increment in php/mysql after the debugging when i delete 2 no; row from the table next time the ID_No starts from the 3rd one row and basically i dont wana it,
So if any one know that whats the alternate solution to increment the values by using coding of any language (C++, PHP etc), to increment the values through looping whenever i wana to delete any row next time it start automatically from the last previous number.


Thanks in advance...

2
Contributors
1
Reply
2
Views
7 Years
Discussion Span
Last Post by saiprem
0

Hello Everybody,
i m facing problem that how i increment the values, first when i set the ID_No as auto increment in php/mysql after the debugging when i delete 2 no; row from the table next time the ID_No starts from the 3rd one row and basically i dont wana it,
So if any one know that whats the alternate solution to increment the values by using coding of any language (C++, PHP etc), to increment the values through looping whenever i wana to delete any row next time it start automatically from the last previous number.


Thanks in advance...

We can do by getting the max ID_No from the database and increment it by one. Make sure that your database table should not have auto_increment for ID_No column

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.