问题
I checked the CI user guide to see how to handle update_batch()
and it seems it accept onlt one index to match which row to be updated.
But in my instance, i need to specify two index like lang
and id_page
which i use as index together. such lang=en|id_page=115
is unique so the key for the row.
Means, my where index should be WHERE lang = $lang AND id_page = $id_page
...
Is there any approach on batch update with multiple index?
Thank you.
回答1:
There is not at the moment. You could write a new driver that extends one of the existing ones but it is probably not worth it. What exactly are you trying to do?
来源:https://stackoverflow.com/questions/9751984/update-batch-in-codeigniter-with-multiple-where-clause