Codeigniter join query multiple conditions don't work

前端 未结 6 1291
温柔的废话
温柔的废话 2021-01-14 11:12

I want to select data from my database table with join query, but my it doesn\'t work.

My query:

$this->db->select();
$this->db->from(\'w         


        
6条回答
  •  情话喂你
    2021-01-14 11:26

    You don't need to join same table twice. But just to extend ON clause:

    $this->db->select();
    $this->db->from('we');
    $this->db->join('schedule', 'schedule.itemid = we.cid AND schedule.itemtype = \'testitem\'');
    $this->db->where('we.isActive','Y');
    

提交回复
热议问题