songxingwei 4 years ago
parent
commit
b08bcdff6b
1 changed files with 5 additions and 6 deletions
  1. 5 6
      public/test.php

+ 5 - 6
public/test.php

@@ -12,7 +12,7 @@ if ($conn->connect_error) {
 }
 //`shcool_id` int(11) DEFAULT NULL,
 // 使用 sql 创建数据表
-$sql = "CREATE TABLE `jijiao_youer_school` (
+$sql = "CREATE TABLE `jijiao_zhongzhi_school` (
   `ids` int(11) unsigned NOT NULL AUTO_INCREMENT,
  
   ";
@@ -20,7 +20,6 @@ $sql = "CREATE TABLE `jijiao_youer_school` (
   //$a = ['B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z'];
   $b = ['A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z'];
   foreach ($a as &$g){
-
       $sql .= " `$g` varchar(255) DEFAULT NULL,";
   }
  foreach ($a as &$v){
@@ -29,14 +28,14 @@ $sql = "CREATE TABLE `jijiao_youer_school` (
      }*/
      foreach ($b as &$c){
           $name = $v.$c;
-          if ($name>'JV'){
-              break;
-          }
+//          if ($name>'JV'){
+//              break;
+//          }
          $sql .= " `$name` text DEFAULT NULL,";
      }
  }
   $sql .= "PRIMARY KEY (`ids`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='基教-幼儿园';";
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='中职学校';";
 if ($conn->query($sql) === TRUE) {
     echo "Table created successfully";
 } else {