Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

How to reset order numbers?


RojanUK

Recommended Posts

Hello,

 

I've just ran a few tests with the ordering from my web site. Obviously the test orders I placed were assigned order numbers. However, even though the orders have been deleted, those order numbers do not reset back to the beginning.

(For example: the first real order placed will get order number 4).

 

Can anybody tell me how to reset the order number counter?

 

Thanks,

RojanUK

Link to comment
Share on other sites

  • 2 weeks later...
Run the following code on the database via phpMyAdmin.

 

ALTER TABLE `orders` AUTO_INCREMENT = 0;

Could I use the same code to start the order numbers at 1001? For example:

ALTER TABLE 'orders' AUTO_INCREMENT = 1000;

Or do I need a different piece of code for this?

 

Thanks,

RojanUK

Link to comment
Share on other sites

Could I use the same code to start the order numbers at 1001? For example:

ALTER TABLE 'orders' AUTO_INCREMENT = 1000;

Or do I need a different piece of code for this?

 

Thanks,

Evidently a different piece of code. I've just tried it and it gives me an error. Could somebody tell me how I can set the order numbers to begin at 1001?

 

Thanks,

RojanUK

Link to comment
Share on other sites

Fascinating. The above URL says:

 

alter table osc_orders auto_increment = 1000;

 

which is basically the code I've been using. (with the small change in the orders table name.) But the code I've been using didn't work - which is why I posted this in the first place - and the strangest thing is that this one does. Beats me why. Anyway, it's working now.

 

Thanks!

RojanUK

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...