title: CodeIgniter DB get_where and join
body: <p>is this the best way to write this codeigniter query?</p>
  
  <pre><code>$where = array('registration_status_fk' =&gt; 2, 'membership.membership_type_id' =&gt; 4);
  $join = array('membership', 'membership.id=members.id');
  
  $query = $this-&gt;join($join[0], $join[1])-&gt;get_where($this-&gt;tbl_name, $where);
  </code></pre>
  
  <p>or is there a better way to accomplish what I am doing?</p>
  
  <p>This is the error I get</p>
  
  <pre><code>Error Number: 1054
  
  Unknown column 'membership.membership_type_id' in 'where clause'
  
  SELECT * FROM (`member`) WHERE `registration_status_fk` = 2 AND `membership`.`membership_type_id` = 4
  
  Filename: C:\xampp\htdocs\OAWA\system\database\DB_driver.php
  
  Line Number: 330
  </code></pre>