huuduyen_05
10-03-08, 11:26 AM
Đây là đoạn code để update rank (thứ hạng) trong Audition.
Các bạn copy nó rồi paste vào khung Query trong SQLyog (nếu dùng chương trình khác thì tự tìm hiểu :D )
Xong rồi click Excute all queries (phím tắt Shift + F5)
use audition;
truncate table rank; insert into rank(usernick,exp) select usernick,exp from userinfo order by exp desc limit 100;
truncate table rank_temp; insert into rank_temp(usernick,exp) select usernick,exp from userinfo order by exp desc limit 100;truncate table story_rank; insert into story_rank(usernick,exp,totalclear) select usernick,exp,totalclear from story_rank_temp order by totalclear desc limit 100;
truncate table story_weekly_rank; insert into story_weekly_rank(usernick,exp,totalclear) select usernick,exp,totalclear from story_rank_temp order by totalclear desc limit 100;
truncate table beatup_tournament_rank; insert into beatup_tournament_rank(usersn,usernick,Point,WinCo unt,TotalPoint) select usersn,usernick,Point,WinCount,TotalPoint from beatup_tournament_rank2 order by usersn,Point,WinCount,TotalPoint desc limit 100;
truncate table tournament_rank; insert into tournament_rank(usersn,usernick,Point,WinCount,Tot alPoint) select usersn,usernick,Point,WinCount,TotalPoint from beatup_tournament_rank2 order by usersn,Point,WinCount,TotalPoint desc limit 100;
Các bạn copy nó rồi paste vào khung Query trong SQLyog (nếu dùng chương trình khác thì tự tìm hiểu :D )
Xong rồi click Excute all queries (phím tắt Shift + F5)
use audition;
truncate table rank; insert into rank(usernick,exp) select usernick,exp from userinfo order by exp desc limit 100;
truncate table rank_temp; insert into rank_temp(usernick,exp) select usernick,exp from userinfo order by exp desc limit 100;truncate table story_rank; insert into story_rank(usernick,exp,totalclear) select usernick,exp,totalclear from story_rank_temp order by totalclear desc limit 100;
truncate table story_weekly_rank; insert into story_weekly_rank(usernick,exp,totalclear) select usernick,exp,totalclear from story_rank_temp order by totalclear desc limit 100;
truncate table beatup_tournament_rank; insert into beatup_tournament_rank(usersn,usernick,Point,WinCo unt,TotalPoint) select usersn,usernick,Point,WinCount,TotalPoint from beatup_tournament_rank2 order by usersn,Point,WinCount,TotalPoint desc limit 100;
truncate table tournament_rank; insert into tournament_rank(usersn,usernick,Point,WinCount,Tot alPoint) select usersn,usernick,Point,WinCount,TotalPoint from beatup_tournament_rank2 order by usersn,Point,WinCount,TotalPoint desc limit 100;