RojanUK Posted March 24, 2005 Share Posted March 24, 2005 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 More sharing options...
Guest Posted March 24, 2005 Share Posted March 24, 2005 Run the following code on the database via phpMyAdmin. ALTER TABLE `orders` AUTO_INCREMENT = 0; Link to comment Share on other sites More sharing options...
RojanUK Posted March 24, 2005 Author Share Posted March 24, 2005 That solved it! Thanks once again, Alpha Ray! You rock! :thumbsup: RojanUK Link to comment Share on other sites More sharing options...
Guest Posted March 24, 2005 Share Posted March 24, 2005 That solved it! Thanks once again, Alpha Ray! You rock! :thumbsup: <{POST_SNAPBACK}> Roger that, Roger! :) Link to comment Share on other sites More sharing options...
RojanUK Posted April 1, 2005 Author Share Posted April 1, 2005 Run the following code on the database via phpMyAdmin. ALTER TABLE `orders` AUTO_INCREMENT = 0; <{POST_SNAPBACK}> 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 More sharing options...
RojanUK Posted April 1, 2005 Author Share Posted April 1, 2005 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, <{POST_SNAPBACK}> 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 More sharing options...
♥Vger Posted April 1, 2005 Share Posted April 1, 2005 The answer is here: http://www.oscommerce.info/kb/osCommerce/Tips_and_Tricks/31 Vger Link to comment Share on other sites More sharing options...
RojanUK Posted April 2, 2005 Author Share Posted April 2, 2005 The answer is here: http://www.oscommerce.info/kb/osCommerce/Tips_and_Tricks/31 Vger <{POST_SNAPBACK}> 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 More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.