From c99762a8980e691bab478f67b56b3fde56694e86 Mon Sep 17 00:00:00 2001 From: "Nicolas \"Pixel\" Noble" Date: Mon, 29 Nov 2010 10:29:38 +0100 Subject: Making it so the count operator in dblib returns a number and not a string. --- lib/dblib.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib') 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, ...) -- cgit v1.2.3