-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
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
about where(null) #770
Comments
@jinmarcus Why do you need to do this? Where looks to see if the $key is an array. If it is not an array, then the first param is the key value, second param is the value for that key. Otherwise the first param is an array with key => value pair... This is what is required/supported. where(["id" => null]);
where("id", null); |
Ci3 can be, I have been accustomed to write, because you can write functions, $where can be as a parameter by value, if there is no $where you can pass null, now to determine $where exists, is not very convenient CI3 like this
but now, CI4 like this
This way, it doesn't get smooth! |
Hm. I didn't think we changed anything in those query builder methods. I would accept a PR for this, though. |
The null parameter cannot be passed in the where method
Like this
$db->table('test')->where(null)->get()->getRow();
Run error reporting
The text was updated successfully, but these errors were encountered: