I need one help. I need to join two table using multiple column in CodeIgniter. I am explaining my table below.
pt_car_locations
id pickup_location_id dropoff_location_id price
1 21 22 100
2 23 24 200
pt_locations id location 21 Cappa 22 United 23 Mascut 24 ABCD
Here I need to retrieve the pickup and drop location by joining both table. I am explaining query below.
$this->db->select('cl.pickup_location_id,cl.dropoff_location_id,cl.price,l.id,l.location');
$this->db->from('pt_car_locations as cl');
$this->db->join('pt_locations as l', 'cl.pickup_location_id = l.id', 'inner');
Here I need to join both column and get the both location in each row.