![]() |
[CI 3.1] QB Addition and subtraction in SELECT - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Development (https://forum.codeigniter.com/forumdisplay.php?fid=6) +--- Forum: Issues (https://forum.codeigniter.com/forumdisplay.php?fid=19) +--- Thread: [CI 3.1] QB Addition and subtraction in SELECT (/showthread.php?tid=66428) |
[CI 3.1] QB Addition and subtraction in SELECT - ebizo - 10-21-2016 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? |