Welcome Guest, Not a member yet? Register   Sign In
[CI 3.1] QB Addition and subtraction in SELECT
#1
Brick 
(This post was last modified: 10-25-2016, 01:24 AM by ebizo.)

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

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

it's produce:

Code:
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?
Reply




Theme © iAndrew 2016 - Forum software by © MyBB