CodeIgniter Forums
Active Record Join bug? - 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: Active Record Join bug? (/showthread.php?tid=20937)



Active Record Join bug? - El Forum - 07-26-2009

[eluser]oppenheimer[/eluser]
I think the JOIN is interpreting the beginning of the table named "12-users" as a number.

Code:
$this->db->select('roles.name');
$this->db->JOIN('roles', '12-users.role_id = roles.id');
$query = $this->db->get('12-users');

Perhaps this is normal behavior and I need to change my table name?

See post http://ellislab.com/forums/viewthread/124265/


Active Record Join bug? - El Forum - 07-26-2009

[eluser]oppenheimer[/eluser]
Looks like a bug report was already filed on incorrect escaping with active record join:

http://codeigniter.com/bug_tracker/bug/7692/