Update Batch in Codeigniter with multiple WHERE clause

▼魔方 西西 提交于 2019-12-08 15:56:28

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!