欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页  >  php教程

PHP学习笔记:php二手交易市场系统

程序员文章站 2022-05-18 16:46:02
...
本示例的数据库脚本   执行语句:  source d:\test\2shou.sql;

CREATE DATABASE IF NOT EXISTS 2shou
COLLATE 'gb2312_chinese_ci';

USE 2shou;
CREATE TABLE IF NOT EXISTS Bulletin (
    Id INT  AUTO_INCREMENT  PRIMARY KEY,
    Title varchar(50), 
    Content varchar(1000),
    PostTime datetime,
    Poster  varchar(50)
);

CREATE TABLE IF NOT EXISTS  GoodsType (
    TypeId  INT  AUTO_INCREMENT  PRIMARY KEY,
    TypeName VARCHAR(100)  NOT NULL
);

CREATE TABLE IF NOT EXISTS Goods (
    GoodsId INT  AUTO_INCREMENT  PRIMARY KEY,
    TypeId INT, 
    SaleOrBuy TINYINT,
    GoodsName VARCHAR(50),
    GoodsDetail VARCHAR(1000),
    ImageURL VARCHAR(100),
    Price VARCHAR(50),
    StartTime  DATETIME,
    OldNew  VARCHAR(50),
    Invoice  VARCHAR(50),
    Repaired  VARCHAR(50),
    Carriage  VARCHAR(50),
    PayMode  VARCHAR(50),
    DeliverMode  VARCHAR(50),
    IsOver  TINYINT,
    OwnerId  VARCHAR(50),
    ClickTimes  INT
);

CREATE TABLE IF NOT EXISTS Users (
    UserId    VARCHAR(50),
    UserPwd    VARCHAR(50),
    Name    VARCHAR(50),
    Sex    TINYINT,
    Address    VARCHAR(500),
    Postcode    VARCHAR(50),
    Email    VARCHAR(50),
    Telephone    VARCHAR(100),
    Mobile    VARCHAR(50),
    UserType TINYINT
);
INSERT INTO Users VALUES('Admin', '111111', 'Admin', 1, '', '', '', '', '', 1);