新闻中心

magento源码程序快速清理数据库中的所有产品目录

作者 / 无忧主机 时间 2018-01-30 20:08:12

magento源码程序是一款非常专业的国外开源电子商务系统,国内翻译为麦金斗,它可以方便为我们建设一个企业级的购物平台系统。它是一款比较“年青”的开源电子商务平台,就是因为这样,很多国内的站长朋友使用还是比较少的,一般都是在php空间中做外贸站点用的比较多,所以很多教程都不是那么凝聚在一起的所以遇到了很多的问题站长朋友就不清楚如何的去操作了,今天无忧主机小编带来的福利也是比较简单的。就是如何快速的清理数据库中所有的产品目录。 一提到快速这两个字的话,站长朋友可能会想到一键就完成这个操作,无忧主机小编这里确实是要告诉站长朋友们的是就是一键就可以完成,要该怎么操作呢? 首先是要进入到我们的数据库,会员中心--主机管理--控制面板-数据库管理,然后点击登录phpmyadmin,使用数据库用户名与数据库密码进行登录即可。 登录进去之后,点击数据库名,然后点击SQl,把以下SQL语句复制进去执行即可:

SET foreign_key_checks=0;

 

TRUNCATE TABLE `catalog_category_entity`;

 

TRUNCATE TABLE `catalog_category_entity_datetime`;

 

TRUNCATE TABLE `catalog_category_entity_decimal`;

 

TRUNCATE TABLE `catalog_category_entity_int`;

 

TRUNCATE TABLE `catalog_category_entity_text`;

 

TRUNCATE TABLE `catalog_category_entity_varchar`;

 

TRUNCATE TABLE `catalog_category_product`;

 

TRUNCATE TABLE `catalog_category_product_index`;

 

INSERT INTO `catalog_category_entity`(`entity_id`,`entity_type_id`,`attribute_set_id`,`parent_id`,`created_at`,`updated_at`,`path`,`POSITION`,`level`,`children_count`) VALUES (1,3,0,0,'0000-00-00 00:00:00','2009-02-20 00:25:34','1',1,0,1),(2,3,3,0,'2009-02-20 00:25:34','2009-02-20 00:25:34','1/2',1,1,0);

 

INSERT INTO `catalog_category_entity_int`(`value_id`,`entity_type_id`,`attribute_id`,`store_id`,`entity_id`,`value`) VALUES (1,3,32,0,2,1),(2,3,32,1,2,1);

 

INSERT INTO `catalog_category_entity_varchar`(`value_id`,`entity_type_id`,`attribute_id`,`store_id`,`entity_id`,`value`) VALUES (1,3,31,0,1,'Root Catalog'),(2,3,33,0,1,'root-catalog'),(3,3,31,0,2,'Default Category'),(4,3,39,0,2,'PRODUCTS'),(5,3,33,0,2,'default-category');

如图所示: 1 就这样我们就完美的搞定了这个,是不是很简单呢?不妨需要的站长朋友试一试吧。

本文地址:https://www.51php.com/magento/26226.html

1
1
1
1
1
1
1

客户服务热线

0791-8623-3537

在线客服