Imitation Ecshop established Papaya Mall database (MySQL)

Source: Internet
Author: User

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)

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.