Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Reset Order #


Guest

Recommended Posts

Is there any way that we can reset order # back to 1?

 

THanks in advance.

 

AngelAir

 

Since the orders table is on an autoincrement on the orders_id I would do a drop table and create the table fresh.

 

If you want to get rid of all orders and start fresh from orders_id 1 ...

 

You need to do this on all the orders_ tables except orders_status

 

The best way to get the structures is to open phpMyAdmin and select your MySQL database.

 

Click on Export ...

Highlight all the orders_ tables EXCEPT orders_status

Click on:

Structure

Drop Table

Uncheck:

Everything under Data

Click on:

Save to file

Save the file where you can find it again

 

Now to reload the orders_ tables

Click on:

SQL ...

Browse (find the file you just saved)

Click Go ...

 

This will reload the empty orders_ databases and the first order with start with 1

 

NOTE: Always backup your MySQL database before making changes like this in case you need to put it all back together again.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...