#檢查資料表(show_prod)
if(!chk_isTable("show_prod")) go_update3();
```
2. 增加 go\_update3() ```
########################################
# 建立資料表show_prod
########################################
function go_update3()
{
global $mysqli;
$sql="
CREATE TABLE `show_prod` (
`sn` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'prod_sn',
`kind` smallint(5) unsigned NOT NULL default 0 COMMENT '分類',
`title` varchar(255) NOT NULL default '' COMMENT '名稱',
`summary` text NOT NULL default '' COMMENT '摘要',
`content` text NOT NULL default '' COMMENT '內容',
`price` int(10) unsigned NOT NULL default 0 COMMENT '價格',
`enable` enum('1','0') NOT NULL DEFAULT '1' COMMENT '狀態',
`date` int(10) unsigned NOT NULL default 0 COMMENT '建立日期',
`sort` smallint(5) unsigned NOT NULL default 0 COMMENT '排序',
`counter` int(10) unsigned NOT NULL default 0 COMMENT '人氣',
PRIMARY KEY (`sn`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
";//die($sql);
$mysqli->query($sql) or die(printf("Error: %s
".$sql, $mysqli->sqlstate));
return true;
}
```
3. 圖片儲存位置
uploads/prod
op\_list() 增加 ```
mk_dir(WEB_PATH."/uploads/prod");//商品圖
```