更新至5.1.27LTS,编写权限,在添加用户时直接添加角色
This commit is contained in:
1 parent
378b60cbf6
commit
f4f4fe1d67
39 files changed
+535
-367
No files matched your search
@@ -1887,10 +1887,21 @@ class Query
|
||||
* 表达式方式指定Field排序
|
||||
* @access public
|
||||
* @param string $field 排序字段
|
||||
* @param array $bind 参数绑定
|
||||
* @return $this
|
||||
*/
|
||||
public function orderRaw($field)
|
||||
public function orderRaw($field, $bind = [])
|
||||
{
|
||||
if ($bind) {
|
||||
foreach ($bind as $key => $value) {
|
||||
if (!is_numeric($key)) {
|
||||
$field = str_replace(':' . $key, '?', $field);
|
||||
}
|
||||
}
|
||||
|
||||
$this->bind(array_values($bind));
|
||||
}
|
||||
|
||||
$this->options['order'][] = $this->raw($field);
|
||||
|
||||
return $this;
|
||||
|
||||
Reference in new issue
Block a user