第一:判断数据库中是不是存在某张表
Db::query("SELECT COUNT(*) FROM information_schema.tables WHERE table_schema='".config('database.database')."' AND table_name='".$data['tag_table']."'");
如果存在就会返回1 如果不存在就会返回0
第二:判断数据表中是否存在某个字段
第一:判断数据库中是不是存在某张表
Db::query("SELECT COUNT(*) FROM information_schema.tables WHERE table_schema='".config('database.database')."' AND table_name='".$data['tag_table']."'");
如果存在就会返回1 如果不存在就会返回0
第二:判断数据表中是否存在某个字段