You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
That's because some string search and replace is in action rather than parsing the SQL. It's document that CI only tries:
$this->db->select() accepts an optional second parameter. If you set it to FALSE, CodeIgniter will not try to protect your field or table names with backticks. This is useful if you need a compound select statement. [Highlight added]
Use $this->db->select("COALESCE(price * amount, 0.0 )", FALSE); instead.
When using the mysqli adapter and the following database select:
The resulting SQL Statement will look like this:
See the wrong order of ) and ' in the COALESCE function. When I add a whitespace in the method call like this:
then the generated sql is correct.
The text was updated successfully, but these errors were encountered: