title: concat in condition left join active record codeigniter
body: <p>I have a problem with active record codeigniter ver 2 wih special criteria like this:</p>
  
  <pre><code>$this-&gt;db-&gt;select('t_po_detail_item, t_process_shif, m_machine_lines, m_machine_mac, t_po_detail_no,
                         t_prod_lot, CONCAT(t_prod_lot, "-", t_prod_sublot) AS nolot,
                         COUNT(t_prod_sublot) AS qtybox, SUM(t_process_qty) AS qtypcs,
                         ROUND((SUM(t_process_qty)*m_process_weight)/1000,1) AS qtyberat', FALSE);
      $this-&gt;db-&gt;join(self::$table2, 't_process_prod_id = t_prod_id', 'left')
               -&gt;join(self::$table3, 't_prod_lot = t_po_detail_lot_no', 'left')
               -&gt;join(self::$table5, 't_process_machine = m_machine_id', 'left')
               -&gt;join(self::$table4, 'CONCAT_WS("-",t_po_detail_item, t_process_cat) = CONCAT_WS("-",m_process_id, m_process_proc_cat_id)', 'left');
      $this-&gt;db-&gt;where('t_process_cat', 16);
      $this-&gt;db-&gt;group_by('nolot');
      $query  = $this-&gt;db-&gt;get(self::$table1);
  </code></pre>
  
  <p>there are have special criteria join condition with concat WS. If i use standard query mysql, the query is running ok.</p>
  
  <pre><code>$sql = 'SELECT t_po_detail_item, t_process_shif, m_machine_lines, m_machine_mac, t_po_detail_no, t_prod_lot, CONCAT_WS("-",t_prod_lot, t_prod_sublot) AS nolot,
              COUNT(t_prod_sublot) AS qtybox, SUM(t_process_qty) AS qtypcs, ROUND((SUM(t_process_qty)*m_process_weight)/1000,1) AS qtyberat
              FROM `t_process`
              LEFT JOIN t_prod ON t_process_prod_id = t_prod_id
              LEFT JOIN t_po_detail ON t_prod_lot = t_po_detail_lot_no
              LEFT JOIN m_machine ON t_process_machine = m_machine_id
              LEFT JOIN m_process ON CONCAT_WS("-",t_po_detail_item, t_process_cat) = CONCAT_WS("-",m_process_id, m_process_proc_cat_id)
              WHERE t_process_cat=16
              GROUP BY(nolot)';
  
      $query  = $this-&gt;db-&gt;query($sql);
  </code></pre>
  
  <p>There are wrong in my active record code ?
  regards,</p>
  
  <p>Neos.</p>