Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9093395
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T23:05:24+00:00 2026-06-16T23:05:24+00:00

I have been looking around but I have not found an answer yet. Kindly

  • 0

I have been looking around but I have not found an answer yet. Kindly help if you know the answer.

How do you update multiple rows in CI?

In my MySQL:

I have column names:

ID, Settings Name, Settings Value ( Settings Name is Unique )

I have the ff Data:

ID = 1, Settings Name = "Hello" , Settings Value = "True"
ID = 2, Settings Name = "World", Settings Value = "Good"

and more …

I also have a form that gets the Settings Value but I am not sure how to update it on the DB. How to update the True for the Hello being the Settings Name and update the Good for the World.

I heard about insert_batch() but is there an update_batch()?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-16T23:05:26+00:00Added an answer on June 16, 2026 at 11:05 pm

    Are you using Active record?

    Yes there is an update batch: $this->db->update_batch();

    $data = array(
    array(
      'ID' => 1 ,
      'Settings Name' => 'Hello' ,
      'Settings Value' => 'True'
    ),
    array(
      'ID' => '2' ,
      'Settings Name' => 'World' ,
      'Settings Value' => 'Good'
    )
    );    
    
    $this->db->update_batch('mytable', $data, 'where_key'); 
    

    From the documentation:

    The first parameter will contain the table name, the second is an associative array of values, the third parameter is the where key.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've been looking around but I have not found an answer, so... Does anyone
Been looking around the web, but not found anything so far... can anyone help?
I have been looking around but I have not found a problem like this.
I've been looking around but I have not found a solution for this problem:
I have been looking around ocn Google and Stackoverflow but haven't found what I
Have been looking around for a solution to this and have found some help
I know questions around javascript compression have been asked multiple times but I cannot
I have been looking around the web for this but cannot really find a
I have been looking around on the web and found some articles about the
I have been looking around and even found a couple of related answers and

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.