Jump to content

[SOLVED] Order ID History in MySQL Database - Where is it stored!


Recommended Posts

Hello,


I've deleted some recent orders from the Database but the Order ID doesn't continue from the last proper order.

Example :

Orders were at Order ID nº 110 but I have deleted some, so orders are now at Order ID nº 95

But when I do a new test order, the Order ID continues from nº 110.

Does anyone know whereabouts in the Database the Next Order ID is stored?


Best regards,

Guitar Player.

Link to comment
Share on other sites

The next autoincrement value is not stored in the database as data, it is part of the structure of the table. I think the following query should reset the autoincrement:

ALTER TABLE ps_orders AUTO_INCREMENT = 1

  • Like 2
Link to comment
Share on other sites

  • 1 year later...
  • 4 months later...
The next autoincrement value is not stored in the database as data, it is part of the structure of the table. I think the following query should reset the autoincrement:

ALTER TABLE ps_orders AUTO_INCREMENT = 1




Hi Rocky,

So if my next order id was 3887 ?
Do I put 3887 instead of the number 1 in your query?

Regards,

Mark.
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...