1. Install Ecshop (open GD extension)
2. Use graphical interface tools such as phpMyAdmin to view data. (formerly with the command line, the main exercise code proficiency!) )
# Built Papaya Library
Create Database Mugua charset UTF8;
# Select Papaya
Use Mugua;
# Create a product table (the Created Word field and the same as in Ecshop, and one by one corresponds)
CREATE TABLE Goods (
goods_id int primary Key auto_increment,
CAT_ID smallint NOT NULL default 0,
Goods_sn Char (a) NOT null default ' ',
Goods_name varchar (+) NOT null default ' ',
Click_count mediumint unsigned NOT null default 0,
brand_id smallint NOT NULL default 0,
Goods_number smallint NOT NULL default 0,
Market_price Decimal (7, 2) NOT NULL default 0.00,
Shop_price decimal (7,2) NOT NULL default 0.00,
add_time int unsigned NOT NULL default 0
) CharSet UTF8;
# import EC commodity data into Papaya library
INSERT INTO Mugua.goods
Select
goods_id, cat_id, GOODS_SN, Goods_name, Click_count,
brand_id, Goods_number, Market_price,
Shop_price,
Add_time
From Shop.goods;
# Create a class table
CREATE TABLE category (
cat_id smallint primary Key auto_increment,
Cat_name varchar (+) NOT null default ' ',
parent_id smallint NOT NULL default 0
) CharSet UTF8;
# import EC-class data into Papaya library
INSERT INTO Mugua.category
Select
cat_id, Cat_name, parent_id
From Shop.category;
# Create a brand table
CREATE TABLE Brand (
brand_id smallint primary Key auto_increment,
Brand_Name varchar (+) NOT null default ' '
) CharSet UTF8;
# import EC brand data into Papaya library
INSERT INTO Mugua.brand
Select
BRAND_ID, Brand_Name
From Shop.brand;
Imitation Ecshop established Papaya Mall database (MySQL)