Home php教程 php手册 PHP学习笔记:php二手交易市场系统

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

Jun 21, 2016 am 08:46 AM
create exists varchar

本示例的数据库脚本   执行语句:  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);
Copy after login

 



Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

How to use the File.Exists function in C# to determine whether a file exists How to use the File.Exists function in C# to determine whether a file exists Nov 18, 2023 am 11:25 AM

How to use the File.Exists function in C# to determine whether a file exists. In C# file operations, determining whether a file exists is a basic functional requirement. The File.Exists function is a method in C# used to determine whether a file exists. This article will introduce how to use the File.Exists function in C# to determine whether a file exists and provide specific code examples. Reference the namespace Before you start writing code, you first need to reference the System.IO namespace, which

How to implement date comparison, sorting and other operations with the varchar type in mysql How to implement date comparison, sorting and other operations with the varchar type in mysql May 31, 2023 pm 01:49 PM

During the use of MySQL, dates are generally stored in datetime, timestamp and other formats. However, sometimes due to special needs or historical reasons, the date is stored in varchar format. So how should we process the date data in varchar format? ? Use function: STR_TO_DATE(str,format) The STR_TO_DATE(str,format) function is the inverse function of the DATE_FORMAT() function. It takes a string str and a format string format. STR_TO_DATE() returns a DATETIME value if the format string contains date and time components, or if the word

What is the difference between char and varchar in mysql What is the difference between char and varchar in mysql Sep 04, 2023 pm 02:16 PM

The differences between char and varchar in mysql are: 1. CHAR is fixed length, while VARCHAR is variable length; 2. CHAR storage and retrieval efficiency is high, while VARCHAR storage and retrieval efficiency is not high; 3. CHAR takes up storage space, VARCHAR can save storage space.

Can the create statement be used to create a table structure and append new records? Can the create statement be used to create a table structure and append new records? Jul 25, 2022 am 11:25 AM

cannot. The function of the CREATE statement is to create a table structure, but it cannot append new records. You can use the INSERT statement to append new records. The CREATE statement can be used to create a new table in the database and specify the attributes and constraints of the data columns; however, the newly created table is an empty table and requires the use of the INSERT statement to append new records. The INSERT statement is used to insert one or more rows of tuple data into an existing table in the database.

How does MySQL determine the size of VARCHAR How does MySQL determine the size of VARCHAR May 27, 2023 pm 09:20 PM

First of all, it is not recommended to use the TEXT type, because using TEXT will seriously affect efficiency. The best way is to use VARCHAR and determine the maximum length of the field. We can first define a field rule_value in the table and set the length to 255, then enter the smallest json string: use MySQL's CHAR_LENGTH function to calculate the size of rule_value: SELECTid, rule_type, rule_value, CHAR_LENGTH(rule_value) as rule_value_length, rule_markFROMtest_tableWHEREr

Using EXISTS function in MYSQL Using EXISTS function in MYSQL Feb 24, 2024 pm 05:15 PM

Usage of EXISTS in MYSQL, with code examples. In the MYSQL database, EXISTS is a very useful operator, used to determine whether a subquery returns at least one row of data. It is usually used with a WHERE clause to filter out data that meets conditions based on the results of a subquery. When using EXISTS, you need to pay attention to the following points: The EXISTS condition does not care about the specific data returned by the subquery, only whether there is data returned. The EXISTS condition can be used in combination with other conditions.

What should I do if I get an error in creat react app? What should I do if I get an error in creat react app? Dec 27, 2022 am 11:29 AM

Solution to create react app error: 1. Switch the Taobao mirror source through "npm config set registry https://registry.npm.taobao.org"; 2. By executing "E:\workspace\demo\p4>npx create- react-app todolist" command to reinstall it.

New AI platform to create 3D games based on text input surfaces, trailer provides first insights New AI platform to create 3D games based on text input surfaces, trailer provides first insights Aug 17, 2024 am 06:37 AM

On August 15. 2024, the start-up "Exists", which specializes in artificial intelligence, published a press release to a generative AI platform that will enable users to create high-quality 3D games using text input alone - without any progr

See all articles