brunoshp Posted June 12, 2013 Posted June 12, 2013 i need to add Ranking wot in this raking pvp. mes "Ok, this is Ranking WoT[TOP 10]"; next; query_sql "SELECT name, wotrank FROM char ORDER BY char DESC LIMIT 10",@name$,@charwot; dispbottom "Ranking WOT [TOP 10]"; dispbottom " "; dispbottom "Player < x > Position"; dispbottom " "; for(set @i,0;@i<=9;set @i,@i+1) { dispbottom "["+(@i+1)+"] < x > "+@name$[@i]+" < x > "+@charwot[@i]+""; } close; my table in database : ALTER TABLE `char` ADD `wotrank` INT NOT NULL ; this not ok, help me to fix!! pls! Quote
Capuche Posted June 12, 2013 Posted June 12, 2013 Don't forget ` in the query, sometimes that make an issue mes "Ok, this is Ranking WoT[TOP 10]"; next; query_sql "SELECT `name`, `wotrank` FROM `char` where `wotrank` != 0 ORDER BY `wotrank` DESC LIMIT 10", .@name$, .@charwot; if ( .@charwot == 0 ) { dispbottom "The ranking is empty."; close; } dispbottom "Ranking WOT [TOP 10]"; dispbottom " "; dispbottom "Player < x > Position"; dispbottom " "; for(set .@i,0; .@i<=9; set .@i, .@i+1 ) { dispbottom "["+(.@i+1)+"] < x > "+ .@name$[.@i] +" < x > "+ @charwot[.@i] +""; } close; 1 Quote
brunoshp Posted June 12, 2013 Author Posted June 12, 2013 (edited) if i need to reset ranking, how i do? Edited June 12, 2013 by brunoshp Quote
Capuche Posted June 12, 2013 Posted June 12, 2013 if i need to reset ranking, how i do? update `char` set `wotrank` = 0 1 Quote
brunoshp Posted June 12, 2013 Author Posted June 12, 2013 (edited) Thx for all! Edited June 12, 2013 by brunoshp Quote
Question
brunoshp
i need to add Ranking wot in this raking pvp.
my table in database :
this not ok, help me to fix!! pls!
4 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.