-
Notifications
You must be signed in to change notification settings - Fork 7.6k
-
Notifications
You must be signed in to change notification settings - Fork 7.6k
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
BUG: set_update_batch / update_batch, getting index #6284
Comments
Think you have the usage incorrect.
Note that the second parameter isn't for an index column to be specified but for a single value in the case where
So you probably need to specify your index column in the third parameter of Try:
Or
https://www.codeigniter.com/userguide3/database/query_builder.html |
@narfbg
I think this is a bug.
To recreate:
$this->db->set_update_batch($dataArrBatch,'index_col')->update_batch('table_name');
Gives error:
"You must specify an index to match on for batch updates."
Hypothesis:
The index parameter in the set_update_batch() function is not parsing to the ->update_batch function
Disclaimer:
Maybe I've completely overlooked the correct usage and assumed the wrong behaviours.. so if that's the case I apologise in advance.
My workaround / patch:
OLD VERSION
PATCHED VERSION
OLD VERSION
PATCHED VERSION
ps. I love CI-3.. query builder is awesome.. I am not moving to CI4 because all I need is simple MVC classes, awesome query builder, simple global post retriever, simple DB integration and I've also customised the query builder for JSON functions. I don't need any other bells and whistles like form validation, front-end stuff, etc. I feel that the power of a php framework is the framework / architecture / security / extensibility, .. it just needs to accommodate and stack other tech and take care of cyber threats.
The text was updated successfully, but these errors were encountered: