ajout des conditions where in et where between

This commit is contained in:
2023-10-29 18:37:35 +01:00
parent dad85948e5
commit 68de5a7d96
4 changed files with 52 additions and 2 deletions

View File

@@ -86,6 +86,18 @@ class QueryBuilder
return $this;
}
public function whereIn($condition, array $values)
{
$this->wheres[] = new Expression($condition, "in", $values);
return $this;
}
public function whereBetween($condition, $value1, $value2)
{
$this->wheres[] = new Expression($condition, "between", [$value1,$value2]);
return $this;
}
public function where($condition, $operator, $value = null)
{
if ($value === null) {