mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-07-06 15:02:47 +08:00
exp表达式查询改进
This commit is contained in:
@@ -388,7 +388,11 @@ abstract class Builder
|
||||
}
|
||||
} elseif ('EXP' == $exp) {
|
||||
// 表达式查询
|
||||
$whereStr .= '( ' . $key . ' ' . ($value instanceof Expression ? $value->getValue() : $value) . ' )';
|
||||
if ($value instanceof Expression) {
|
||||
$whereStr .= '( ' . $key . ' ' . $value->getValue() . ' )';
|
||||
} else {
|
||||
throw new Exception('where express error:' . $exp);
|
||||
}
|
||||
} elseif (in_array($exp, ['NOT NULL', 'NULL'])) {
|
||||
// NULL 查询
|
||||
$whereStr .= $key . ' IS ' . $exp;
|
||||
|
||||
Reference in New Issue
Block a user