title: codeigniter - database : how to update multiple tables with a single update query
body: <p>I saw <a href="http://codeigniter.com/forums/viewthread/141318/#695303" rel="noreferrer">this</a> on the codeigniter forum </p>
  
  <p>Considering the below code</p>
  
  <pre><code>UPDATE a
  INNER JOIN b USING (id)
  SET a.firstname='Pekka', a.lastname='Kuronen',
  b.companyname='Suomi Oy',b.companyaddress='Mannerheimtie 123, Helsinki Suomi'
  WHERE a.id=1; 
  </code></pre>
  
  <p>This is how you would apparently do it in Codeigniter</p>
  
  <pre><code>$this-&gt;db-&gt;set('a.firstname', 'Pekka');
  $this-&gt;db-&gt;set('a.lastname', 'Kuronen');
  $this-&gt;db-&gt;set('b.companyname', 'Suomi Oy');
  $this-&gt;db-&gt;set('b.companyaddress', 'Mannerheimtie 123, Helsinki Suomi');
  $this-&gt;db-&gt;where('a.id', 1);
  $this-&gt;db-&gt;join('table2 as b', 'a.id = b.id');
  $this-&gt;db-&gt;update('table as a');
  </code></pre>
  
  <p>this does not work in reality. I have had a look a the SQL which this produces and the results do not even mention the join. </p>
  
  <p><strong>Does anyone have any idea how to do an update with a join using Codeigniter's Active Record Database Class?</strong></p>