网络营销电子商务研究中心

网络营销电子商务研究中心 (https://www.0058.net/index.php)
-   ZenCart (https://www.0058.net/forumdisplay.php?f=69)
-   -   Zen Cart 常用SQL命令 (https://www.0058.net/showthread.php?t=5271)

Renton 2015-09-29 04:45 AM

Zen Cart 常用SQL命令
 
# 清空商品分类、商品、属性
TRUNCATE TABLE categories;
TRUNCATE TABLE categories_description;

# 清空商品以及属性
TRUNCATE TABLE media_clips;
TRUNCATE TABLE media_manager;
TRUNCATE TABLE media_to_products;
TRUNCATE TABLE media_types;
TRUNCATE TABLE music_genre;
TRUNCATE TABLE product_music_extra;
TRUNCATE TABLE product_types_to_category;
TRUNCATE TABLE products;
TRUNCATE TABLE products_attributes;
TRUNCATE TABLE products_attributes_download;
TRUNCATE TABLE products_description;
TRUNCATE TABLE products_discount_quantity;
TRUNCATE TABLE products_notifications;
TRUNCATE TABLE products_options;
TRUNCATE TABLE products_options_types;
TRUNCATE TABLE products_options_values;
TRUNCATE TABLE products_options_values_to_products_options;
TRUNCATE TABLE products_to_categories;
TRUNCATE TABLE record_artists;
TRUNCATE TABLE record_artists_info;
TRUNCATE TABLE record_company;
TRUNCATE TABLE record_company_info;

# 清空推荐商品
TRUNCATE TABLE featured;

# 清空促销商品
TRUNCATE TABLE salemaker_sales;

# 清空特价商品
TRUNCATE TABLE specials;

# 清空团体价格
TRUNCATE TABLE group_pricing;

# 清空厂家及资料
TRUNCATE TABLE manufacturers;
TRUNCATE TABLE manufacturers_info;

# 清空客户评论
TRUNCATE TABLE reviews;
TRUNCATE TABLE reviews_description;

#清空前台注册用户 订单 历史订单等信息 慎用
TRUNCATE TABLE `address_book`;
TRUNCATE TABLE `admin_activity_log`;
TRUNCATE TABLE `counter`;
TRUNCATE TABLE `counter_history`;
TRUNCATE TABLE `customers`;
TRUNCATE TABLE `customers_basket`;
TRUNCATE TABLE `customers_info`;
TRUNCATE TABLE `orders`;
TRUNCATE TABLE `orders_products`;
TRUNCATE TABLE `orders_status_history`;
TRUNCATE TABLE `orders_total`;
TRUNCATE TABLE `paypal`;
TRUNCATE TABLE `paypal_payment_status_history`;
TRUNCATE TABLE `paypal_session`;
update `products_description` set `products_viewed` = '0' WHERE `products_viewed` > '0';
update `products` set `products_ordered` = '0' WHERE `products_ordered` > '0';


All times are GMT +8. The time now is 09:08 PM.

Powered by vBulletin Version 3.8.7
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.