renutz Posted September 28, 2012 Share Posted September 28, 2012 Hi, I found the following problem. 1. Create an order 2. Create an invoice associated with this order 3. Make sure that this invoice has items (table tblinvoiceitems) 4. Delete the order Now the problem: 1. It deletes everything except the items on tblinvoiceitems 2. If you are using InnoDB and then restarts the MySQL, InnoDB resets the internal auto-incremental indexes to the latest value 3. If you create a new order and a new invoice, the invoice items of this new invoice will get mixed with the items of the "deleted" invoice Suggestion for correction: Delete tblinvoiceitems as well If you need any further assistance, plz let me know. tks RW 0 Quote Link to comment Share on other sites More sharing options...
othellotech Posted October 1, 2012 Share Posted October 1, 2012 You don't want the tblinvoiceitems deleted unless you want it to recreate the deleted invoice. Next invoice number is stored in the DB, has nothing to do with auto increment as far as I can see 0 Quote Link to comment Share on other sites More sharing options...
renutz Posted October 1, 2012 Author Share Posted October 1, 2012 I appreciate. Tks. 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.