Getting value from query
I'm having problems with getting a value from a single column call.
select sum(price) as testPrice from sales where quantity > 10
but when I inspect the resultset, I get the following,
Any help is appreciated, thank you.
That is a very strange result. I am curious why you are not writing the query using ActiveRecord methods:
@testPrice = Sale.sum(:price, :conditions => "quantity > 10")