CREATE TABLE `tb_retail` (
`id_retail` int(11) NOT NULL auto_increment,
`company` varchar(255) NOT NULL,
`home_no` varchar(20) NOT NULL,
`moo` varchar(10) NOT NULL,
`soi` varchar(100) NOT NULL,
`road` varchar(100) NOT NULL,
`tumbon` varchar(100) NOT NULL,
`district` varchar(100) NOT NULL,
`province` varchar(100) NOT NULL,
`zip` varchar(10) NOT NULL,
`tel` varchar(50) NOT NULL,
`fax` varchar(50) NOT NULL,
`website` varchar(255) NOT NULL,
`email` varchar(255) NOT NULL,
`established` varchar(50) NOT NULL COMMENT 'ปีที่ก่อตั้ง',
`owner` varchar(100) NOT NULL COMMENT 'เจ้าของชื่อ',
`employees` varchar(10) NOT NULL COMMENT 'จำนวนพนักงาน',
`registration` varchar(30) NOT NULL COMMENT 'เลขที่ทะเบียนการค้า',
`use_product` varchar(100) NOT NULL COMMENT 'สินค้าที่ใช้/เดือน',
`pic_profile` varchar(100) NOT NULL,
`pic_profile2` varchar(100) NOT NULL,
`pic_map` varchar(100) NOT NULL,
`pic_logo` varchar(100) NOT NULL,
`remark` text NOT NULL,
`type_bus` varchar(1) NOT NULL COMMENT 'ประเภทธุรกิจ',
`type_relation` varchar(1) NOT NULL COMMENT 'ความสัมพันธ์ทางธุรกิจ',
`add_by` varchar(100) NOT NULL,
`date_add` date NOT NULL,
PRIMARY KEY (`id_retail`)
) ENGINE=MyISAM ;
CREATE TABLE `tb_films_audiouse` (
`id_usefilm` int(11) NOT NULL auto_increment,
`id_retail` varchar(11) NOT NULL,
`lamina` varchar(1) NOT NULL default '0',
`extra_cole` varchar(1) NOT NULL default '0',
`hi_kool` varchar(1) NOT NULL default '0',
`3m` varchar(1) NOT NULL default '0',
`v_kool` varchar(1) NOT NULL default '0',
`smarttec` varchar(1) NOT NULL default '0',
`maxma` varchar(1) NOT NULL default '0',
`master` varchar(1) NOT NULL default '0',
`johnson` varchar(1) NOT NULL default '0',
`llumar` varchar(1) NOT NULL default '0',
`bostack` varchar(1) NOT NULL default '0',
`jvc` varchar(1) NOT NULL default '0',
`kenwood` varchar(1) NOT NULL default '0',
`alpine` varchar(1) NOT NULL default '0',
`pioneer` varchar(1) NOT NULL default '0',
`sony` varchar(1) NOT NULL default '0',
PRIMARY KEY (`id_usefilm`)
) ENGINE=MyISAM ;