Welcome Guest, Not a member yet? Register   Sign In
Database class adding graves ("`") where they don't belong
#1

[eluser]mattalexx[/eluser]
I have a weird join:
Code:
// ...
$this->db->join('areas', 'IF(properties.ovr_area_id, properties.ovr_area_id, properties.mls_area_id) = areas.id');
// ...
But the Database class/Active Record turns it into this:
Code:
# ...
JOIN `areas` ON `IF`(`properties`.`ovr_area_id,` properties.ovr_area_id, properties.mls_area_id) = areas.id
# ...
No comment on the inefficiency of this SQL is necessary -- I already know. MySQL doesn't mind a join like this though and it should be allowed to work correctly.

Anyone have any ideas?


Messages In This Thread
Database class adding graves ("`") where they don't belong - by El Forum - 11-14-2008, 02:28 PM



Theme © iAndrew 2016 - Forum software by © MyBB