This commit is contained in:
xl
2023-06-12 15:31:47 +08:00
parent 1cf6a7bf8b
commit fa094fd387
2 changed files with 269 additions and 269 deletions
+1 -1
View File
@@ -253,7 +253,7 @@ class Gii
} }
foreach ($tables as $key => $val) { foreach ($tables as $key => $val) {
if (empty($val)) continue; if (empty($val)) continue;
$_tmp = Db::findAllBySql('SHOW FULL FIELDS FROM `' . $this->db->database . '`.' . $val, [], $this->db); $_tmp = Db::connect($this->db)->query('SHOW FULL FIELDS FROM `' . $this->db->database . '`.' . $val, []);
if (empty($_tmp)) { if (empty($_tmp)) {
continue; continue;
} }
+1 -1
View File
@@ -392,7 +392,7 @@ class ' . $managerName . ' extends Model
return Gii::$createSqls[$table]; return Gii::$createSqls[$table];
} }
$text = Db::showCreateSql($table, $this->db)['Create Table'] ?? ''; $text = Db::connect($this->db)->one('SHOW CREATE TABLE `'.$this->db->database. '`.`' . $table.'`')['Create Table'] ?? '';
$_tmp = []; $_tmp = [];
foreach (explode(PHP_EOL, $text) as $val) { foreach (explode(PHP_EOL, $text) as $val) {