Selamlar



[ Kadın - Erkek l+l Elmorad - Karus ]







vb. yerlere koyabileceğinizi düşünerek yazdım

[/b]
PHP- Kodu:
CREATE*PROCEDURE*BestOfServer
@Komut*char(21)
AS

--*
Prosedür*Trayhoper*Tarafından*Yazılmıştır*..
--*
Hatalıysam*çaldır*kapat,ben*seni*ararım*::O

DECLARE*@EmcWarrior*varchar(21),@EmcPriest*varchar(21),@EmcMage*varchar(21),@EmcRogue*varchar(21)
DECLARE*@
Barbar*varchar(21),@EmcFeMaleWar*varchar(21),@EmcFeMalePri***varchar(21),@EmcFeMaleMage*varchar(21),@EmcFeMaleRog*varchar(21)
DECLARE*@
OrcWarrior*varchar(21),@OrcPriest*varchar(21),@OrcMage*varchar(21),@OrcRogue*varchar(21),@OrcFeMalePri*varchar(21)
IF*@
Komut*=*'Warrior'*
****
BEGIN
********SELECT*@EmcWarrior*=**strUserID*FROM*USERDATA*WHERE*Class*=*206*AND*Race*=*12*ORDER*BY*Loyalty*Asc
********print*'En*Iyi*Elmorad*Erkek*Warrior*:*'*+*@EmcWarrior
********SELECT*@Barbar*=**strUserID*FROM*USERDATA*WHERE*Class*=*206*AND*Race*=*11*ORDER*BY*Loyalty*Asc
********print*'En*iyi*Elmorad*Barbar*Warrior*:*'*+*@Barbar
********SELECT*@EmcFeMaleWar*=**strUserID*FROM*USERDATA*WHERE*Class*=*206*AND*Race*=*13*ORDER*BY*Loyalty*Asc
********print*'En*iyi*Elmorad*Kadın*Warrior*:*'*+*@EmcFeMaleWar
********SELECT*@OrcWarrior*=**strUserID*FROM*USERDATA*WHERE*Class*=*106*AND*Race*=*1*ORDER*BY*Loyalty*Asc
********print*'En*Iyi*Karus*Barbar*Warrior*:*'*+*@OrcWarrior
****RETURN
END
IF*@Komut*=*'Priest'
****BEGIN
********SELECT*@EmcPriest*=*strUserID*FROM*USERDATA*WHERE*Class*=*204*AND*Race*=*12*ORDER*BY*Loyalty*Asc
********print*'En*iyi*Elmorad*Erkek*Priest*:*'*+*@EmcPriest
********SELECT*@EmcFeMalePri*=*strUserID*FROM*USERDATA*WHERE*Class*=*204*AND*Race*=*13*ORDER*BY*Loyalty*Asc
********print*'En*iyi*Elmorad*Kadın*Priest*:*'*+*@EmcFeMalePri
********SELECT*@OrcPriest*=*strUserID*FROM*USERDATA*WHERE*Class*=*104*AND*Race*=*2*ORDER*BY*Loyalty*Asc
********print*'En*iyi*Karus*Erkek*Priest*:*'*+*@OrcPriest
********SELECT*@OrcFeMalePri*=*strUserID*FROM*USERDATA*WHERE*CLass*=*104*AND*Race*=*4*ORDER*BY*Loyalty*Asc
********print*'En*iyi*Karus*Kadın*Priest*:*'*+*@OrcFeMalePri
****RETURN
END
IF*@Komut*=*'Mage'
****BEGIN
********SELECT*@EmcMage*=*strUserID*FROM*USERDATA*WHERE*Class*=*210*AND*Race*=*12*ORDER*BY*Loyalty*Asc
********print*'En*iyi*Elmorad*Erkek*Mage*:*'*+*@EmcMage
********SELECT*@EmcFeMaleMage*=*strUserID*FROM*USERDATA*WHERE*Class*=*210*AND*Race*=*13*ORDER*BY*Loyalty*Asc
********print*'En*iyi*Elmorad*Kadın*Mage*:*'*+*@EmcFeMaleMage****
********
SELECT*@OrcMage*=*strUserID*FROM*USERDATA*WHERE*Class*=*110*AND*Race*=*3*ORDER*BY*Loyalty*Asc
********print*'En*iyi*Karus*Wrinkle*Mage*:*'*+*@OrcMage
****RETURN
END
IF*@Komut*=*'Rogue'
****BEGIN
********SELECT*@EmcRogue*=*strUserID*FROM*USERDATA*WHERE*Class*=*208*AND*Race*=*12*ORDER*BY*Loyalty*Asc
********print*'En*iyi*Elmorad*Erkek*Rogue*:*'*+*@EmcRogue
********SELECT*@EmcFeMaleRog*=*strUserID*FROM*USERDATA*WHERE*Class*=*208*AND*Race*=*13*ORDER*BY*Loyalty*Asc
********print*'En*iyi*Elmorad*Kadın*Rogue*:*'*+*@EmcFeMaleRog
********SELECT*@OrcRogue*=*strUserID*FROM*USERDATA*WHERE*Class*=*108*AND*Race*=*2*ORDER*BY*Loyalty*Asc
********print*'En*iyi*Karus*Erkek*Rogue*:*'*+*@OrcRogue
****RETURN
END
IF*@Komut*=*'Hepsi'
****BEGIN
********SELECT*@EmcWarrior*=**strUserID*FROM*USERDATA*WHERE*Class*=*206*AND*Race*=*12*ORDER*BY*Loyalty*Asc
********print*'En*Iyi*Elmorad*Erkek*Warrior*:*'*+*@EmcWarrior
********SELECT*@Barbar*=**strUserID*FROM*USERDATA*WHERE*Class*=*206*AND*Race*=*11*ORDER*BY*Loyalty*Asc
********print*'En*iyi*Elmorad*Barbar*Warrior*:*'*+*@Barbar
********SELECT*@EmcFeMaleWar*=**strUserID*FROM*USERDATA*WHERE*Class*=*206*AND*Race*=*13*ORDER*BY*Loyalty*Asc
********print*'En*iyi*Elmorad*Kadın*Warrior*:*'*+*@EmcFeMaleWar
********SELECT*@EmcPriest*=*strUserID*FROM*USERDATA*WHERE*Class*=*204*AND*Race*=*12*ORDER*BY*Loyalty*Asc
********print*'En*iyi*Elmorad*Erkek*Priest*:*'*+*@EmcPriest
********SELECT*@EmcFeMalePri*=*strUserID*FROM*USERDATA*WHERE*Class*=*204*AND*Race*=*13*ORDER*BY*Loyalty*Asc
********print*'En*iyi*Elmorad*Kadın*Priest*:*'*+*@EmcFeMalePri
********SELECT*@EmcMage*=*strUserID*FROM*USERDATA*WHERE*Class*=*210*AND*Race*=*12*ORDER*BY*Loyalty*Asc
********print*'En*iyi*Elmorad*Erkek*Mage*:*'*+*@EmcMage
********SELECT*@EmcFeMaleMage*=*strUserID*FROM*USERDATA*WHERE*Class*=*210*AND*Race*=*13*ORDER*BY*Loyalty*Asc
********print*'En*iyi*Elmorad*Kadın*Mage*:*'*+*@EmcFeMaleMage****
********
SELECT*@EmcRogue*=*strUserID*FROM*USERDATA*WHERE*Class*=*208*AND*Race*=*12*ORDER*BY*Loyalty*Asc
********print*'En*iyi*Elmorad*Erkek*Rogue*:*'*+*@EmcRogue
********SELECT*@EmcFeMaleRog*=*strUserID*FROM*USERDATA*WHERE*Class*=*208*AND*Race*=*13*ORDER*BY*Loyalty*Asc
********print*'En*iyi*Elmorad*Kadın*Rogue*:*'*+*@EmcFeMaleRog
********SELECT*@OrcWarrior*=**strUserID*FROM*USERDATA*WHERE*Class*=*106*AND*Race*=*1*ORDER*BY*Loyalty*Asc
********print*'En*Iyi*Karus*Barbar*Warrior*:*'*+*@OrcWarrior
********SELECT*@OrcPriest*=*strUserID*FROM*USERDATA*WHERE*Class*=*104*AND*Race*=*2*ORDER*BY*Loyalty*Asc
********print*'En*iyi*Karus*Erkek*Priest*:*'*+*@OrcPriest
********SELECT*@OrcFeMalePri*=*strUserID*FROM*USERDATA*WHERE*CLass*=*104*AND*Race*=*4*ORDER*BY*Loyalty*Asc
********print*'En*iyi*Karus*Kadın*Priest*:*'*+*@OrcFeMalePri
********SELECT*@OrcMage*=*strUserID*FROM*USERDATA*WHERE*Class*=*110*AND*Race*=*3*ORDER*BY*Loyalty*Asc
********print*'En*iyi*Karus*Wrinkle*Mage*:*'*+*@OrcMage
********SELECT*@OrcRogue*=*strUserID*FROM*USERDATA*WHERE*Class*=*108*AND*Race*=*2*ORDER*BY*Loyalty*Asc
********print*'En*iyi*Karus*Erkek*Rogue*:*'*+*@OrcRogue
****RETURN
END
GO






: Kullanım :



Kod:
exec BestOfServer 'Hepsi'

Bu prosedür ırka,gender ve np ye göre en iyileri belirliyor.Query Analyser a yazıp f5 yaparsanız listeyi görebilir ve kopanele yapıştırabilirsiniz.Tek tek görmek istiyorsanız kullanımda Hepsi yerine :



Mage,Priest,Warrior,Rogue



yazarak o classların enlerini öğrenebilirsiniz ..



Kolay Gelsin


Kullanımı ...



1 Başlat > Tüm Programlar > Microsoft SQL Server > Query Analyzer ‘ a giriyoruz.

2 SQL Server’ a bağlanıyoruz ve açılan ekranda ” master ” yerine ” DBmizi ” seçiyoruz.

3 Seçtikten sonra aşağıdaki kodu kopyalayıp , yapıştırıyoruz ve F5 yaparak kodumuzu uyguluyoruz.