Active Record Join with Table Alias and Table Prefix |
[eluser]Firestorm ZERO[/eluser]
I'm using CI v1.6.1. Doing this... Code: $this->db->select('a.name, b.name'); will produce the query... Code: SELECT pre_a.name, pre_b.name Expected result is... Code: SELECT a.name, b.name The problem only occurs if you have a table prefix (in the example above it is "pre_"). I just did a search and apparently this problem happened before. http://codeigniter.com/bug_tracker/bug/1825/ But it says it is resolved. Seems it popped back. EDIT: Apparently, the 1st join will also have the prefix in the ON statement. But the 2nd join doesn't. I think because if I'm using the same table. |
Messages In This Thread |
Active Record Join with Table Alias and Table Prefix - by El Forum - 04-09-2008, 07:12 PM
Active Record Join with Table Alias and Table Prefix - by El Forum - 04-10-2008, 08:03 AM
Active Record Join with Table Alias and Table Prefix - by El Forum - 04-10-2008, 08:54 AM
Active Record Join with Table Alias and Table Prefix - by El Forum - 04-10-2008, 09:00 AM
Active Record Join with Table Alias and Table Prefix - by El Forum - 04-15-2008, 02:02 PM
Active Record Join with Table Alias and Table Prefix - by El Forum - 04-15-2008, 09:11 PM
|