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
MySQL
Continue of #145
$products = $this->select()->andWhere('productGuid', 'IN', $productGuids)->fetchData();
with empty array $productGuids resulting the following sql:
$productGuids
AND `xxx`.`ProductGuid` IN()
and database error is raised, as there is nothing in IN
IN
database 2.8.1 PHP 8.3
The text was updated successfully, but these errors were encountered:
Hi. What do you expect from ORM in case of passing an empty list?
Sorry, something went wrong.
Hi, maybe not to generate AND xxx.ProductGuid IN() at all?
AND xxx.ProductGuid IN()
or generate FALSE instead? because the IN operator is used to define a white list. And if the list is empty it equals to FALSE
FALSE
Yet another option -- generate xxx.ProductGuid is null. Wny not? The values list has no values. Shouldn't we check that field has no value too? :)
xxx.ProductGuid is null
msmakouz
No branches or pull requests
No duplicates 🥲.
Database
MySQL
What happened?
Continue of #145
with empty array
$productGuids
resulting the following sql:and database error is raised, as there is nothing in
IN
Version
The text was updated successfully, but these errors were encountered: