title: Codeigniter active record update statement with a join
body: <p>This is the query that i'm trying to achieve via active record:</p>
  
  <pre><code>UPDATE `Customer_donations` cd 
  join Invoices i on i.cd_id = cd.cd_id 
  set cd.amount = '4', cd.amount_verified = '1' 
  WHERE i.invoice_id =  '13';
  </code></pre>
  
  <p>This is my attempt at the active record:</p>
  
  <pre><code>$data = array('cd.amount'=&gt;$amount, 'cd.amount_verified'=&gt;'1');
  $this-&gt;db-&gt;join('Invoices i', 'i.cd_id = cd.cd_id')
       -&gt;where('i.invoice_id', $invoiceId);
  
  
  // update the table with the new data
  if($this-&gt;db-&gt;update('Customer_donations cd', $data)) {
    return true;
  }
  </code></pre>
  
  <p>And this is the query that's actually getting produced:</p>
  
  <pre><code>UPDATE `Customer_donations` cd 
  SET `cd`.`amount` = '1', `cd`.`amount_verified` = '1' 
  WHERE `i`.`invoice_id` =  '13'
  </code></pre>
  
  <p>Why is this active record statement not applying my join clause?</p>