Kod:
PHP- Kodu:
CREATE PROCEDURE np_icon
AS
DECLARE
--This zzzzzzzzzzzz has been made by BERKİN GÜLER in 12.09.2007
--Bu zzzzzzzzzzzz BERKİN GÜLER tarafından 12.09.2007 tarihinde yapılmıştır
@berkin varchar(100),
@cigdm varchar(100),
@i int
BEGIN TRANSACTION
SELECT @berkin=strUserID FROM USERDATA WHERE Nation = '1' ORDER BY Loyalty
UPDATE USERDATA SET strUserID = '[D]' + @berkin WHERE strUserID = @berkin
SELECT @cigdm=strUserID FROM USERDATA WHERE Nation = '2' ORDER BY Loyalty
UPDATE USERDATA SET strUserID = '[D]' + @cigdm WHERE strUserID = @cigdm
IF @@error<>0
begin
rollback transaction
print 'Hata oluştu!'
end
else
begin
print 'ICON EKLEME ISLEMI BASARILI.'
print @berkin + 've' + @cigdm + ',' + '[D]' + @berkin + 've' + '[D]' + @cigdm + 'olarak degistirildi!'
end
COMMIT TRANSACTION
GO
PHP- Kodu:
CREATE PROCEDURE np_icon
AS
DECLARE
--This zzzzzzzzzzzz has been made by BERKİN GÜLER in 12.09.2007
--Bu zzzzzzzzzzzz BERKİN GÜLER tarafından 12.09.2007 tarihinde yapılmıştır
@berkin varchar(100),
@cigdm varchar(100),
@i int
BEGIN TRANSACTION
SELECT @berkin=strUserID FROM USERDATA WHERE Nation = '1' ORDER BY Loyalty
UPDATE USERDATA SET strUserID = '[D]' + @berkin WHERE strUserID = @berkin
SELECT @cigdm=strUserID FROM USERDATA WHERE Nation = '2' ORDER BY Loyalty
UPDATE USERDATA SET strUserID = '[D]' + @cigdm WHERE strUserID = @cigdm
IF @@error<>0
begin
rollback transaction
print 'Hata oluştu!'
end
else
begin
print 'ICON EKLEME ISLEMI BASARILI.'
print @berkin + 've' + @cigdm + ',' + '[D]' + @berkin + 've' + '[D]' + @cigdm + 'olarak degistirildi!'
end
COMMIT TRANSACTION
GO