/**
* 創建用戶登錄日志表
* @param type $table
* @return boolean
*/
public function createUserLogin($table){
if(!$table){
return false;
}
$model = M();
$s_table = "show tables like 'dz_". $table."'"; //查詢表是否存在
$result = $model->query($s_table);
if(empty($result)){
$c_table = "CREATE TABLE `dz_".$table."` (
`id` int(11) NOT NULL,
`u_id` int(11) NOT NULL COMMENT '用戶id',
`intro` varchar(50) DEFAULT '' COMMENT '描述',
`add_date` int(11) NOT NULL DEFAULT '0' COMMENT '添加時間',
`reg_date` int(11) NOT NULL DEFAULT '0' COMMENT '注冊時間',
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;";
$model->execute($c_table);
return true;
}
return true;
}