I need to get result from my database.
I have two table "travels" and "airlines" and I want to get result of all the columns from travels table which is ("id","name","airline_name","price","via") and from second table which is airlines based on the columns("id","name","logo").
I want to get "logo" whose name is the same as airline_name in the travel table.
What should I do? Should I used join?? So far my query is:
$this->db->select();
$this->db->from('travels');
$this->db->join('airlines', 'travels.airline_name = airlines.name','inner');
$this->db->group_by('travels.destination');
I am using CodeIgniter.