-
-
Notifications
You must be signed in to change notification settings - Fork 178
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
pass array to where #200
Comments
I believe your suggestion is not improving the code directly. The way of defining the where is something personal. I like to see the where in multiple lines because its more clear how many wheres I am using. |
yeah thats your opinion |
I'm with @eL-Prova on this. |
I would like have the same thing. |
I think, current version is more read, then u propose. U unlikely transfer more then 2-3 parameters to query. Why use an array? |
Common use for this is checking if the record exists: $insert = [
'name' => 'John',
'age' => 35,
'sex' => 'Y',
etc...
];
if (!QB::table('my_table')->where($insert)->first())
QB::table('my_table')->insert($insert); So this makes sense. |
instead of
$query->where("post_id" , 1)->where("category_id" , 2);
i would like to
Edit:
i extendet the code by myself:
src/Pixie/QueryBuilder/QueryBuilderHandler.php
between line 608 and 609 i inserted
The text was updated successfully, but these errors were encountered: