• 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!

Lua Database Query, Easy Rep+

Trader

New Member
Joined
Aug 12, 2009
Messages
219
Reaction score
2
Hello,

I would like a database query to set a table in my db to +1
For deeper explanation: I would like a NPC to set VIP Days 'table' in my database to +10 days

Can anyone help me with the database query? Should look something like this?
Code:
db.executeQuery('UPDATE players SET level = 8, experience = 4200 WHERE id = ' .. guid)
(Except that's for Levels)
 
PHP:
UPDATE `accounts` SET `vipdays` = `vipdays` + 10 WHERE `id` = " .. getPlayerAccountId(cid) .. ";

vipdays is the table name in accounts, change it if you have for example vip days or VIPDAYS table and so on.
 
[i am late again :(]if the vip daye is in the players table then use this
Code:
db.executeQuery("UPDATE `players` SET `Vip Days` = `Vip Days`+ '10'  WHERE `id`= '" .. getPlayerGUID(cid).."' ;)
?
 
Back
Top