$sql="CREATE TABLE ".config('database.prefix').input("post.addtable")."(
`artid` int(15) NOT NULL COMMENT '文章ID',
`typeid` smallint(5) unsigned NOT NULL,
`channel` smallint(6) NOT NULL,
UNIQUE KEY `id` (`artid`)
)ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1";
if(Db::query($sql)){
$this->success("创建成功");
}else{
$this->error("创建表失败");
}得到的结果是创建表失败,但是我在数据中找到了创建成功的表,不知道这个怎么获取创建成功的返回值。 最佳答案