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

MySQL id to array -> information

tavax

New Member
Joined
Apr 29, 2009
Messages
17
Reaction score
2
Hiho,

I have some doubts about a script...

SELECT `level`,`id` FROM `players` ORDER BY `players`.`level` DESC LIMIT 2 , 5;

well this work fine but `id` is array... because is 5 players...

E.G. Table

level id
93--------3
82--------9
70--------15
51--------12
49--------4

local PID = Result2:getDataInt("id")

When i do getPlayerGUID(cid) == PID dont work for players 9,15,12,4

Some one can help about this problem?

Solution...

for i = 0, 3, 1 do
Result2 = db.getResult("SELECT `level`,`id` FROM `players` ORDER BY `players`.`level` DESC LIMIT ".. k.." , ".. k ..";")
PID = Result2:getDataInt("id")
k=k+1
if getPlayerGUID(cid) == PID then
MORE CODE
end

end


 
Last edited:
Back
Top