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

How to make a check on database

president vankk

Web Developer & AuraOT Owner
Joined
Jul 10, 2009
Messages
5,719
Solutions
9
Reaction score
339
Hi my friends,

I'm currently developing a script and I got stucked to how I can make a check on a table on database.. If table X on player account are seted to 1 then will return true.

Can someone explain me about to how make checks on database like I said above?

Thans.
 
Hi my friends,

I'm currently developing a script and I got stucked to how I can make a check on a table on database.. If table X on player account are seted to 1 then will return true.

Can someone explain me about to how make checks on database like I said above?

Thans.
Provide the script so someone can help you
 
@Ninja already helped me by giving me the example below

Code:
local resultId = db.storeQuery('SELECT `premium_points` FROM `accounts` WHERE `id` = ' .. player:getAccountId())
if resultId then
    local points = result.getNumber(resultId, 'premium_points')
    print(points)
    result.free(resultId)
end
 
Back
Top