mysql中的操做记录

第一:判断数据库中是否是存在某张表数据库

Db::query("SELECT COUNT(*) FROM information_schema.tables WHERE table_schema='".config('database.database')."' AND table_name='".$data['tag_table']."'");orm

若是存在就会返回1  若是不存在就会返回0io

 

第二:判断数据表中是否存在某个字段table

相关文章
相关标签/搜索