Welcome Guest, Not a member yet? Register   Sign In
how to do multiple selects and arithmetic using Active Record
#1

[eluser]ginger_tosser[/eluser]
hi,

not sure if this is possible in AR but I'm trying to convert the following SQL into AR

SELECT value_SI, description from `values` where value_SI < (SELECT 1/(SELECT convert2SI FROM `units` WHERE unit='hands')) ORDER BY value_SI DESC LIMIT 4;

I'm using the arithmetic functions within MySQL so maybe trying to use the AR abstraction is just wrong because I suppose not all DB's support maths.

Anyone???


Messages In This Thread
how to do multiple selects and arithmetic using Active Record - by El Forum - 02-20-2008, 02:46 PM



Theme © iAndrew 2016 - Forum software by © MyBB