Skip to content
Advertisement

How to update multiple records in Codeigniter

In above code snippet first function is declared in controller and second function is declared in model. I want to update owner for multiple rows having ids in $astrep. Can anyone please help me?

Advertisement

Answer

You can use whereIn() or orWhereIn() methods from query builder class.

Refer https://codeigniter4.github.io/userguide/database/query_builder.html#looking-for-specific-data

User contributions licensed under: CC BY-SA
3 People found this is helpful
Advertisement