We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Currently BETWEEN is supported using database::literal, such as in this query:
BETWEEN
database::literal
$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.
[1, 2]
IN
https://github.com/nette/database/blob/master/src/Database/SqlPreprocessor.php#L285-L293)
The text was updated successfully, but these errors were encountered:
added support for SELECT BETWEEN operator [Closes nette#297]
88ed3df
No branches or pull requests
Currently
BETWEEN
is supported usingdatabase::literal
, such as in this query:It would be even nicer if it worked like this:
Now when it sees that the value is an array (
[1, 2]
), it automatically switches toIN
.https://github.com/nette/database/blob/master/src/Database/SqlPreprocessor.php#L285-L293)
The text was updated successfully, but these errors were encountered: