codeigniter and mysql inner join creating problem - 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: codeigniter and mysql inner join creating problem (/showthread.php?tid=43792) |
codeigniter and mysql inner join creating problem - El Forum - 07-23-2011 [eluser]foysal[/eluser] my model Code: function get_customer() my controller Code: function index() my view Code: foreach($customer as $item) I am getting no result. Even no error coming. If you have good tutorial on mysql inner join and codeigniter, please share with me. foysal codeigniter and mysql inner join creating problem - El Forum - 07-23-2011 [eluser]InsiteFX[/eluser] Third parameter is the join type! Code: $this->db->join('tbl_sales', 'tbl_sales.customer_id = tbl_customer.customer_id', 'inner'); InsiteFX codeigniter and mysql inner join creating problem - El Forum - 07-23-2011 [eluser]foysal[/eluser] Dear Insite FX I tried your code. But I am getting only first table data. Even I tried below codes in my model Code: $this->db->select('tbl_customer.*,tbl_sales.*'); but i did not get data from both tables. If you have any good tutorial on mysql inner join and codeigniter you can share it with me. foysal codeigniter and mysql inner join creating problem - El Forum - 07-23-2011 [eluser]InsiteFX[/eluser] Code: return $query->result_array(); InsiteFX |