Reset invoice numbers in database

Hi guys,

I have been looking here but cant find any recent blog about this.

I need to reset my invoice numbers in the database.

Can anybody tel me what to do in the database, because i looked into table cscart-shipments and in the tab SQL i put in “ALTER TABLE cscart_shipments AUTO_INCREMENT =1” and hit start, but it did not work at all…

I also emptied al order tables where the orders were found, but still nothing, did i miss something?

Thanks for any help on this.

Nobody can help me out here?

You want to edit the database table named cscart_orders.

If you are using myPHPAdmin to edit the database, you can view the table data, then click the Operations tab and change the number labeled auto increment in the table operations form. The number you enter here will be the next value assigned automatically.

This is risky if you already have orders in the table. If you reset the auto increment to a value that is lower than your existing order numbers, you will eventually lose all the existing orders and end up with corrupted data (imagine an order is just placed, it is assigned an order ID that already existed, overwrote the order data, but all the shipping data still exists in other tables. The order will appear to be shipped already… or worse. The customer who placed the original order still has that order id in their history too. You are asking for a real data nightmare.)