1 상품표 작성

2126 단어
USE php34;
SET NAMES utf8;

# tinyint : 0~255
# smallint : 0~ 65535
# mediumint : 0~1 6   
# int : 0~40  
# char 、varchar 、 text  ?
# char    :0~255   
# varchar : 0~65535        ,   utf8 2     gbk 3    
# text    : 0~65535   

CREATE TABLE IF NOT EXISTS php34_goods
(
    id mediumint unsigned not null auto_increment,
    goods_name varchar(45) not null comment '    ',
    logo varchar(150) not null default '' comment '  logo',
    sm_logo varchar(150) not null default '' comment '     logo',
    price decimal(10,2) not null default '0.00' comment '    ',
    goods_desc longtext comment '    ',
    is_on_sale tinyint unsigned not null default '1' comment '    :1:  ,0:  ',
    is_delete tinyint unsigned not null default '0' comment '      ,1:     0:   ',
    addtime int unsigned not null comment '    ',
    primary key (id),
    key price(price),
    key is_on_sale(is_on_sale),
    key is_delete(is_delete),
    key addtime(addtime)
)engine=MyISAM default charset=utf8;
#  :    LIKE     %   ,        ,        ,         :
#SELECT * FROM php34_goods WHERE MATCH goods_name AGAINST 'xxxx';
#

좋은 웹페이지 즐겨찾기