![]() |
CI 1.7: $db->get() and Join - 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: CI 1.7: $db->get() and Join (/showthread.php?tid=12789) |
CI 1.7: $db->get() and Join - El Forum - 10-31-2008 [eluser]Unknown[/eluser] As like as this post: http://ellislab.com/forums/viewthread/95148/ My code is Code: $this->db->select('user_detail.*, industries.name industry_name'); But I get error because the translated sql is listed below: Quote:SELECT user_detail.*, industries.name industry_nameLook the line 2, there are two same table name split by comma. The comma is redundant. CI 1.7: $db->get() and Join - El Forum - 10-31-2008 [eluser]henrihnr[/eluser] [quote author="Derek Hsu" date="1225466660"]As like as this post: http://ellislab.com/forums/viewthread/95148/ My code is Code: $this->db->from('user_detail'); [/quote] notice 2 lines of code above..you've defined table twice.. CI 1.7: $db->get() and Join - El Forum - 11-02-2008 [eluser]Unknown[/eluser] The same code was ok in 1.6.3. But it's not work in 1.7.0 |