This commit is contained in:
as2252258@163.com
2021-02-23 02:11:01 +08:00
parent c900795daf
commit c190750754
+1 -2
View File
@@ -276,8 +276,7 @@ class Columns extends Component
private function structure($table): array|static private function structure($table): array|static
{ {
if (!isset($this->columns[$table]) || empty($this->columns[$table])) { if (!isset($this->columns[$table]) || empty($this->columns[$table])) {
$sql = $this->db->getBuild()->getColumn($table); $column = $this->db->createCommand($this->db->getBuild()->getColumn($table))->all();
$column = $this->db->createCommand($sql)->all();
if (empty($column)) { if (empty($column)) {
throw new Exception("The table " . $table . " not exists."); throw new Exception("The table " . $table . " not exists.");
} }