This commit is contained in:
2023-10-07 20:40:59 +08:00
parent 38ae3d2031
commit ce9d172016
+2 -2
View File
@@ -217,7 +217,7 @@ class Gii
private function showAll(): array
{
$res = [];
$_tables = Db::findAllBySql('show tables from `' . $this->db->database . '`', [], $this->db);
$_tables = Db::connect($this->db)->query('SHOW TABLES FROM `' . $this->db->database . '`');
if (empty($_tables)) {
return $res;
}
@@ -234,7 +234,7 @@ class Gii
*/
private function getIndex($table): bool|int|null
{
$data = Db::findAllBySql('SHOW INDEX FROM ' . $table, [], $this->db);
$data = Db::connect($this->db)->query('SHOW INDEX FROM `' . $this->db->database . '`.`' . $table . '`', []);
return empty($data) ? NULL : $data[0];
}