Wisdom Podcast Hanshunping php video Tutorial notes zend.framework. 15th. Integrated Application-Shopping cart 1

Source: Internet
Author: User
Preach Wisdom Podcast Hanshunping php video Tutorial notes zend.framework. 15th. Integrated Application-Shopping cart 1
Zend.framework. 15th. Integrated Application-Shopping cart 1


My Shopping cart function module, demand analysis.


A landing system

b Browse products, pagination

C Add the item to the shopping cart and curd the shopping cart.

D Place Order

e email, notify each other, use Phpmail


Interface


Design Database


--User table

CREATE TABLE Users

(

ID int PRIMARY KEY,

Name varchar (+) NOT null default ' ',

PWD char (+) NOT null default ' ',

Email varchar (+) NOT null default ' ',

Tel varchar (+) NOT null default ' ',

Grade tinyint unsigned NOT NULL default 1



)


Insert into users values (100, ' Andy Lau ', MD5 (123456), [email protected]. com ', ' 1394343432 ', 1);

Insert into users values (101, ' Jacky ', MD5 (123456), [email protected]q.com ', ' 1394343472 ', 1);




MD5 check, save character is 32 bits. Fixed length, so use char


--Commodity table (Product category table-level two level three level)


CREATE TABLE book

(

ID int primary KEY auto_increment,

Name varchar (+) NOT null default ' ',

Author varchar (+) NOT null default ' ',

Publishhouse varchar (+) NOT null default ' ',

Price float is not null default 0,

Nums int NOT NULL default 10



)

--Shopping Cart table


CREATE TABLE Mycart

(

ID int primary KEY auto_increment,

UserID int,

BookID int,

nums int unsigned,

cardate int unsigned,

FOREIGN KEY (userid) references users (ID),

Foreign KEY (BookID) references book (ID)



)


--order form (usually designed as 2 tables, 1 called main tables, 1 Order Details table)



Use a frame chart to design our website and related files and call relationships.


  • 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.