I want to have the id from my table 'device_id' but I keep getting the id from 'inventory' because it is the last join.
I have tried to look it up on the internet but could found a solution for Codeigniter.
$this->db->where('device_id', $this->input->get('device_id'));
$this->db->join('repair_components', 'repair_options.component_id = repair_components.id');
$this->db->join('products', 'repair_options.product_id = products.id');
$this->db->join('inventory', 'repair_options.product_id = inventory.product_id', 'left');
$query = $this->db->get('repair_options');
$this->data['options'] = $query->result();
print_r($this->data['options']);
I want the id from 'device_id' in my array '$this->data['options']'.