GarQet
Own3d!
- Joined
- Feb 10, 2009
- Messages
- 1,381
- Solutions
- 14
- Reaction score
- 81
Hello guys, i have small request.
How to sum up the three highest scores from database?
Why is this not working?
How to sum up the three highest scores from database?
LUA:
local sum = db.getResult("SELECT SUM(top) FROM `players` WHERE `o` = 1 ORDER BY `top` DESC LIMIT 3")
if(sum:getID() == -1) then
return true
end
local res = sum:getDataInt("SUM(top)")
sum:free()