![]() |
correct join syntax for model - 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: correct join syntax for model (/showthread.php?tid=3067) |
correct join syntax for model - El Forum - 09-07-2007 [eluser]kbauman[/eluser] I'm creating a model, and am wondering if this the correct syntax for a join, with a where, and an orderby. Code: $this->db->select('*'); or is it this: Code: $this->db->select('*'); correct join syntax for model - El Forum - 09-07-2007 [eluser]zdknudsen[/eluser] If I am perceiving this right, I'd go with your first guess. Except there is one things that will make PHP badmouth: Code: $this->db->join('categories_gallery', 'categories_gallery.gallery_id'='gallery.id') Code: $this->db->join('categories_gallery', 'categories_gallery.gallery_id = gallery.id') Otherwise I am fairly sure it is right ![]() correct join syntax for model - El Forum - 09-07-2007 [eluser]kbauman[/eluser] Oh yes, thank you! |