How To Bring Together Multiple Tables Inward Codeigniter?
By using CodeIgniter's Active Record class, yous tin forcefulness out only utilization the bring together method multiple times to bring together multiple tables.
Read to a greater extent than especial on https://ellislab.com/codeigniter/user-guide/database/active_record.html
Sumber http://developer-paradize.blogspot.com
$this->db->select('*'); $this->db->join('table2', 'table2.ID = table1.ID'); $this->db->join('table3', 'table3.ID = table1.ID'); $this->db->from('table1');Permits yous to write the JOIN component division of your query. If yous require a specific type of JOIN yous tin forcefulness out specify it via the 3rd parameter of the function. Options are: left, right, outer, inner, left outer, together with correct outer.
$this->db->join('table4', 'table4.ID = table1.ID', 'left'); // Produces: LEFT JOIN table4 ON table4.ID = table1.ID
Read to a greater extent than especial on https://ellislab.com/codeigniter/user-guide/database/active_record.html
Sumber http://developer-paradize.blogspot.com
Comments
Post a Comment