• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[Active Records] Disabling the protection of identifiers

#1
[eluser]Clooner[/eluser]
The following statement gives me problems
Code:
$this->db->select('round(produces.price*produces.discount*'.vat().',2) as price');
It causes problems because vat() returns a value of 1.19.

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?


Messages In This Thread
[Active Records] Disabling the protection of identifiers - by El Forum - 09-01-2009, 04:01 PM

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.