Forums / General Questions / What is quick way to delete customers and orders data?

What is quick way to delete customers and orders data?

Locked

Started by doubletiger on 8 Oct 2006, 3:16 PM · Views: 3,563

Results 1 to 5 of 5
This thread is locked. New replies are disabled.
8 Oct 2006, 3:16 PM
#1
doubletiger avatar

doubletiger

Zen Follower

Join Date:
Apr 2005
Posts:
199
Plugin Contributions:
0

What is quick way to delete customers and orders data?

Hi,

I am going to set up 2nd site and will use all files and data from 1st site, but I need to delete all of customers and orders data from 2nd site, it has about 500 customers and orders, what is the quickest way to remove these data? I believe it can be done in MySQL but I don't know the code, can someone please help me?

Also, in future, I will add more products into 1st site, and need to copy over into the 2nd site, how can I add newly products only to the 2nd site without adding customers and orders details on to it?

Thank you very much for your help in advance! knowing these codes will save me a lot of time!

8 Oct 2006, 3:22 PM
#2
wickedklown avatar

wickedklown

Zen Follower

Join Date:
Aug 2005
Posts:
370
Plugin Contributions:
0

Re: What is quick way to delete customers and orders data?

doubletiger:

Hi,

I am going to set up 2nd site and will use all files and data from 1st site, but I need to delete all of customers and orders data from 2nd site, it has about 500 customers and orders, what is the quickest way to remove these data? I believe it can be done in MySQL but I don't know the code, can someone please help me?

Also, in future, I will add more products into 1st site, and need to copy over into the 2nd site, how can I add newly products only to the 2nd site without adding customers and orders details on to it?

Thank you very much for your help in advance! knowing these codes will save me a lot of time!

just take a copy of your products table, and dump it into your new database.

as for removing customers/orders you can manualy remove them from yoru mysql table, that is what i would do. simple CHECKALL and DROP would do. that way you have your customers and orders with nothing in them, but im not sure if there are some other tables that you should be looking at... such as Group pricing, ect/ect

hope this helps.

Super Orders2
Info at a glance
export email address
encrypted master pass
quick updates
recover carts
order Tracking
Tabbed products lite - admin edition
Hosted with sashbox.net <- best host around...

8 Oct 2006, 3:27 PM
#3
doubletiger avatar

doubletiger

Zen Follower

Join Date:
Apr 2005
Posts:
199
Plugin Contributions:
0

Re: What is quick way to delete customers and orders data?

Thank you for quick reply!

What tables in charge of customer and order data?

thanks for help!

8 Oct 2006, 3:57 PM
#4
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,515
Plugin Contributions:
176

Re: What is quick way to delete customers and orders data?

The database-schema documentation should be a help to you:
http://www.zen-cart.com/wiki/index.php/Developers_-_Database_Schema#Table_List_Ordered_by_Data

BE SURE TO DO BACKUPS IF YOU ARE PLANNING TO DELETE ANY DATA

If you are only deleting data, and not table-structure, using "truncate" instead of "drop" is advisable; otherwise you'll have to recreate the tables too.

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

8 Oct 2006, 4:10 PM
#5
doubletiger avatar

doubletiger

Zen Follower

Join Date:
Apr 2005
Posts:
199
Plugin Contributions:
0

Re: What is quick way to delete customers and orders data?

Thank DrByte, It is very useful, now I know which tables to delete from.

many thanks!