diff --git a/library/think/db/Builder.php b/library/think/db/Builder.php index abc51c1d..d4d27a1e 100644 --- a/library/think/db/Builder.php +++ b/library/think/db/Builder.php @@ -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 { diff --git a/library/think/db/Query.php b/library/think/db/Query.php index c833cc05..1f3ddc29 100644 --- a/library/think/db/Query.php +++ b/library/think/db/Query.php @@ -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 */