Closed agravatfemina closed 7 years ago
@agravatfemina I've fixed this for you in the latest version (v.0.15.0). join
method had an undocumented and not-fully-working escape parameter. It used to just escape the table name but now it will not escape the conditions of the join as well.
I've updated the documentation, but, all you should need to do now is this:
queryBuilder.join(
'tbl_user as u',
'CASE WHEN m.iMsgTo ='+params.iUserID+' THEN m.iMsgFrom = u.user_id WHEN m.iMsgFrom ='+params.iUserID+' THEN m.iMsgTo = u.user_id END',
'INNER',
false
);
Notice the final false
parameter.
Hope that helps!
queryBuilder.join('tbl_user as u','CASE WHEN
m
.iMsgTo
='+params.iUserID+' THENm
.iMsgFrom
=u
.user_id
WHENm
.iMsgFrom
='+params.iUserID+' THENm
.iMsgTo
=u
.user_id
END','INNER');This is a subpart of query. When I am executing this query query builder is adding
CASE
WHEN
.Please help me with this. i don't want to add this ` sign with join on query.Need help ASAP.