I use in my globalevents every times that my ot reopen:
function onStartup()
db.executeQuery("DELETE FROM `server_record` WHERE 'record' > 1;")
I need a script that get before this the last timestamp of the record bigger.
Ex: record of players: 37 in db: of this timestamp 19293293 << get this and put in record = 1 and after clean record...
Ex:
local timestamp_last_record = db.getResult("SELECT `timestamp` FROM `server_record` WHERE `record` ORDER BY `record` DESC LIMIT 1;
db.executeQuery("UPDATE `server_record` SET `timestamp` = " .. last_record .. "' WHERE `record` = 1;")
But dont work. I am noob and dont know the programations organitazion and logic.
Can someone help me I am very idiot and begginer in programation... thanks.
function onStartup()
db.executeQuery("DELETE FROM `server_record` WHERE 'record' > 1;")
I need a script that get before this the last timestamp of the record bigger.
Ex: record of players: 37 in db: of this timestamp 19293293 << get this and put in record = 1 and after clean record...
Ex:
local timestamp_last_record = db.getResult("SELECT `timestamp` FROM `server_record` WHERE `record` ORDER BY `record` DESC LIMIT 1;
db.executeQuery("UPDATE `server_record` SET `timestamp` = " .. last_record .. "' WHERE `record` = 1;")
But dont work. I am noob and dont know the programations organitazion and logic.
Can someone help me I am very idiot and begginer in programation... thanks.