Email Website
Contents
Search:

Home > Security and Tech > Clear Test Orders from the Database

Clear Test Orders from the Database

Site administrators often want to remove test orders from the DB before going live. Rows will need to be removed from 4 tables to completely remove the test orders. The following SQL statements will clear those orders out. Make sure you have a good backup of your database before making changes to it.
  1. In the eRatex admin console, go to Configuration > Run SQL.

  2. Type the following commands and click Submit. Make sure to replace lastordernumbertokeep with the order number you want to use.

    DELETE FROM Orders WHERE OrderNumber < lastordernumbertokeep
    DELETE FROM Orders_CustomCart WHERE OrderNumber < lastordernumbertokeep
    DELETE FROM Orders_KitCart WHERE OrderNumber < lastordernumbertokeep
    DELETE FROM Orders_ShoppingCart WHERE OrderNumber < lastordernumbertokeep

     


    These statements assume that you want to remove ALL orders before "lastordernumbertokeep." If that is not the case, you may need to edit these statements.


Actions
Print This Article
Bookmark
Email This Article
Previous Article
Next Article