title: how to update all rows in a column in codeigniter
body: <p>table <strong>company</strong></p>
  
  <p><a href="https://i.stack.imgur.com/DROYw.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/DROYw.png" alt="enter image description here"></a></p>
  
  <p>Here I had to update all rows in the <strong>content</strong> column </p>
  
  <p>my model looks:</p>
  
  <pre><code>public function updateCompanyAction()
  {
      $name = $this-&gt;input-&gt;POST('name');
      $email = $this-&gt;input-&gt;POST('email');
      $phone = $this-&gt;input-&gt;POST('phone');
      $facebook = $this-&gt;input-&gt;POST('facebook');
      $instagram = $this-&gt;input-&gt;POST('instagram');
      $google_plus = $this-&gt;input-&gt;POST('google_plus');
      $twitter = $this-&gt;input-&gt;POST('twitter');
      $pinterest = $this-&gt;input-&gt;POST('pinterest');
      $latitude = $this-&gt;input-&gt;POST('latitude');
      $longitude = $this-&gt;input-&gt;POST('longitude');
  
  
  
      $data = array(
  
      'content'=&gt;$name,
  
  
      );
      $result=$this-&gt;db-&gt;update('company', $data);
      if($result)
      {
          return true;
      }
      else
      {
          return false;
      }
  }
  </code></pre>
  
  <p>How should I change the array <strong>$data</strong> and what all modifications should I done, to update all the <strong>content</strong> from row 1 to row 10.</p>
  
  <p>I am new to this. Thanking in advance</p>