Im running the following sql statment which returns 1 result.
pSql = "SELECT sum(amount)
my guess is that the result [#“18001.25”] is the result of the sum()
function you propagated in the sql statement - - you took what you want
to be aResult, and added them altogether to eventually add up to
18001.25 (which is the correct output for the sql-query)
i don’t really know what you have in your table, but what about taking
out the amount of each row, and then in the view/controller do a sum
action (if you need to)? in order to get aResult, just change
SELECT sum(amount) …
to
SELECT amount …
don’t know if it will fit your needs , but is it helping…?