Fixed SQLite error (unknown value for column)

This commit is contained in:
Timo Smit 2017-03-02 08:48:29 +01:00
parent 0d5e1ceaca
commit 7e0b9c5aba

View file

@ -32,7 +32,7 @@ local cur
-- players -- players
function sqlite3.addplayer(guid, ip, lastSeen, seen) function sqlite3.addplayer(guid, ip, lastSeen, seen)
cur = assert(con:execute("INSERT INTO `player` (`guid`, `ip`, `level_id`, `lastseen`, `seen`) VALUES ('"..util.escape(guid).."', '"..util.escape(ip).."', "..tonumber(lastSeen)..", "..tonumber(seen)..")")) cur = assert(con:execute("INSERT INTO `player` (`guid`, `ip`, `level_id`, `lastseen`, `seen`) VALUES ('"..util.escape(guid).."', '"..util.escape(ip).."', 0, "..tonumber(lastSeen)..", "..tonumber(seen)..")"))
end end
function sqlite3.updateplayer(guid, ip, lastSeen) function sqlite3.updateplayer(guid, ip, lastSeen)