17 Ağustos 2009 Pazartesi

Grade Güncelle [ İlk 5=g1 , 5-10=g2, 10-15=g3 ]




Clan Grade Güncelleme Kodu
İlk 5 g0 ve g1
5 ile 10 Arasındaki clanlar grade 2
10 ile 15 arasındaki clanlar grade 3
Diğerleri İse nplerine göre grade atlarlar


Kod:
CREATE PROCEDURE g1
AS

-- ilk 5 g0 ve g1
---5 ile 10 arası g2
---10 ile 15 arası g3
---diğerleri nplerine göredir.
--- Www.limonforum.Com | ' Roshan.

update knights set points = '999999',ranking = '1'
where idname = (Select strname from KNIGHTS_RATING where nrank = 5)

update knights set points = 750000 where ranking=1
update knights set points = 750000 where ranking=2
update knights set points = 750000 where ranking=3
update knights set points = 750000 where ranking=4
update knights set points = 750000 where ranking=5
update knights set points = 350000 where idname = (Select strname from KNIGHTS_RATING where nrank = 6)
update knights set points = 350000 where idname = (Select strname from KNIGHTS_RATING where nrank = 7)
update knights set points = 350000 where idname = (Select strname from KNIGHTS_RATING where nrank = 8)
update knights set points = 350000 where idname = (Select strname from KNIGHTS_RATING where nrank = 9)
update knights set points = 350000 where idname = (Select strname from KNIGHTS_RATING where nrank = 10)
update knights set points = 150000 where idname = (Select strname from KNIGHTS_RATING where nrank = 11)
update knights set points = 150000 where idname = (Select strname from KNIGHTS_RATING where nrank = 12)
update knights set points = 150000 where idname = (Select strname from KNIGHTS_RATING where nrank = 13)
update knights set points = 150000 where idname = (Select strname from KNIGHTS_RATING where nrank = 14)
update knights set points = 150000 where idname = (Select strname from KNIGHTS_RATING where nrank = 15)

GO
HTML-Kodu:
Kullanım için :

exec g1

Hiç yorum yok: