I have a join statement which joins HomeID and AwayID from a team table that has TeamID. When I join the two tables it only returns the values from the last join statement. Here is my model :-
function get_fixtures(){
$where=array(
'gameweek'=>1,
);
$this->db->select();
$this->db->from('matches AS M');
$this->db->join('team AS T2', 'T2.teamID=M.awayClubID' );
$this->db->join('team AS T1', 'T1.teamID=M.homeClubID');
$this->db->where($where);
$query = $this->db->get();
return $query->result_array();
}
When I print out the result it only returns T1 results. If anyone can help will appreciate :-)