The development of electronic mall and the creation of database table

Source: Internet
Author: User

1. Foreground function
---home
---brand page
---product details
---product review management
---shopping cart management
---billing page
---user login and exit
---personal center management
---order submission page

2. Background function
---landing system
---user management
---classification management
---brand management
---commodity management
---order status Management
---order Management

-----------------------------------------------------------------------------------------

Creation of database tables:

User table:
User Management Table
---ID
---username
---password
---email//email
---regtime//Registration time
---admin//permission level

Shopclass:
Product Classification Table
---ID
---product_class//commodity type
---brand_class//commodity brands

Brand
Product Information Sheet
---ID
---name
---shopclass_id
---price//commodity prices
---stock//commodity inventory
---upself//whether shelves
---image//Product image

Order
Order Form
---ID
---ordernum//order number
---user_id
---brand_id
---price//trading Prices
---time//trading hours
---orderstatus//Order Status
---rec_name//Recipient
---rec_tel//Recipient contact information
---rec_address//Recipient address

Comments
Product Review Form
---ID
---content//comments
---evaluate//rating
---user_id
---brand_id


-----------------------------------------------------------------------------------------
SQL statements:

CREATE table if not exists user (
ID int unsigned NOT NULL auto_increment,
Username varchar () NOT NULL,
Password varchar () NOT NULL,
Regtime int NOT NULL,
Admin tinyint not NULL,
Email varchar (NOT NULL),
Primary KEY (ID)
);

CREATE table if not exists shopclass (
ID int unsigned NOT NULL auto_increment,
Product_class varchar () NOT NULL,
Brand_class varchar () NOT NULL,
Primary KEY (ID)
);

CREATE table if not EXISTS brand (
ID int unsigned NOT NULL auto_increment,
Name varchar (NOT NULL),
stock int NOT NULL,
Price float is not NULL,
Upshelf tinyint NOT NULL,
Image varchar (+) is not NULL,
shopcclass_id int NOT NULL,
Primary KEY (ID)
);

CREATE table if not exists order1 (
ID int unsigned NOT NULL auto_increment,
Ordernum varchar () NOT NULL,
USER_ID int NOT NULL,
brand_id int NOT NULL,
Price float is not NULL,
time int NOT NULL,
Orderstatus varchar () NOT NULL,
Rec_name varchar () NOT NULL,
Rec_tel varchar () NOT NULL,
rec_address varchar (+) NOT NULL,
Primary KEY (ID)
);

CREATE table if not exists comments (
ID int unsigned NOT NULL auto_increment,
Content text,
Evaluate int NOT NULL,
USER_ID int NOT NULL,
brand_id int NOT NULL,
Primary KEY (ID)
);

-------------------------------------------------------------------------------------------------------------

Directory structure:

|--index.php//Skip to front page

|--public//Public file

|--common//function library
|--config.inc.php//Public config file
|--functions.php//function library file

|--images//Public pictures

|--CSS//Public style

|--uploads//Public image upload

|--js

|--admin//Backstage

|--index.php//Backstage site Home

|--login//Background login
|--login.php//Background landing page
|--check.php//Login Verification page
|--logout.php//Background Exit page

|--public//Public Resources directory

|--CSS//Background CSS File

|--images//Backstage Picture

|--header.php//Page Header

|--menu.php//Navigation bar page

|--main.php//Backstage Home

|--acl.php//Site background rights

|--user//user Management

|--index.php

|--add.php

|--insert.php

|--edit.php

|--update.php

|--del.php

|--shopclass//Commodity classification management

|--index.php

|--add.php

|--insert.php

|--edit.php

|--update.php

|--del.php

|--brand//Product information

|--index.php

|--add.php

|--insert.php

|--edit.php

|--update.php

|--del.php

|--order//Order Management Information
|--index.php

|--status.php

|--update.php

|--comments//Product Review

|--index.php

|--add.php

|--insert.php

|--edit.php

|--update.php

|--del.php

|--home//Reception
|--public//Public resources

|--CSS//Front desk CSS

|--images//Front desk pictures

|--header.php//Front desk navigation

|--footer.php//Front Desk Bottom page

|--acl.php//Site Receptionist Privileges

|--index.php//Front Page

|--brandlist.php//Brand list page

|--shopinfo.php//Product Details page

|--shopcar//Shopping cart Management

|--addcar.php//Add to Cart

|--clearcar.php//Empty shopping cart

|--opcar.php//Manage Shopping cart

|--account.php//Billing page

|--ordercommit.php//Submit Order

|--center.php//Personal Center

|--user
|--register.php//Registration
|--login.php//Login
|--check.php//Verification
|--logout.php//exit

The development of electronic mall and the creation of database table

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.