mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-07-07 15:12:48 +08:00
改进
This commit is contained in:
@@ -191,7 +191,7 @@ abstract class Builder
|
|||||||
} elseif (!is_numeric($key)) {
|
} elseif (!is_numeric($key)) {
|
||||||
$array[] = $this->parseKey($key, $options) . ' AS ' . $this->parseKey($field, $options, true);
|
$array[] = $this->parseKey($key, $options) . ' AS ' . $this->parseKey($field, $options, true);
|
||||||
} else {
|
} else {
|
||||||
$array[] = $this->parseKey($field, $options, true);
|
$array[] = $this->parseKey($field, $options);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$fieldsStr = implode(',', $array);
|
$fieldsStr = implode(',', $array);
|
||||||
@@ -579,8 +579,8 @@ abstract class Builder
|
|||||||
} else {
|
} else {
|
||||||
$sort = $val;
|
$sort = $val;
|
||||||
}
|
}
|
||||||
|
$sort = strtoupper($sort);
|
||||||
$sort = in_array(strtolower($sort), ['asc', 'desc'], true) ? ' ' . $sort : '';
|
$sort = in_array($sort, ['ASC', 'DESC'], true) ? ' ' . $sort : '';
|
||||||
$array[] = $this->parseKey($key, $options, true) . $sort;
|
$array[] = $this->parseKey($key, $options, true) . $sort;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user