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
setUpdateBatch #4025
Comments
hanmoguoke
added
the
bug
Verified issues on the current code behavior or pull requests that will fix them
label
Dec 24, 2020
Description of fields is incorrect $data = [
[
'id' => 1,
'title' => 'My title' ,
'name' => 'My Name 2' ,
'date' => 'My date 2'
],
[
'id' => 2,
'name' => 'Another Name 2' ,
'date' => 'Another date 2'
]
];
$db->setUpdateBatch($data, 'id', false)
$db->updateBatch(null, 'id')
// or
$data = [
[
'id' => 1,
'name' => 'My Name 2' ,
'date' => 'My date 2'
],
[
'id' => 2,
'name' => 'Another Name 2' ,
'date' => 'Another date 2'
]
];
$dataNotEscape = [
['title' => 'My title'],
['title' => 'Another title']
];
$db->setUpdateBatch($dataNotEscape, 'title', false)
$db->updateBatch($data, 'id') |
paulbalandan
removed
the
bug
Verified issues on the current code behavior or pull requests that will fix them
label
Dec 29, 2020
Both examples of @iRedds are correct. If you need no escaping, just set the |
thank u! it works! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
function setUpdateBatch Must be a two-dimensional array or object,
The document is:
Adds field/value pairs to be updated in a table later via updateBatch().
How to use it?
What I want to achieve is not to escape data when batch updatewith updateBatch
The text was updated successfully, but these errors were encountered: