改名
This commit is contained in:
@@ -81,13 +81,10 @@ trait Condition
|
|||||||
$_tmp = [];
|
$_tmp = [];
|
||||||
if (empty($where)) return '';
|
if (empty($where)) return '';
|
||||||
|
|
||||||
|
var_dump($where);
|
||||||
foreach ($where as $key => $value) {
|
foreach ($where as $key => $value) {
|
||||||
if (is_string($key)) {
|
|
||||||
$_tmp = $this->conditionMap([$key, $value]);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
$_value = is_string($value) ? $value : $this->conditionMap($value);
|
$_value = is_string($value) ? $value : $this->conditionMap($value);
|
||||||
|
|
||||||
if (empty($_value)) continue;
|
if (empty($_value)) continue;
|
||||||
|
|
||||||
$_tmp[] = $_value;
|
$_tmp[] = $_value;
|
||||||
|
|||||||
@@ -730,7 +730,7 @@ trait QueryTrait
|
|||||||
*/
|
*/
|
||||||
public function where(callable|array|string $conditions): static
|
public function where(callable|array|string $conditions): static
|
||||||
{
|
{
|
||||||
$this->where[] = $conditions;
|
$this->where[] = [$conditions];
|
||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user