summaryrefslogtreecommitdiff
path: root/lib/dblib.lua
diff options
context:
space:
mode:
authorNicolas "Pixel" Noble <pixel@nobis-crew.org>2010-11-29 10:29:38 +0100
committerNicolas "Pixel" Noble <pixel@nobis-crew.org>2010-11-29 10:29:38 +0100
commitc99762a8980e691bab478f67b56b3fde56694e86 (patch)
treec9ff9ebc6982ca89c2aaa299344d1ebb691b7ab2 /lib/dblib.lua
parentc7f53415c7dc0445ae58a790fc5bf51725a66d9c (diff)
Making it so the count operator in dblib returns a number and not a string.
Diffstat (limited to 'lib/dblib.lua')
-rw-r--r--lib/dblib.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/dblib.lua b/lib/dblib.lua
index 271d5a1..64ce880 100644
--- a/lib/dblib.lua
+++ b/lib/dblib.lua
@@ -759,7 +759,7 @@ END;
count = function(t)
_luadb.iselect(true, t, {"COUNT(*) AS count"})
local row = t:nextrow()
- return row.count or row.COUNT
+ return ((row.count or row.COUNT) or 0) + 0
end,
gselect = function(t, ...)