阅读背景:

Codeigniter Active Record / MySQL Join Query - How to Return Results if one of the Table Rows is Not Present

来源:互联网 

I have the following query:

我有以下查询:

$this->db
     ->select('SQL_CALC_FOUND_ROWS null as rows
        ,table1.*
        ,table2.*
        ,table3.*', FALSE)
     ->from('table1')
     ->where('table1.column1', $user_id)
     ->join('table2', 'table2.column2 = table1.column2')
     ->join('table3', 'table3.column2 = table1.column2')
     ->group_by('table1.column2')
     ->order_by('table1.column2', 'DESC');

 $query = $this->db->get();
$this->



你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: