Active Record Class - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23) +--- Thread: Active Record Class (/showthread.php?tid=29274) |
Active Record Class - El Forum - 04-04-2010 [eluser]vickel[/eluser] Hi all, while I was writing queries using INNER JOIN I run into something ... my table 'booking_rates' has a column called 'ID' as do the 2 joined tables Code: $this->db->where('object_ID', $id); my result function returns the value of booking_seasons.ID instead of booking_rates.ID btw: below works fine ! Code: $query = $this->db->query(' any ideas where I'm wrong in the active record query? thanks Active Record Class - El Forum - 04-04-2010 [eluser]xeroblast[/eluser] try to add $this->db->select() manually... Active Record Class - El Forum - 04-04-2010 [eluser]InsiteFX[/eluser] You can try this, but I have not tested it... Code: $this->db->select('booking_rates.*, booking_periods.description, booking_seasons.seasondefinition, booking_rates.ID'); InsiteFX Active Record Class - El Forum - 04-05-2010 [eluser]vickel[/eluser] thanks InsiteFX, your select() clause didn't work, i think I stick to the solution with $query = $this->db->query() |