-
-
Notifications
You must be signed in to change notification settings - Fork 110
Open
Description
Currently BETWEEN
is supported using database::literal
, such as in this query:
$sql = <<<SQL
SELECT
*
FROM
test
WHERE
SQL;
$rows = $database->query($sql, [
$database::literal('id BETWEEN ? AND ?', 1, 2),
]);
It would be even nicer if it worked like this:
$sql = <<<SQL
SELECT
*
FROM
test
WHERE
SQL;
$rows = $database->query($sql, [
'id BETWEEN' => [1, 2],
]);
Now when it sees that the value is an array ([1, 2]
), it automatically switches to IN
.
Metadata
Metadata
Assignees
Labels
No labels