Multiple SQL Joins from same table with Codeigniter

前端 未结 2 1077
深忆病人
深忆病人 2021-01-05 21:46

I have a DB with 2 columns of ID that reference the same table

How do I do 2 joins to the same table, and be able to pull the data.

Here is what I have:

2条回答
  •  失恋的感觉
    2021-01-05 22:19

    $this->db->select('*');
        $this->db->from('jobs');
        $this->db->join('company','company.cmp_name = jobs.cmp_name');
        $this->db->where('company.location', $data['location']);**strong text**
    

提交回复
热议问题