$this->default->join('db D', 'C.col1 = D.col1 AND D.col2 = "MAIN"', 'LEFT');
I am getting 500 error on this join in CI but when i only use
$this->default->join('db D', 'C.col1 = D.col1', 'LEFT');
query is ok.
How to do join in CI with and in the ON part of the join?
FYI
- Tried the entire query in MS SQL Server Management Studio and it runs ok.
- Putting
D.col2 = "MAIN"
in where clause also works