title: get id of affected row in codeigniter after an update
body: <p>How do i get the id of the affected row after doing an update in CodeIgniter?</p>
  
  <p><strong>NOTE:</strong> <code>$this-&gt;db-&gt;insert_id()</code> which gets the last insert id returns <strong>0</strong> after an doing an update like so <code>$this-&gt;db-&gt;update(_table_name)</code>.<br/></p>
  
  <p>Doing <code>$this-&gt;db-&gt;affected_rows()</code> will return <strong>x</strong> number of affected rows so my question is, is there any way to get the individual <strong>id</strong> of the affected rows after doing a <code>$this-&gt;db-&gt;update()</code>? </p>