CREATE TABLE `fred_honorboard` ( `honor_sn` smallint(5) NOT NULL AUTO_INCREMENT COMMENT '編號', `honor_cat` varchar(255) DEFAULT NULL COMMENT '得獎類別', `honor_person` varchar(255) NOT NULL COMMENT '得獎人', `honor_title` varchar(255) NOT NULL COMMENT '榮譽標題', `honor_content` text NOT NULL COMMENT '榮譽內容', `write_department` varchar(255) NOT NULL, `write_date` date NOT NULL COMMENT '公告日期', `click` smallint(6) NOT NULL DEFAULT '0' COMMENT '點閱次數', PRIMARY KEY (`honor_sn`) ) ENGINE=MyISAM AUTO_INCREMENT=1 ; CREATE TABLE `fred_honorboard_cat` ( `cat_sn` tinyint(4) NOT NULL AUTO_INCREMENT COMMENT '分類編號', `cat_name` varchar(255) NOT NULL COMMENT '分類名稱', PRIMARY KEY (`cat_sn`) ) ENGINE=MyISAM AUTO_INCREMENT=1 ; CREATE TABLE `fred_honorboard_department` ( `department_sn` tinyint(4) NOT NULL AUTO_INCREMENT COMMENT '處室編號', `department_name` varchar(255) NOT NULL COMMENT '處室名稱', PRIMARY KEY (`department_sn`) ) ENGINE=MyISAM AUTO_INCREMENT=1 ; CREATE TABLE `fred_honorboard_files_center` ( `files_sn` smallint(5) unsigned NOT NULL AUTO_INCREMENT COMMENT '檔案流水號', `col_name` varchar(255) NOT NULL COMMENT '欄位名稱', `col_sn` smallint(5) unsigned NOT NULL COMMENT '欄位編號', `sort` smallint(5) unsigned NOT NULL COMMENT '排序', `kind` enum('img','file') NOT NULL COMMENT '檔案種類', `file_name` varchar(255) NOT NULL COMMENT '檔案名稱', `file_type` varchar(255) NOT NULL COMMENT '檔案類型', `file_size` int(10) unsigned NOT NULL COMMENT '檔案大小', `description` text NOT NULL COMMENT '檔案說明', `counter` mediumint(8) unsigned NOT NULL COMMENT '下載人次', PRIMARY KEY (`files_sn`) ) ENGINE=MyISAM COMMENT='檔案資料表';