• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[CI 3.1] QB Addition and subtraction in SELECT

It would be nice to make some totally custom SQL select string.
Now we can't make simply operations such addition or subtraction.

PHP Code:
->select('first_table.value - second_table.value AS difference'FALSE

it's produce:

first_table.prefix_value - second_table.value AS difference

It's adding database prefix to column name rather than table name. It would be ok if I could simply turn off prefixing (i can add it manually by prefix method). Maybe third argument?

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  

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