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

TFS 1.X+ Select multiple rows in database

zippy

Member
Joined
Feb 1, 2011
Messages
233
Reaction score
8
Hi,

i can't get this work. In only print one of the players level instead of multiple:
Lua:
db.asyncStoreQuery("SELECT `level` FROM `players` WHERE `id` IN (3, 4, 5, 6, 8)", function(resultId)
    if resultId then
        print(result.getNumber(resultId, "level"))
    end
end)

What i try to achive after fetching all the levels, i would like to use them.
 
You can also add id to your query to know which guid is which level. The example I linked selects two columns and gets data from them.
 
Back
Top