Kod:
PHP- Kodu:
create procedure [NameChange]
(@oldname varchar(30),@newname varchar(30))
AS DECLARE @clannumber smallint, @length int,@row int,@i int,@dwid int,@pos int,@dur int,@dur1 int,@ext int,@StackSize1 int,@strName varchar(30),@strExtName varchar(30),@Cdwid varbinary(4),@cdur varchar(2),@cstack varchar(2)
begin tran
Update account_char set strcharid1 = @newname where strcharid1 = @oldname
Update account_char set strcharid2 = @newname where strcharid2 = @oldname
Update account_char set strcharid3 = @newname where strcharid3 = @oldname
Update userdata set struserid = @newname Where struserid = @oldname
Update knights_user set struserid = @newname Where struserid = @oldname
Update knights set chief = @newname where chief = @oldname
Update knights set vicechief_1 = @newname where vicechief_1 = @oldname
Update knights set vicechief_2 = @newname where vicechief_2 = @oldname
Update knights set vicechief_3 = @newname where vicechief_3 = @oldname
commit tran
PHP- Kodu:
create procedure [NameChange]
(@oldname varchar(30),@newname varchar(30))
AS DECLARE @clannumber smallint, @length int,@row int,@i int,@dwid int,@pos int,@dur int,@dur1 int,@ext int,@StackSize1 int,@strName varchar(30),@strExtName varchar(30),@Cdwid varbinary(4),@cdur varchar(2),@cstack varchar(2)
begin tran
Update account_char set strcharid1 = @newname where strcharid1 = @oldname
Update account_char set strcharid2 = @newname where strcharid2 = @oldname
Update account_char set strcharid3 = @newname where strcharid3 = @oldname
Update userdata set struserid = @newname Where struserid = @oldname
Update knights_user set struserid = @newname Where struserid = @oldname
Update knights set chief = @newname where chief = @oldname
Update knights set vicechief_1 = @newname where vicechief_1 = @oldname
Update knights set vicechief_2 = @newname where vicechief_2 = @oldname
Update knights set vicechief_3 = @newname where vicechief_3 = @oldname
commit tran