![](https://img-blog.csdnimg.cn/20201014180756922.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
mysql
小榔头wei
这个作者很懒,什么都没留下…
展开
-
php判断mysql数据表是否存在
一、mysql判断数据表是否存在sql语句:SHOW TABLES LIKE '$basename',其中$basename为数据表名二、与框架thinkphp配合使用 use thinkphp\Db; $exist = Db::query("SHOW TABLES LIKE '$basename' ");//$exist结果为数组,如果数据表存在,结果为数据表的信息,如果不存在,结果为空数组 if(empty($exist)){ //不存逻辑}else{ //原创 2020-05-25 15:29:33 · 661 阅读 · 0 评论 -
php动态创建mysql数据表
一、mysql创建数据表的语句//其中id,question_NO等均为需要创建的数据库表的语句;create table if not exists `表名`( id int primary key auto_increment not null, question_NO int not null, one_class varchar(255), two_class varchar(25原创 2020-05-25 15:28:16 · 532 阅读 · 0 评论