Created
February 17, 2022 22:09
-
-
Save grizmio/d3b39952f6af982ec910c3f0db1a020a to your computer and use it in GitHub Desktop.
mariadb/mysql ifnull and cakephp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$q->where(function (QueryExpression $exp, Query $q) { | |
return $q->func()->ifnull(["Foo.type NOT IN ('Bar', 'Baz')" => 'identifier', 'true' => 'identifier']); | |
}); | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment