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...

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

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.