[eluser]webnology[/eluser]
Hi all,
can't make these double joins work. I need to join 3 tables: atg_reviews, atg_bands, atg_gigs.
Code:
function getAllReviewsForConcert($concert_id) {
$this->db->select('*');
$this->db->from('atg_reviews');
$this->db->join('atg_bands', 'atg_bands.band_id = atg_reviews.band_id');
$this->db->join('atg_gigs', 'atg_gigs.gig_id = atg_reviews.gig_id');
$this->db->order_by('date', 'desc');
$this->db->where('gig_id', $concert_id);
$Q = $this->db->get();
return $Q;
}
I get following error: Column 'gig_id' in where clause is ambiguous.
All help appreciated.
M