Join multi other table - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived General Discussion (https://forum.codeigniter.com/forumdisplay.php?fid=21) +--- Thread: Join multi other table (/showthread.php?tid=42141) |
Join multi other table - El Forum - 05-27-2011 [eluser]haily_php[/eluser] I have 4 table in database, now, I want to select all data from those 4 table. And my code: Code: $this->db->select("*"); And, result is an array that I want (because "Table B" table and "Detail Bill" table relate to "Product" table, but I want to take data from one more table (Table A). Table A only relate to Table B Code: $this->db->select("*"); I don't know what do I do to join "Table A" to take data. Sorry, my english is not well Join multi other table - El Forum - 05-27-2011 [eluser]gigas10[/eluser] Like this maybe? Code: $this->db->select("A.*, B.*, P.*, D.*"); Please make sure your quotes are consistent either between single quotes or double quotes while surrounding method parameters. Join multi other table - El Forum - 08-15-2011 [eluser]Unknown[/eluser] thans... :-) |