mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-07-01 12:42:48 +08:00
jion方法的条件支持传入Expression对象
This commit is contained in:
@@ -545,7 +545,9 @@ abstract class Builder
|
||||
list($table, $type, $on) = $item;
|
||||
$condition = [];
|
||||
foreach ((array) $on as $val) {
|
||||
if (strpos($val, '=')) {
|
||||
if ($val instanceof Expression) {
|
||||
$condition[] = $val->getValue();
|
||||
} elseif (strpos($val, '=')) {
|
||||
list($val1, $val2) = explode('=', $val, 2);
|
||||
$condition[] = $this->parseKey($val1, $options) . '=' . $this->parseKey($val2, $options);
|
||||
} else {
|
||||
|
||||
@@ -924,7 +924,7 @@ class Query
|
||||
* @access public
|
||||
* @param string|array $table 数据表
|
||||
* @param string|array $field 查询字段
|
||||
* @param string|array $on JOIN条件
|
||||
* @param mixed $on JOIN条件
|
||||
* @param string $type JOIN类型
|
||||
* @return $this
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user