09-01-2009, 04:01 PM
[eluser]Clooner[/eluser]
The following statement gives me problems
It causes problems because vat() returns a value of 1.19.
This will generate mysql code which is invalid.
I tried to use $this->db->protect_identifiers but this function doesn't allow you to disable the backticks. How can I disable the backticks generated for the 1.19 value?
The following statement gives me problems
Code:
$this->db->select('round(produces.price*produces.discount*'.vat().',2) as price');
This will generate mysql code which is invalid.
Code:
`round(produces`.`price*produces`.`discount*1`.`19`, `2)`
I tried to use $this->db->protect_identifiers but this function doesn't allow you to disable the backticks. How can I disable the backticks generated for the 1.19 value?