Welcome Guest, Not a member yet? Register   Sign In
Query escaping not working, or am I doing it wrong?

I'm trying the following query:
$this->db->select('ROUND(SUM(amount) / 100, 2) as amount', FALSE);
but it comes out as
ROUND(SUM(amount) / 100, `2)` as amount
I tried spaces, quotes, backticks, pulling my hair out, but I can't get it to work.

To solve, I think I could write this part as plain SQL. But this is part of a bigger query. Can I combine CI-based query ($this->db->select_sum('payers')Wink with that? Thanks in advance!

Theme © iAndrew 2016 - Forum software by © MyBB