PHP Code:
USE [CHARACTER_01_DBF]
GO
/****** Object: StoredProcedure [dbo].[LoadSiegeRanking] Script Date: 06/01/2014 22:02:22 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE proc [dbo].[LoadSiegeRanking] [MENTION=2138478]serverin[/MENTION]dex char(2)
as
set nocount on
set xact_abort on
select szName, idPlayer, nJob, nKills, nDeaths, nPoints
from PlayerWar_TBL
where serverindex = [MENTION=2138478]serverin[/MENTION]dex
return
GO
/****** Object: StoredProcedure [dbo].[uspSaveSiegeUser] Script Date: 06/01/2014 22:02:17 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
create proc [dbo].[uspSaveSiegeUser] [MENTION=2138478]serverin[/MENTION]dex char(2), [MENTION=624221]szn[/MENTION]ame char(32),
@idPlayer char(7), [MENTION=648708]njo[/MENTION]b int,
@nPoints int, [MENTION=2491491]nki[/MENTION]lls int, [MENTION=330434]NDeath[/MENTION]s int
as
set nocount on
set xact_abort on
if not exists( select * from PlayerWar_TBL where idPlayer = @idPlayer and serverindex = [MENTION=2138478]serverin[/MENTION]dex)
begin
insert PlayerWar_TBL ( serverindex, szName, idPlayer, nJob, nPoints, nKills, nDeaths )
values [MENTION=2138478]serverin[/MENTION]dex, [MENTION=624221]szn[/MENTION]ame, @idPlayer, [MENTION=648708]njo[/MENTION]b, @nPoints, [MENTION=2491491]nki[/MENTION]lls, [MENTION=330434]NDeath[/MENTION]s )
end
else
begin
update PlayerWar_TBL
set serverindex = [MENTION=2138478]serverin[/MENTION]dex,
szName = [MENTION=624221]szn[/MENTION]ame,
idPlayer = @idPlayer,
nJob = [MENTION=648708]njo[/MENTION]b,
nPoints = @nPoints,
nKills = [MENTION=2491491]nki[/MENTION]lls,
nDeaths = [MENTION=330434]NDeath[/MENTION]s
where serverindex = [MENTION=2138478]serverin[/MENTION]dex
and idPlayer = @idPlayer
end
GO
/****** Object: Table [dbo].[PlayerWar_TBL] Script Date: 06/01/2014 22:02:13 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[PlayerWar_TBL](
[serverindex] [char](2) COLLATE Latin1_General_CI_AS NULL,
[szName] [varchar](32) COLLATE Latin1_General_CI_AS NULL,
[idPlayer] [char](7) COLLATE Latin1_General_CI_AS NULL,
[nJob] [int] NULL,
[nKills] [int] NULL,
[nDeaths] [int] NULL,
[nPoints] [int] NULL
) ON [PRIMARY]
GO
SET ANSI_PADDING OFF