This commit is contained in:
2026-06-24 21:53:42 +08:00
parent bf4f8538ed
commit 404b511c5f
+6 -3
View File
@@ -284,9 +284,12 @@ class SqlBuilder extends Component
* @param array $select * @param array $select
* @return string * @return string
*/ */
private function makeSelect(array $select = ['*']): string private function makeSelect(mixed $select = ['*']): string
{ {
$select = "SELECT " . implode(',', $select) . " FROM " . $this->query; if (!is_array($select)) {
$select = ['*'];
}
$select = "SELECT " . implode(',', $select) . " FROM " . $this->query;
if ($this->query != "") { if ($this->query != "") {
$select .= " AS " . $this->query; $select .= " AS " . $this->query;
} }