• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Code For DataBase

Elexonic

Well-Known Member
Joined
Jun 18, 2008
Messages
1,920
Reaction score
59
I need to fix this code and that is wrong = /

Code:
function onThink(interval, lastExecution, thinkInterval)
    db.query('UPDATE `player_storage` SET `value` = '0' WHERE `key` = '155'')
    return true
end
 
Um, try this... :huh:

Code:
function onThink(interval)
    db.executeQuery("UPDATE `player_storage` SET `value` = "0" WHERE `key` = "155"")
    return true
end
 
Last edited:
Error->
storagee.png
 
It should be:
PHP:
function onThink(interval)
    db.executeQuery("UPDATE `player_storage` SET `value` = '0' WHERE `key` = '155'")
    return true
end
and if you want to use any string or value from player you should use:
PHP:
function onThink(interval)
    db.executeQuery("UPDATE `player_storage` SET `value` = ".. db.escapeString(param1) .." WHERE `key` = ".. db.escapeString(param2))
    return true
end
 
now I have no time to test proves hope after all that work ..

Also if anyone would know do not work a scrtip that you remove the log in storage?

Onlogout
if getPlayerStorageValue(cid, 155) < 1 then
 
Back
Top