CodeIgniter Forums
need help table join using mysql - 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: need help table join using mysql (/showthread.php?tid=6887)



need help table join using mysql - El Forum - 03-16-2008

[eluser]vadivel[/eluser]
hi frnds
im now begin to learn ci
im need ur help, how to join more then two table
in mysql pls any one tell me with example
thanks in advance


need help table join using mysql - El Forum - 03-16-2008

[eluser]Ruben Müller[/eluser]
It would be easier if you post your query and which tables you want to join. Smile

But basically it´s just:

Code:
$this->db->select('*');
$this->db->from('blogs');
$this->db->join('comments', 'comments.id = blogs.id');

$query = $this->db->get();

// Produces:
// SELECT * FROM blogs
// JOIN comments ON comments.id = blogs.id



need help table join using mysql - El Forum - 03-16-2008

[eluser]vadivel[/eluser]
thnx Ruben
im try this but that not able to get two table value
pls say some ideas


need help table join using mysql - El Forum - 03-17-2008

[eluser]vadivel[/eluser]
hi frnd
im solve the join proplam now im want join five table
how it's make it, any one say me