If there is a JOIN with multiple conditions it does not escape everything
->join('tasks', 'projects.id = tasks.project_id AND tasks.deleted=0', 'left')
does not add the table prefix to the condition tasks.deleted=0
I have the same issue using postgre driver... please fix this one this a major bug !
Tim, thanks for addressing this issue. I think it might need some tweaking, or I am not implementing correctly. Using the above query as an example.
$this->db->join('tasks', 'projects.id = tasks.project_id AND tasks.deleted=0', 'left')
will create a query string like
LEFT JOIN `tasks` ON `projects`.`id` = `tasks`.`project_id` AND `tasks`.`deleted`=`0`
Protecting 0 causes a MySQL error. I'm not even sure if this type of case should be automatically handled in the join method. I would of course like it to be, but it might break some other case. For now, I'm just protecting identifiers long hand in the active record query itself, kind of like this post.
This issue is related to #758 and if properly fixed may replace the solution given on #759.
Line 331 should match breaklines and tabs too.
This is being handled in #759.
Add changelog entry for issue #7