-- LosaDev 2014: src\sql\20120504\lostsaga_sp.sql as UTF-8. 22 of the 560 old procedures fail (written for newer tables); expected. USE [LosaGame] GO /****** 개체: StoredProcedure [dbo].[web_realmember_agree_get_zip_email] 스크립트 날짜: 05/04/2012 14:08:43 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[web_realmember_agree_get_zip_email] ( @accountIDX int ) AS SELECT a.email, b.zipcode FROM userMemberDB a LEFT JOIN userInfoBDB b ON a.accountIDX=b.accountIDX WHERE a.accountIDX=@accountIDX GO /****** 개체: StoredProcedure [dbo].[web_realmember_agree_log_get_info] 스크립트 날짜: 05/04/2012 14:08:43 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[web_realmember_agree_log_get_info] ( @idx int ) AS SELECT accountIDX, agreeSDate, agreeEDate, userKey, permitType, regDate FROM LosaGame_log.DBO.log_agree WHERE idx=@idx GO /****** 개체: StoredProcedure [dbo].[web_realmember_agree_init] 스크립트 날짜: 05/04/2012 14:08:43 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[web_realmember_agree_init] ( @idx int , @accountIDX int , @permitIP varchar(15) ) AS BEGIN TRAN DELETE FROM userParentDB WHERE accountIDX=@accountIDX DELETE FROM userInfoBDB WHERE accountIDX=@accountIDX UPDATE LosaGame_log.DBO.log_agree SET permitIP = @permitIP , permitType = 2 WHERE idx=@idx COMMIT TRAN GO /****** 개체: StoredProcedure [dbo].[web_realmember_agree_user_parent_info] 스크립트 날짜: 05/04/2012 14:08:44 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[web_realmember_agree_user_parent_info] ( @accountIDX int ) AS SELECT a.userID, b.userName, b.userBirthday, b.userNumber, c.parentName, c.parentBirth FROM userMemberDB a INNER JOIN userNameDB b ON a.accountIDX = b.accountIDX INNER JOIN userParentDB c ON a.accountIDX = c.accountIDX WHERE a.accountIDX=@accountIDX GO /****** 개체: StoredProcedure [dbo].[game_fish_get_data_list] 스크립트 날짜: 05/04/2012 14:06:03 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[game_fish_get_data_list] ( @accountIDX int ) AS SELECT idx, fish1_type, fish1_an, fish2_type, fish2_an, fish3_type, fish3_an, fish4_type, fish4_an, fish5_type, fish5_an, fish6_type, fish6_an, fish7_type, fish7_an, fish8_type, fish8_an, fish9_type, fish9_an, fish10_type, fish10_an, fish11_type, fish11_an, fish12_type, fish12_an, fish13_type, fish13_an, fish14_type, fish14_an, fish15_type, fish15_an, fish16_type, fish16_an, fish17_type, fish17_an, fish18_type, fish18_an, fish19_type, fish19_an, fish20_type, fish20_an FROM userFishDB WHERE accountIDX = @accountIDX GO /****** 개체: StoredProcedure [dbo].[web_user_get_ID] 스크립트 날짜: 05/04/2012 14:08:57 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[web_user_get_ID] ( @userNick varchar(20) ) As Select userID from LosaWeb.DBO.userMemberDB where nickName = @userNick GO /****** 개체: StoredProcedure [dbo].[game_fish_get_self_index] 스크립트 날짜: 05/04/2012 14:06:03 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[game_fish_get_self_index] ( @accountIDX int ) AS SELECT TOP 1 idx FROM userFishDB WHERE accountIDX = @accountIDX ORDER BY idx DESC GO /****** 개체: StoredProcedure [dbo].[web_minihome_ui_index_game_data] 스크립트 날짜: 05/04/2012 14:08:27 ******/ SET ANSI_NULLS OFF GO SET QUOTED_IDENTIFIER OFF GO CREATE PROCEDURE [dbo].[web_minihome_ui_index_game_data] ( @userID varchar(12) ) As SELECT playedTime, cnt_win, cnt_tie, cnt_lose, cnt_win_training, cnt_tie_training, cnt_lose_training, cnt_kill, cnt_death, cnt_kill_single, cnt_death_single, userLevel FROM userGameDB WHERE userID=@userID GO /****** 개체: StoredProcedure [dbo].[web_realmember_get_info_count] 스크립트 날짜: 05/04/2012 14:08:44 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[web_realmember_get_info_count] ( @accountIDX int ) AS SELECT count(*) FROM userInfoBDB WHERE accountIDX=@accountIDX GO /****** 개체: StoredProcedure [dbo].[game_fish_save] 스크립트 날짜: 05/04/2012 14:06:06 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[game_fish_save] ( @idx int , @fish1_type tinyint , @fish1_an tinyint , @fish2_type tinyint , @fish2_an tinyint , @fish3_type tinyint , @fish3_an tinyint , @fish4_type tinyint , @fish4_an tinyint , @fish5_type tinyint , @fish5_an tinyint , @fish6_type tinyint , @fish6_an tinyint , @fish7_type tinyint , @fish7_an tinyint , @fish8_type tinyint , @fish8_an tinyint , @fish9_type tinyint , @fish9_an tinyint , @fish10_type tinyint , @fish10_an tinyint , @fish11_type tinyint , @fish11_an tinyint , @fish12_type tinyint , @fish12_an tinyint , @fish13_type tinyint , @fish13_an tinyint , @fish14_type tinyint , @fish14_an tinyint , @fish15_type tinyint , @fish15_an tinyint , @fish16_type tinyint , @fish16_an tinyint , @fish17_type tinyint , @fish17_an tinyint , @fish18_type tinyint , @fish18_an tinyint , @fish19_type tinyint , @fish19_an tinyint , @fish20_type tinyint , @fish20_an tinyint ) As UPDATE userFishDB SET fish1_type = @fish1_type , fish1_an = @fish1_an , fish2_type = @fish2_type , fish2_an = @fish2_an , fish3_type = @fish3_type , fish3_an = @fish3_an , fish4_type = @fish4_type , fish4_an = @fish4_an , fish5_type = @fish5_type , fish5_an = @fish5_an , fish6_type = @fish6_type , fish6_an = @fish6_an , fish7_type = @fish7_type , fish7_an = @fish7_an , fish8_type = @fish8_type , fish8_an = @fish8_an , fish9_type = @fish9_type , fish9_an = @fish9_an , fish10_type = @fish10_type , fish10_an = @fish10_an , fish11_type = @fish11_type , fish11_an = @fish11_an , fish12_type = @fish12_type , fish12_an = @fish12_an , fish13_type = @fish13_type , fish13_an = @fish13_an , fish14_type = @fish14_type , fish14_an = @fish14_an , fish15_type = @fish15_type , fish15_an = @fish15_an , fish16_type = @fish16_type , fish16_an = @fish16_an , fish17_type = @fish17_type , fish17_an = @fish17_an , fish18_type = @fish18_type , fish18_an = @fish18_an , fish19_type = @fish19_type , fish19_an = @fish19_an , fish20_type = @fish20_type , fish20_an = @fish20_an WHERE idx = @idx GO /****** 개체: StoredProcedure [dbo].[game_server_connection_on] 스크립트 날짜: 05/04/2012 14:07:22 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[game_server_connection_on] ( @idx int ) As UPDATE define_game_server SET [status] = 1 WHERE idx = @idx GO /****** 개체: StoredProcedure [dbo].[web_realmember_get_parent_count] 스크립트 날짜: 05/04/2012 14:08:45 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[web_realmember_get_parent_count] ( @accountIDX int ) As SELECT count(*) FROM userParentDB WHERE accountIDX=@accountIDX GO /****** 개체: StoredProcedure [dbo].[web_minihome_ui_index_get_userInfo] 스크립트 날짜: 05/04/2012 14:08:28 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[web_minihome_ui_index_get_userInfo] ( @userID varchar(12) ) As SELECT cntSiteVisit, gamerecomm FROM LosaWeb.DBO.userInfoDB WHERE userID = @userID GO /****** 개체: StoredProcedure [dbo].[web_realmember_get_parent_jumin_count] 스크립트 날짜: 05/04/2012 14:08:45 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[web_realmember_get_parent_jumin_count] ( @encode varchar(64) ) As SELECT count(*) FROM userParentDB WHERE parentEncode=@encode GO /****** 개체: StoredProcedure [dbo].[web_minihome_ui_battle_game_data] 스크립트 날짜: 05/04/2012 14:08:26 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[web_minihome_ui_battle_game_data] ( @userID varchar(12) ) As SELECT cnt_win, cnt_tie, cnt_lose, cnt_kill, cnt_death FROM userGameDB WHERE userID=@userID GO /****** 개체: StoredProcedure [dbo].[web_minihome_ui_training_game_data] 스크립트 날짜: 05/04/2012 14:08:28 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[web_minihome_ui_training_game_data] ( @userID varchar(12) ) As SELECT cnt_win_training, cnt_tie_training, cnt_lose_training, cnt_kill_single, cnt_death_single FROM userGameDB WHERE userID=@userID GO /****** 개체: StoredProcedure [dbo].[web_guild_hp_member_list] 스크립트 날짜: 05/04/2012 14:07:59 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[web_guild_hp_member_list] ( @guildIDX int , @pagesize int , @notpage int ) AS DECLARE @sql nvarchar(2000) DECLARE @ParmDefinition nvarchar(500) SET @sql = N'SELECT TOP (@pagesize_in) b.userLevel, d.accountIDX, d.nickName, b.connDate, c.gameServerID, ISNULL(e.class, 0) as ''userRanking'' ' SET @sql = @sql + 'FROM userGuildInfoDB a WITH(NOLOCK) INNER JOIN userGameDB b WITH(NOLOCK) ON a.accountIDX = b.accountIDX INNER JOIN userLoginDB c WITH(NOLOCK) ON a.accountIDX = c.accountIDX INNER JOIN userMemberDB d WITH(NOLOCK) ON a.accountIDX = d.accountIDX LEFT JOIN userRankingDB e WITH(NOLOCK) ON a.accountIDX = e.accountIDX ' SET @sql = @sql + 'WHERE a.guildIDX=@guildIDX_in and a.guildJoinType=1 and a.idx not in (SELECT TOP (@notpage_in) a.idx FROM userGuildInfoDB a WITH(NOLOCK) INNER JOIN userGameDB b WITH(NOLOCK) ON a.accountIDX = b.accountIDX INNER JOIN userLoginDB c WITH(NOLOCK) ON a.accountIDX = c.accountIDX INNER JOIN userMemberDB d WITH(NOLOCK) ON a.accountIDX = d.accountIDX LEFT JOIN userRankingDB e WITH(NOLOCK) ON a.accountIDX = e.accountIDX WHERE a.guildIDX=@guildIDX_in and a.guildJoinType=1 ORDER BY b.userLevel DESC) ' SET @sql = @sql + 'ORDER BY b.userLevel DESC' SET @ParmDefinition = N'@guildIDX_in int, @pagesize_in int, @notpage_in int' EXECUTE sp_executesql @sql, @ParmDefinition, @guildIDX_in=@guildIDX, @pagesize_in=@pagesize, @notpage_in=@notpage GO /****** 개체: StoredProcedure [dbo].[web_game_get_cnnDate] 스크립트 날짜: 05/04/2012 14:07:50 ******/ SET ANSI_NULLS OFF GO SET QUOTED_IDENTIFIER OFF GO CREATE PROCEDURE [dbo].[web_game_get_cnnDate] ( @userID varchar(12) ) As SELECT connDate FROM userGameDB WHERE userID=@userID GO /****** 개체: StoredProcedure [dbo].[web_realmember_give_web_point] 스크립트 날짜: 05/04/2012 14:08:47 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[web_realmember_give_web_point] ( @accountIDX int , @userIP varchar(15) ) AS UPDATE userCashDB SET amtCash = amtCash + 10000, amtBonus = amtBonus + 10000 WHERE accountIDX=@accountIDX INSERT INTO LosaGame_log.DBO.log_cash (accountIDX, userIP, DBID, applyType, amount, note, regDate) VALUES (@accountIDX, @userIP, 'REALMEMBER', 'B0', 10000, '정회원 전환 보너스', getdate()) GO /****** 개체: StoredProcedure [dbo].[web_game_server_get_list] 스크립트 날짜: 05/04/2012 14:07:51 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[web_game_server_get_list] As SELECT serverID, serverName FROM define_game_server GO /****** 개체: StoredProcedure [dbo].[web_realmember_log] 스크립트 날짜: 05/04/2012 14:08:48 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[web_realmember_log] ( @accountIDX int , @userID varchar(12) , @userName varchar(10) , @userEncode varchar(64) , @adultType tinyint ) AS INSERT INTO LosaGame_log.DBO.log_realmember (accountIDX, userID, userName, userEncode, adultType, regDate) VALUES (@accountIDX, @userID, @userName, @userEncode, @adultType, getdate()) GO /****** 개체: StoredProcedure [dbo].[web_guild_ranking_list] 스크립트 날짜: 05/04/2012 14:08:00 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[web_guild_ranking_list] ( @pagesize int , @notpage int , @regionType int ) AS DECLARE @sql nvarchar(1000) DECLARE @ParmDefinition nvarchar(500) If (@regionType > 0) BEGIN SET @sql = 'SELECT TOP (@pagesize_in) idx, guildname, guildmark, ranking, point, maxcount, membercount FROM userGuildDB WITH(NOLOCK) ' SET @sql = @sql + 'WHERE ranking > 0 and regionType=@regionType_in and idx not in (SELECT TOP (@notpage_in) idx FROM userGuildDB WITH(NOLOCK) WHERE ranking > 0 and regionType=@regionType_in ORDER BY ranking ASC, point DESC) ORDER BY ranking ASC, point DESC' END ELSE BEGIN SET @sql = 'SELECT TOP (@pagesize_in) idx, guildname, guildmark, ranking, point, maxcount, membercount FROM userGuildDB WITH(NOLOCK) ' SET @sql = @sql + 'WHERE ranking > 0 and idx not in (SELECT TOP (@notpage_in) idx FROM userGuildDB WITH(NOLOCK) WHERE ranking > 0 ORDER BY ranking ASC, point DESC) ORDER BY ranking ASC, point DESC' END SET @ParmDefinition = N'@pagesize_in int, @regionType_in int, @notpage_in int' EXECUTE sp_executesql @sql, @ParmDefinition, @pagesize_in=@pagesize, @regionType_in=@regionType, @notpage_in=@notpage GO /****** 개체: StoredProcedure [dbo].[web_realmember_namecheck_add_log] 스크립트 날짜: 05/04/2012 14:08:50 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[web_realmember_namecheck_add_log] ( @accountIDX int , @userName varchar(10) , @userBirthday char(6) , @userJumin1 char(12) , @userJumin2 char(14) , @userEnCode varchar(64) , @userGender tinyint , @userNumber tinyint , @userIP varchar(15) , @returnValue tinyint , @flag tinyint ) As INSERT INTO LosaGame_log.DBO.log_namecheck (accountIDX, userName, userBirthday, userJumin1, userJumin2, userEnCode, userGender, userNumber, userIP, returnValue, flag, regDate) VALUES (@accountIDX, @userName, @userBirthday, @userJumin1, @userJumin2, @userEnCode, @userGender, @userNumber, @userIP, @returnValue, @flag, getdate()) GO /****** 개체: StoredProcedure [dbo].[web_intro_character_max_idx] 스크립트 날짜: 05/04/2012 14:08:01 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[web_intro_character_max_idx] AS SELECT MAX(idx) FROM define_class GO /****** 개체: StoredProcedure [dbo].[game_item_extra_get_self_index] 스크립트 날짜: 05/04/2012 14:06:39 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[game_item_extra_get_self_index] ( @accountIDX int ) AS SELECT TOP 1 idx FROM userItemExtraDB WHERE accountIDX = @accountIDX ORDER BY idx DESC GO /****** 개체: StoredProcedure [dbo].[web_realmember_namecheck_parent_add] 스크립트 날짜: 05/04/2012 14:08:50 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[web_realmember_namecheck_parent_add] ( @accountIDX int , @parentName varchar(10) , @parentBirthday char(6) , @parentJumin1 char(12) , @parentJumin2 char(14) , @parentEnCode varchar(64) , @parentNumber tinyint ) AS INSERT INTO userParentDB (accountIDX, parentName, parentBirth, parentJumin1, parentJumin2, parentEncode, parentNumber, regDate) VALUES (@accountIDX, @parentName, @parentBirthday, @parentJumin1, @parentJumin2, @parentEnCode, @parentNumber, getdate()) GO /****** 개체: StoredProcedure [dbo].[game_price_class_save] 스크립트 날짜: 05/04/2012 14:07:02 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[game_price_class_save] ( @class_number varchar(4) , @cnt varchar(4) ) As Declare @strSQL varchar(500) SET @strSQL = 'UPDATE define_class_price SET ' SET @strSQL = @strSQL + 'class' + @class_number + '_buy_cnt = class' + @class_number + '_buy_cnt + ' + @cnt + ' ' SET @strSQL = @strSQL + 'WHERE idx = (SELECT Max(idx) FROM define_class_price)' EXEC (@strSQL) GO /****** 개체: StoredProcedure [dbo].[web_intro_character_movie_list] 스크립트 날짜: 05/04/2012 14:08:01 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[web_intro_character_movie_list] ( @classIDX int ) AS SELECT idx, classHanName FROM define_class WHERE idx < @classIDX ORDER BY movieorderby DESC GO /****** 개체: StoredProcedure [dbo].[usp_TB_EventCoupon_flag_srch] 스크립트 날짜: 05/04/2012 14:07:27 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO /*========================================================================== ' 작 성 : 이수진 [2011-11-03] ' 용 도 : 로스트사가 이벤트 쿠폰_flag 조회 ==========================================================================*/ --DROP PROC usp_TB_EventCoupon_flag_srch --GO CREATE PROC [dbo].[usp_TB_EventCoupon_flag_srch] @sSerialNum varchar(20) -- 쿠폰번호 AS BEGIN SET NOCOUNT ON SELECT couponType FROM TB_EventCoupon WITH (NOLOCK) WHERE sn = @sSerialNum SET NOCOUNT OFF END GO /****** 개체: StoredProcedure [dbo].[web_ipadress_info] 스크립트 날짜: 05/04/2012 14:08:01 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[web_ipadress_info] ( @bwvalue bigint ) AS SELECT country, countryname FROM define_geoip WITH(NOLOCK) WHERE sbwv <= @bwvalue and ebwv >= @bwvalue GO /****** 개체: StoredProcedure [dbo].[USP_TB_EventCoupon_INS] 스크립트 날짜: 05/04/2012 14:07:27 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO --=========================================================== --Author : YEOJINWON --Create Date : 2011-07-05 --Sp Parameter(IN) : @createCnt 생성수 --Sp Parameter(IN) : @nCouponType 쿠폰타입 --Sp Parameter(OUT) : --Note --1.생성수 만큼 랜덤 할당 --2.생성한 문자를 체크하여 임시 보관 -- 오인하기 쉬운 문자 제외 (I,1 / O,0) --3.등록 (중복 체크 고려) --=========================================================== CREATE Proc [dbo].[USP_TB_EventCoupon_INS] @createCnt int, -- 생성할개수 @nCouponType tinyint -- 쿠폰타입 as set nocount on declare @i int , @row int , @sn varchar(36) set @i = 1 set @row = 0 while @i <= @createCnt begin if object_id('tempdb..#tmp') is not null begin drop table #tmp end create table #tmp (sn varchar(20) not null) create clustered index IX_t_tmp on #tmp(sn) --1.생성수 만큼 랜덤 할당 while @i <= @createCnt begin set @sn = newid() --2.생성한 문자를 체크하여 임시 보관 insert #tmp (sn) select left(replace( replace( replace( replace( replace(@sn,'-','') ,'I','') ,'1','') ,'O','') ,'0','') ,20) set @i = @i + 1 end --3.등록 (중복 체크 고려) insert TB_EventCoupon (sn, couponType) select t.sn, @nCouponType from (select sn from #tmp where len(sn)=20 group by sn)t left join TB_EventCoupon a with(nolock) on a.sn = t.sn where a.sn is null select @row = @@rowcount drop table #tmp -- 생성한 수와 등록한 수가 일치하면, 종료 if @row = @createCnt begin break end -- 생성하려는 수가 작으면, 그 만큼 생성 else begin set @createCnt = @createCnt - @row set @i = 1 end end GO /****** 개체: StoredProcedure [dbo].[web_realmember_parent_email_save] 스크립트 날짜: 05/04/2012 14:08:52 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[web_realmember_parent_email_save] ( @accountIDX int , @email varchar(50) ) AS UPDATE userparentDB SET email=@email WHERE accountIDX=@accountIDX GO /****** 개체: StoredProcedure [dbo].[game_member_namecheck_get_data] 스크립트 날짜: 05/04/2012 14:06:59 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO Create Procedure [dbo].[game_member_namecheck_get_data] ( @accountIDX int ) AS SELECT joinType FROM userMemberDB WHERE accountIDX=@accountIDX GO /****** 개체: StoredProcedure [dbo].[usp_web_block_ip_get_list_by_userip] 스크립트 날짜: 05/04/2012 14:07:28 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO /*============================================================================== -- 작 성 : 이수진 [2008-12-02] -- 용 도 : 금지된 ip인지 여부 조회 ==============================================================================*/ --DROP PROC usp_web_block_ip_get_list_by_userip --GO CREATE PROC [dbo].[usp_web_block_ip_get_list_by_userip] @sUserIp varchar(15) -- 사용자아이피 AS BEGIN SET NOCOUNT ON SELECT content FROM define_site_config WITH (NOLOCK) WHERE objName = 'blockIP' AND content = @sUserIp SET NOCOUNT OFF END GO /****** 개체: StoredProcedure [dbo].[web_realmember_parent_get_encode] 스크립트 날짜: 05/04/2012 14:08:52 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[web_realmember_parent_get_encode] ( @accountIDX int ) AS SELECT parentName, parentBirth, parentEncode FROM userParentDB WHERE accountIDX=@accountIDX GO /****** 개체: StoredProcedure [dbo].[game_server_delete] 스크립트 날짜: 05/04/2012 14:07:22 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[game_server_delete] ( @serverID bigint ) As DELETE FROM define_game_server WHERE serverID = @serverID GO /****** 개체: StoredProcedure [dbo].[web_recommend_bonus_point] 스크립트 날짜: 05/04/2012 14:08:53 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[web_recommend_bonus_point] ( @accountIDX int , @bonusCash int , @userIP varchar(16) ) As Begin Tran UPDATE userCashDB SET amtCash = amtCash + @bonusCash , amtBonus = amtBonus + @bonusCash , chgDate = getdate() WHERE accountIDX = @accountIDX INSERT INTO LosaGame_log.DBO.log_cash (accountIDX, userIP, DBID, applyType, amount, note, regDate) VALUES (@accountIDX, @userIP, 'RECOMMEND', 'B0', @bonusCash, '게임추천 보너스', getdate()) Commit Tran GO /****** 개체: StoredProcedure [dbo].[web_login_block_add] 스크립트 날짜: 05/04/2012 14:08:03 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[web_login_block_add] ( @userIP varchar(15) ) AS INSERT INTO define_blockIP (userIP, note, endDate, regDate) VALUES (@userIP, '비밀번호 500회 이상 틀림', getdate()+30, getdate()) GO /****** 개체: StoredProcedure [dbo].[usp_TB_EventCoupon_use_chk] 스크립트 날짜: 05/04/2012 14:07:27 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO /*========================================================================== ' 작 성 : 이수진 [2011-07-12] ' 용 도 : 로스트사가 이벤트 쿠폰_이미 사용된 쿠폰인지 조회 ' RETURN : 1 : 성공 -1 : 사용 불가능한 쿠폰인 경우 에러 -2 : 이미 사용된 쿠폰인 경우 에러 -3 : 계정당 받아야할 개수 초과한 경우 에러 -4 : 사용등록 에러 ==========================================================================*/ --DROP PROC usp_TB_EventCoupon_use_chk --GO CREATE PROC [dbo].[usp_TB_EventCoupon_use_chk] @sSerialNum varchar(20), -- 쿠폰번호 @sCouponType tinyint, -- 쿠폰타입 @nAccountIDX int, -- 사용자인덱스번호 @sUserIp varchar(15), -- 사용자아이피 @nMaxNum tinyint -- 계정당 받아야할 개수 AS BEGIN SET NOCOUNT ON -- 사용가능한 쿠폰인지 조회 SELECT accountIDX, userIP FROM TB_EventCoupon WITH (NOLOCK) WHERE sn = @sSerialNum AND couponType = @sCouponType IF @@ROWCOUNT = 0 BEGIN RETURN (-1) END -- 이미 사용된 쿠폰인지 조회 SELECT accountIDX, userIP FROM TB_EventCoupon WITH (NOLOCK) WHERE sn = @sSerialNum AND couponType = @sCouponType AND (accountIDX <> 0 OR regDate IS NOT NULL) IF @@ROWCOUNT > 0 BEGIN RETURN (-2) END -- 계정당 몇번 받을수 있는지 체크 SELECT accountIDX, userIP FROM TB_EventCoupon WITH (NOLOCK) WHERE accountIDX = @nAccountIDX AND couponType = @sCouponType IF @@ROWCOUNT >= @nMaxNum BEGIN RETURN (-3) END SET NOCOUNT OFF -- 사용쿠폰등록 UPDATE TB_EventCoupon SET sn = @sSerialNum, accountIDX = @nAccountIDX, userIP = @sUserIp, regDate = GETDATE() WHERE sn = @sSerialNum AND couponType = @sCouponType IF @@ROWCOUNT <> 1 OR @@ERROR <> 0 BEGIN RETURN (-4) END RETURN (1) END GO /****** 개체: StoredProcedure [dbo].[web_realmember_search_address] 스크립트 날짜: 05/04/2012 14:08:52 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[web_realmember_search_address] ( @searchtype varchar(4) , @searchstring varchar(20) ) AS DECLARE @sql varchar(500) SET @sql = 'SELECT zipcode, sido, gugun, dong, ri, bldg, bunji FROM define_zipcode WHERE ' + @searchtype + ' like ''' + @searchstring + '%''' EXECUTE (@sql) GO /****** 개체: StoredProcedure [dbo].[web_join_edit_saveB] 스크립트 날짜: 05/04/2012 14:08:03 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[web_join_edit_saveB] ( @accountIDX int , @tel varchar(16) , @mobile varchar(16) , @zipcode varchar(8) , @address1 varchar(150) , @address2 varchar(50) , @returnVal int output ) As UPDATE userInfoBDB SET tel = @tel , mobile = @mobile , zipcode = @zipcode , address1 = @address1 , address2 = @address2 WHERE accountIDX = @accountIDX SET @returnVal = @@error GO /****** 개체: StoredProcedure [dbo].[web_recommend_get_data] 스크립트 날짜: 05/04/2012 14:08:53 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[web_recommend_get_data] ( @accountIDX int ) As SELECT rec_inc, rec_dec FROM userInfoDB WHERE accountIDX = @accountIDX GO /****** 개체: StoredProcedure [dbo].[web_login_block_count] 스크립트 날짜: 05/04/2012 14:08:04 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[web_login_block_count] ( @userIP varchar(15) ) AS SELECT count(*) FROM define_blockIP WITH(NOLOCK) WHERE userIP=@userIP and endDate > getdate() GO /****** 개체: StoredProcedure [dbo].[web_recommend_get_index] 스크립트 날짜: 05/04/2012 14:08:53 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[web_recommend_get_index] ( @accountIDX int , @userIP varchar(15) ) As Select Top 1 idx,point From LosaGame_log.DBO.log_recommend where userIP = @userIP and accountIDX = @accountIDX and regDate > (getdate() - 30) order by idx desc GO /****** 개체: StoredProcedure [dbo].[game_member_get_count] 스크립트 날짜: 05/04/2012 14:06:58 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[game_member_get_count] ( @nickname varchar(20) ) AS SELECT count(*) FROM userMemberDB WHERE nickname=@nickname GO /****** 개체: StoredProcedure [dbo].[web_login_bonus_point] 스크립트 날짜: 05/04/2012 14:08:04 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[web_login_bonus_point] ( @accountIDX varchar(12) , @bonusCash int , @userIP varchar(16) ) AS UPDATE userCashDB SET amtCash = amtCash + @bonusCash , amtBonus = amtBonus + @bonusCash , chgDate = getdate() WHERE accountIDX = @accountIDX INSERT INTO LosaGame_log.DBO.log_cash (accountIDX, userIP, DBID, applyType, amount, note, regDate) VALUES (@accountIDX, @userIP, 'WEBLOGIN', 'B0', @bonusCash, '로그인 보너스', getdate()) GO /****** 개체: StoredProcedure [dbo].[web_minihome_ui_battle_rank_data] 스크립트 날짜: 05/04/2012 14:08:26 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[web_minihome_ui_battle_rank_data] ( @userID varchar(12) ) As Declare @regDate datetime Set @regDate = (select regDate from LosaWeb.DBO.userMemberDB where userid=@userID) SELECT win_fix, tie_fix, lose_fix, win_prev, tie_prev, lose_prev, rank_prev, rank_now, rank_total, rank_battle FROM userRankingDB_battle WHERE userID=@userID and regDate > @regDate GO /****** 개체: StoredProcedure [dbo].[web_recommend_get_rec_dec] 스크립트 날짜: 05/04/2012 14:08:53 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[web_recommend_get_rec_dec] ( @accountIDX int ) AS SELECT rec_inc, rec_dec FROM userInfoDB WHERE accountIDX = @accountIDX GO /****** 개체: StoredProcedure [dbo].[web_login_fail_add] 스크립트 날짜: 05/04/2012 14:08:04 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[web_login_fail_add] ( @userIP varchar(15) ) AS INSERT INTO LosaGame_log.DBO.log_login_failip (userIP, regDate) VALUES (@userIP, getdate()) GO /****** 개체: StoredProcedure [dbo].[web_agrend_get_dateinfo] 스크립트 날짜: 05/04/2012 14:07:30 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[web_agrend_get_dateinfo] ( @accountIDX int ) AS SELECT a.userBirthday, a.userNumber, b.agreeEDate FROM userNameDB a WITH(NOLOCK) LEFT JOIN userParentDB b WITH(NOLOCK) ON a.accountIDX=b.accountIDX WHERE a.accountIDX=@accountIDX GO /****** 개체: StoredProcedure [dbo].[game_server_get_self_index] 스크립트 날짜: 05/04/2012 14:07:22 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[game_server_get_self_index] ( @serverID bigint ) As SELECT idx FROM define_game_server WHERE serverID=@serverID GO /****** 개체: StoredProcedure [dbo].[web_recommend_inc_index_add] 스크립트 날짜: 05/04/2012 14:08:53 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[web_recommend_inc_index_add] ( @accountIDX int ) As UPDATE userInfoDB SET rec_index = rec_index + 1 where accountIDX = @accountIDX GO /****** 개체: StoredProcedure [dbo].[game_guild_mark_log_add] 스크립트 날짜: 05/04/2012 14:06:17 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[game_guild_mark_log_add] ( @guildIDX int , @accountIDX int , @havepeso bigint , @markprice int , @nowmark int , @changemark int ) AS DECLARE @cnt tinyint SET @cnt = (SELECT count(*) FROM LosaGame_log.DBO.log_guild_mark WHERE guildIDX=@guildIDX and flag=0) IF (@cnt = 0) BEGIN INSERT INTO LosaGame_log.DBO.log_guild_mark (guildIDX, accountIDX, havepeso, markprice, nowmark, changemark, flag, regDate) VALUES (@guildIDX, @accountIDX, @havepeso, @markprice, @nowmark, @changemark, 0, getdate()) END GO /****** 개체: StoredProcedure [dbo].[web_login_fail_count] 스크립트 날짜: 05/04/2012 14:08:04 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[web_login_fail_count] ( @userIP varchar(15) ) AS SELECT count(*) FROM LosaGame_log.DBO.log_login_failip WITH(NOLOCK) WHERE userIP=@userIP and regDate > Left(getdate(), 10) GO /****** 개체: StoredProcedure [dbo].[web_agrend_parent_count] 스크립트 날짜: 05/04/2012 14:07:30 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[web_agrend_parent_count] ( @accountIDX int ) AS SELECT count(*) FROM userParentDB WITH(NOLOCK) WHERE accountIDX=@accountIDX GO /****** 개체: StoredProcedure [dbo].[web_recommend_join_add] 스크립트 날짜: 05/04/2012 14:08:54 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[web_recommend_join_add] ( @accountIDX int , @rinkIP varchar(15) ) As INSERT INTO LosaGame_log.DBO.log_recommend_join (accountIDX, rinkIP, flag, regDate) VALUES (@accountIDX, @rinkIP, 0, getdate()) GO /****** 개체: StoredProcedure [dbo].[game_guild_mark_log_get_self_idx] 스크립트 날짜: 05/04/2012 14:06:18 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[game_guild_mark_log_get_self_idx] ( @accountIDX int ) AS SELECT MAX(idx) FROM LosaGame_log.DBO.log_guild_mark WHERE accountIDX=@accountIDX and flag=0 GO /****** 개체: StoredProcedure [dbo].[web_avatar_myitem_delete] 스크립트 날짜: 05/04/2012 14:07:31 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[web_avatar_myitem_delete] ( @accountIDX int , @userIP varchar(16) , @objCode varchar(12) ) AS DECLARE @note varchar(100) SET @note = @objCode + ' 삭제' INSERT INTO LosaGame_log.DBO.log_cash (accountIDX, userIP, DBID, applyType, amount, note, regDate) VALUES (@accountIDX, @userIP, 'IO', 'DI', 0, @note, getdate()) GO /****** 개체: StoredProcedure [dbo].[web_recommend_mypoint_save] 스크립트 날짜: 05/04/2012 14:08:54 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[web_recommend_mypoint_save] ( @accountIDX int , @point smallint , @pointType varchar(4) ) As if (@pointType = 'inc') UPDATE userInfoDB SET rec_inc = rec_inc + @point WHERE accountIDX=@accountIDX else if (@pointType = 'dec') UPDATE userInfoDB SET rec_dec = rec_dec + @point WHERE accountIDX=@accountIDX GO /****** 개체: StoredProcedure [dbo].[web_avatar_myitem_sell] 스크립트 날짜: 05/04/2012 14:07:31 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[web_avatar_myitem_sell] ( @accountIDX int , @amtCash int , @userIP varchar(16) , @objCode varchar(12) ) AS DECLARE @note varchar(100) SET @note = @objCode + ' 되팔기' UPDATE userCashDB SET amtCash = amtCash + @amtCash , amtBonus = amtBonus + @amtCash WHERE accountIDX = @accountIDX INSERT INTO LosaGame_log.DBO.log_cash (accountIDX, userIP, DBID, applyType, amount, note, regDate) VALUES (@accountIDX, @userIP, 'IO', 'SI', @amtCash, @note, getdate()) GO /****** 개체: StoredProcedure [dbo].[web_recommend_point_save] 스크립트 날짜: 05/04/2012 14:08:54 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[web_recommend_point_save] ( @idx int , @point smallint ) As UPDATE LosaGame_log.DBO.log_recommend SET point = @point WHERE idx=@idx GO /****** 개체: StoredProcedure [dbo].[game_guild_mark_log_delete] 스크립트 날짜: 05/04/2012 14:06:17 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[game_guild_mark_log_delete] ( @idx int ) AS UPDATE LosaGame_log.DBO.log_guild_mark SET flag=2 WHERE idx=@idx GO /****** 개체: StoredProcedure [dbo].[web_login_info] 스크립트 날짜: 05/04/2012 14:08:05 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[web_login_info] ( @accountIDX int ) AS SELECT a.userLevel, a.gameMoney, ISNULL(b.amtcash, 0) AS 'cash', ISNULL(c.class, 0) AS 'ranking' FROM userGameDB a WITH(NOLOCK) LEFT JOIN userCashDB b WITH(NOLOCK) ON a.accountIDX = b.accountIDX LEFT JOIN userRankingDB c WITH(NOLOCK) ON a.accountIDX = c.accountIDX WHERE a.accountIDX = @accountIDX GO /****** 개체: StoredProcedure [dbo].[web_avatar_shop_buy_item] 스크립트 날짜: 05/04/2012 14:07:31 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[web_avatar_shop_buy_item] ( @accountIDX varchar(12) , @amtCash int ) AS DECLARE @bonus int SET @bonus = (SELECT count(*) FROM userCashDB WHERE accountIDX = @accountIDX and amtBonus > amtCash - @amtCash) IF (@bonus > 0) BEGIN UPDATE UserCashDB SET amtCash = amtCash - @amtCash , amtBonus = amtCash - @amtCash , chgDate = getdate() WHERE accountIDX = @accountIDX END ELSE BEGIN UPDATE UserCashDB SET amtCash = amtCash - @amtCash , chgDate = getdate() WHERE accountIDX = @accountIDX END GO /****** 개체: StoredProcedure [dbo].[web_recommend_point_save_dec] 스크립트 날짜: 05/04/2012 14:08:54 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[web_recommend_point_save_dec] ( @accountIDX int , @point int ) AS if (@point = 0) BEGIN UPDATE userInfoDB SET rec_inc=0, rec_dec=-1 WHERE accountIDX = @accountIDX END else BEGIN UPDATE userInfoDB SET rec_dec=rec_dec-1 WHERE accountIDX = @accountIDX END GO /****** 개체: StoredProcedure [dbo].[web_guild_mark_log_get_data] 스크립트 날짜: 05/04/2012 14:08:00 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[web_guild_mark_log_get_data] ( @idx int ) AS SELECT guildIDX, accountIDX, havepeso, markprice, nowmark, changemark, regDate FROM LosaGame_log.DBO.log_guild_mark WHERE idx=@idx and flag=0 GO /****** 개체: StoredProcedure [dbo].[web_login_info_save] 스크립트 날짜: 05/04/2012 14:08:05 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[web_login_info_save] ( @accountIDX int , @loginType tinyint ) AS if (@loginType = 1) BEGIN UPDATE userInfoDB SET checkDate = getDate(), visit_count = visit_count + 1, cnnDate = getdate() WHERE accountIDX = @accountIDX END else BEGIN UPDATE userInfoDB SET cnnDate = getdate() WHERE accountIDX = @accountIDX END GO /****** 개체: StoredProcedure [dbo].[web_avatar_shop_buy_log] 스크립트 날짜: 05/04/2012 14:07:32 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[web_avatar_shop_buy_log] ( @accountIDX varchar(12) , @userIP varchar(16) , @DBID varchar(16) , @applyType char(2) , @amount int , @note varchar(500) ) AS INSERT INTO LosaGame_log.DBO.log_cash (accountIDX, userIP, DBID, applyType, amount, note, regDate) VALUES (@accountIDX, @userIP, @DBID, @applyType, @amount, @note, getdate()) GO /****** 개체: StoredProcedure [dbo].[web_recommend_userip_count] 스크립트 날짜: 05/04/2012 14:08:55 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[web_recommend_userip_count] ( @userIP varchar(15) ) AS SELECT COUNT(*) FROM LosaGame_log.DBO.log_recommend WHERE userIP = @userIP and regDate > (getdate() - 7) GO /****** 개체: StoredProcedure [dbo].[web_guild_mark_log_delete] 스크립트 날짜: 05/04/2012 14:08:00 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[web_guild_mark_log_delete] ( @idx int , @userIP varchar(15) ) AS UPDATE LosaGame_log.DBO.log_guild_mark SET flag=2, userIP=@userIP WHERE idx=@idx GO /****** 개체: StoredProcedure [dbo].[web_login_info_saveA] 스크립트 날짜: 05/04/2012 14:08:05 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[web_login_info_saveA] ( @accountIDX int ) AS UPDATE userInfoDB SET checkDate = getDate(), visit_count = visit_count + 1, cnnDate = getdate() WHERE accountIDX = @accountIDX GO /****** 개체: StoredProcedure [dbo].[web_block_ip_get_list] 스크립트 날짜: 05/04/2012 14:07:32 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[web_block_ip_get_list] AS SELECT content FROM define_site_config WHERE objName = 'blockIP' GO /****** 개체: StoredProcedure [dbo].[web_relmember_get_bonus_count] 스크립트 날짜: 05/04/2012 14:08:55 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[web_relmember_get_bonus_count] ( @accountIDX int , @userEncode varchar(64) ) AS SELECT count(*) FROM LosaGame_log.DBO.log_realmember WHERE accountIDX=@accountIDX GO /****** 개체: StoredProcedure [dbo].[web_login_info_saveB] 스크립트 날짜: 05/04/2012 14:08:06 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[web_login_info_saveB] ( @accountIDX int ) AS UPDATE userInfoDB SET cnnDate = getdate() WHERE accountIDX = @accountIDX GO /****** 개체: StoredProcedure [dbo].[web_cash_event_log_add] 스크립트 날짜: 05/04/2012 14:07:32 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[web_cash_event_log_add] ( @accountIDX int , @eventType int , @cash int , @flag varchar(50) ) AS INSERT INTO LosaGame_log.DBO.log_mgame_cash_event (accountIDX, eventType, cash, flag, regDate) VALUES (@accountIDX, @eventType, @cash, @flag, getdate()) GO /****** 개체: StoredProcedure [dbo].[web_resite_bonus_point] 스크립트 날짜: 05/04/2012 14:08:55 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[web_resite_bonus_point] ( @accountIDX varchar(12) , @bonusCash int , @userIP varchar(16) ) AS UPDATE userInfoDB SET clickDate = getdate() WHERE accountIDX=@accountIDX UPDATE userCashDB SET amtCash = amtCash + @bonusCash , amtBonus = amtBonus + @bonusCash , chgDate = getdate() WHERE accountIDX = @accountIDX INSERT INTO LosaGame_log.DBO.log_cash (accountIDX, userIP, [DBID], applyType, amount, note, regDate) VALUES (@accountIDX, @userIP, 'BNNCLICK', 'B0', @bonusCash, '배너 클릭 보너스', getdate()) GO /****** 개체: StoredProcedure [dbo].[web_login_myRanking] 스크립트 날짜: 05/04/2012 14:08:06 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[web_login_myRanking] ( @accountIDX int ) AS SELECT ranking_2day, ranking_1day FROM userRankingDB_classgroup WITH(NOLOCK) WHERE accountIDX=@accountIDX GO /****** 개체: StoredProcedure [dbo].[web_resite_get_data] 스크립트 날짜: 05/04/2012 14:08:55 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[web_resite_get_data] ( @accountIDX int ) AS SELECT clickDate FROM userInfoDB WHERE accountIDX=@accountIDX GO /****** 개체: StoredProcedure [dbo].[game_character_regdate_save] 스크립트 날짜: 05/04/2012 14:05:51 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[game_character_regdate_save] ( @idx int ) AS UPDATE userCharacterDB SET regDate=getdate() WHERE idx=@idx GO /****** 개체: StoredProcedure [dbo].[game_character_delete_limitdate] 스크립트 날짜: 05/04/2012 14:05:50 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[game_character_delete_limitdate] ( @accountIDX int ) As DELETE FROM userCharacterDB WHERE accountIDX = @accountIDX and limitTime=0 and limitType=0 and getdate() > DateAdd(d,1,regDate) GO /****** 개체: StoredProcedure [dbo].[web_main_cafe_list] 스크립트 날짜: 05/04/2012 14:08:06 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[web_main_cafe_list] AS SELECT TOP 5 value1, value2 FROM define_config WITH(NOLOCK) WHERE objName='cafe' ORDER BY idx ASC GO /****** 개체: StoredProcedure [dbo].[web_main_get_limit_reason] 스크립트 날짜: 05/04/2012 14:08:06 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[web_main_get_limit_reason] ( @accountIDX int ) AS SELECT TOP 1 reason FROM LosaGame_log.DBO.log_mannerpoint WITH(NOLOCK) WHERE receiveidx=@accountIDX and resultType=1 and reason is not null ORDER BY idx DESC GO /****** 개체: StoredProcedure [dbo].[web_main_user_ranking] 스크립트 날짜: 05/04/2012 14:08:06 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[web_main_user_ranking] AS SELECT TOP 5 b.accountIDX, b.nickName, a.userLevel, a.ranking_2day, a.ranking_1day FROM userRankingDB_classgroup a JOIN userMemberDB b ON a.accountIDX=b.accountIDX ORDER BY a.ranking_1day ASC GO /****** 개체: StoredProcedure [dbo].[web_mannerpoint_dec_topn] 스크립트 날짜: 05/04/2012 14:08:07 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[web_mannerpoint_dec_topn] ( @accountIDX int ) AS -- SELECT ISNULL(SUM(CASE WHEN point < 0 THEN -point ELSE 0 END), 0) FROM (SELECT TOP 25 point FROM userMannerpointDB WHERE accountIDX=@accountIDX and resultType=1 ORDER BY regDate DESC) a SELECT 0 GO /****** 개체: StoredProcedure [dbo].[web_minihome_ui_training_rank_data] 스크립트 날짜: 05/04/2012 14:08:28 ******/ SET ANSI_NULLS OFF GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[web_minihome_ui_training_rank_data] ( @userID varchar(12) ) As Declare @regDate datetime Set @regDate = (select regDate from LosaWeb.DBO.userMemberDB where userid=@userID) SELECT win_fix, tie_fix, lose_fix, win_prev, tie_prev, lose_prev, rank_prev, rank_now, rank_total, rank_training FROM userRankingDB_training WHERE userID=@userID and regDate > @regDate GO /****** 개체: StoredProcedure [dbo].[web_mannerpoint_visit] 스크립트 날짜: 05/04/2012 14:08:07 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[web_mannerpoint_visit] ( @accountIDX int , @p int , @userIP varchar(16) ) As INSERT INTO LosaGame_log.DBO.log_mannerpoint_sitevisit (accountIDX, point, userIP, regDate) VALUES (@accountIDX, @p, @userIP, getdate()) GO /****** 개체: StoredProcedure [dbo].[game_game_save] 스크립트 날짜: 05/04/2012 14:06:11 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[game_game_save] ( @accountIDX int , @userState int , @gameMoney bigint , @conn_count int , @connDate datetime , @userLevel int , @userEXP int , @playTime int , @regionType int , @userFishingLevel int , @userFishingEXP int , @refillData int , @userExcavationLevel int , @userExcavationEXP int ) As UPDATE userGameDB SET gameMoney = @gameMoney , userState = @userState , playTime = playTime + Round((@playTime/1000)/60,0) , conn_count = @conn_count , userLevel = @userLevel , userEXP = @userEXP , userFishingLevel = @userFishingLevel , userFishingEXP = @userFishingEXP , regionType = @regionType , connDate = @connDate , refillData = @refillData , userExcavationLevel = @userExcavationLevel , userExcavationEXP = @userExcavationEXP WHERE accountIDX = @accountIDX GO /****** 개체: StoredProcedure [dbo].[web_login_get_data] 스크립트 날짜: 05/04/2012 14:08:05 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[web_login_get_data] ( @userID varchar(12) ) AS SELECT a.accountIDX, a.userID, a.nickName, a.userPWD, a.userType, a.joinType, a.cpType, b.visit_count, b.checkDate, b.rec_index, c.userLevel, c.playTime FROM userMemberDB a INNER JOIN userInfoDB b ON a.accountIDX = b.accountIDX LEFT JOIN userGameDB c ON a.accountIDX = c.accountIDX WHERE a.userID = @userID GO /****** 개체: StoredProcedure [dbo].[web_character_movie_count] 스크립트 날짜: 05/04/2012 14:07:33 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[web_character_movie_count] AS SELECT count(*) FROM define_class GO /****** 개체: StoredProcedure [dbo].[web_character_movie_get_list] 스크립트 날짜: 05/04/2012 14:07:33 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[web_character_movie_get_list] AS SELECT idx, classHanName FROM define_class WITH(NOLOCK) ORDER BY movieorderby DESC GO /****** 개체: StoredProcedure [dbo].[game_member_total_count] 스크립트 날짜: 05/04/2012 14:06:59 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[game_member_total_count] AS SELECT count(*) FROM userMemberDB GO /****** 개체: StoredProcedure [dbo].[web_character_movie_list] 스크립트 날짜: 05/04/2012 14:07:34 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[web_character_movie_list] ( @pagesize varchar(8) , @notpage varchar(8) ) AS DECLARE @sql varchar(500) SET @sql = '' SET @sql = @sql + 'SELECT TOP ' + @pagesize + ' idx, classHanName FROM define_class WITH(NOLOCK) ' SET @sql = @sql + 'WHERE idx not in (SELECT TOP ' + @notpage + ' idx FROM define_class WITH(NOLOCK) ORDER BY movieorderby DESC' SET @sql = @sql + ') ORDER BY idx DESC' EXECUTE(@sql) GO /****** 개체: StoredProcedure [dbo].[web_medal_define_count] 스크립트 날짜: 05/04/2012 14:08:08 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[web_medal_define_count] AS SELECT max(medalCode) FROM define_medal GO /****** 개체: StoredProcedure [dbo].[web_class_define_class_list] 스크립트 날짜: 05/04/2012 14:07:34 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[web_class_define_class_list] AS SELECT idx, classHanName, classEngName FROM define_class GO /****** 개체: StoredProcedure [dbo].[web_medal_define_list] 스크립트 날짜: 05/04/2012 14:08:09 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[web_medal_define_list] AS SELECT medalCode, eng_name, point, title, content1, content2 FROM define_medal ORDER BY medalCode ASC GO /****** 개체: StoredProcedure [dbo].[web_class_define_count] 스크립트 날짜: 05/04/2012 14:07:34 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[web_class_define_count] AS SELECT count(*) FROM define_class GO /****** 개체: StoredProcedure [dbo].[game_ranking_hero_get_data] 스크립트 날짜: 05/04/2012 14:07:17 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[game_ranking_hero_get_data] ( @accountIDX int ) AS SELECT title, daily, season1, season2, season3, season4, season5, season6 FROM userRankingDB_hero WHERE accountIDX=@accountIDX GO /****** 개체: StoredProcedure [dbo].[web_medal_get_info] 스크립트 날짜: 05/04/2012 14:08:09 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[web_medal_get_info] ( @idx int ) AS SELECT idx, medalCode, eng_name, point, title, content1, content2 FROM define_medal WHERE idx=(SELECT medalIDX FROM userMedalDB_receive WHERE idx=@idx) GO /****** 개체: StoredProcedure [dbo].[web_coupon_get_coupontype] 스크립트 날짜: 05/04/2012 14:07:34 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[web_coupon_get_coupontype] ( @sn char(12) ) AS SELECT couponType FROM define_serial WHERE sn=@sn GO /****** 개체: StoredProcedure [dbo].[web_coupon_get_sn_count] 스크립트 날짜: 05/04/2012 14:07:35 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[web_coupon_get_sn_count] ( @sn varchar(12) , @flag tinyint ) AS SELECT count(*) FROM define_serial WHERE sn=@sn and couponType=@flag GO /****** 개체: StoredProcedure [dbo].[web_community_get_best_count] 스크립트 날짜: 05/04/2012 14:07:34 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[web_community_get_best_count] AS SELECT content FROM define_site_config WHERE objName='bestcount' GO /****** 개체: StoredProcedure [dbo].[game_login_init_server] 스크립트 날짜: 05/04/2012 14:06:56 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[game_login_init_server] ( @gameServerID bigint ) As UPDATE userLoginDB SET gameServerID = 0 WHERE gameServerID = @gameServerID GO /****** 개체: StoredProcedure [dbo].[web_coupon_get_sn_count_temp] 스크립트 날짜: 05/04/2012 14:07:35 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[web_coupon_get_sn_count_temp] ( @sn varchar(12) , @flag varchar(20) ) AS DECLARE @sql varchar(500) SET @sql = 'SELECT count(*) FROM define_serial WHERE sn=''' + @sn + ''' and couponType in (' + @flag + ')' EXECUTE (@sql) GO /****** 개체: StoredProcedure [dbo].[web_coupon_get_sn_info] 스크립트 날짜: 05/04/2012 14:07:35 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[web_coupon_get_sn_info] ( @sn varchar(12) , @flag tinyint ) AS SELECT accountIDX, userIP FROM define_serial WHERE sn=@sn and couponType=@flag GO /****** 개체: StoredProcedure [dbo].[web_coupon_get_sn_info_temp] 스크립트 날짜: 05/04/2012 14:07:35 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[web_coupon_get_sn_info_temp] ( @sn varchar(12) , @flag varchar(20) ) AS DECLARE @sql varchar(500) SET @sql = 'SELECT accountIDX, userIP, couponType FROM define_serial WHERE sn=''' + @sn + ''' and couponType in (' + @flag + ')' EXECUTE (@sql) GO /****** 개체: StoredProcedure [dbo].[web_medal_receive_now] 스크립트 날짜: 05/04/2012 14:08:10 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[web_medal_receive_now] ( @accountIDX int ) As SELECT a.visit_count, a.rec_index, b.userState FROM userInfoDB a JOIN userGameDB b ON a.accountIDX = b.accountIDX WHERE a.accountIDX=@accountIDX GO /****** 개체: StoredProcedure [dbo].[web_coupon_get_user_count] 스크립트 날짜: 05/04/2012 14:07:36 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[web_coupon_get_user_count] ( @accountIDX int , @flag int ) AS SELECT count(*) FROM define_serial WHERE accountIDX=@accountIDX and couponType=@flag GO /****** 개체: StoredProcedure [dbo].[game_guild_member_get_list] 스크립트 날짜: 05/04/2012 14:06:18 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[game_guild_member_get_list] ( @guildIDX int ) AS SELECT a.idx, a.accountIDX, b.userLevel, c.nickName, a.guildPosition FROM userGuildInfoDB a INNER JOIN userGameDB b ON a.accountIDX = b.accountIDX INNER JOIN userMemberDB c ON a.accountIDX = c.accountIDX WHERE guildIDX = @guildIDX and guildJoinType=1 ORDER BY a.idx ASC GO /****** 개체: StoredProcedure [dbo].[web_minihome_ui_hq_class_data] 스크립트 날짜: 05/04/2012 14:08:27 ******/ SET ANSI_NULLS OFF GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[web_minihome_ui_hq_class_data] ( @userID varchar(12) ) As SELECT class1_type, class1_level, class1_expert, class2_type, class2_level, class2_expert, class3_type, class3_level, class3_expert, class4_type, class4_level, class4_expert, class5_type, class5_level, class5_expert, class6_type, class6_level, class6_expert, class7_type, class7_level, class7_expert, class8_type, class8_level, class8_expert, class9_type, class9_level, class9_expert, class10_type, class10_level, class10_expert FROM userClassDB WHERE accountIDX=(SELECT accountIDX FROM userGameDB WHERE userID=@userID) GO /****** 개체: StoredProcedure [dbo].[game_guild_join_get_list] 스크립트 날짜: 05/04/2012 14:06:15 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[game_guild_join_get_list] ( @guildIDX int ) AS SELECT a.idx, a.accountIDX, b.userLevel, c.nickName FROM userGuildInfoDB a INNER JOIN userGameDB b ON a.accountIDX = b.accountIDX INNER JOIN userMemberDB c ON a.accountIDX = c.accountIDX WHERE guildIDX = @guildIDX and guildJoinType=0 ORDER BY a.idx ASC GO /****** 개체: StoredProcedure [dbo].[game_trade_get_self_index] 스크립트 날짜: 05/04/2012 14:07:24 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[game_trade_get_self_index] ( @accountIDX int ) AS SELECT Max(idx) FROM userTradeDB WHERE accountIDX = @accountIDX GO /****** 개체: StoredProcedure [dbo].[web_game_server_count_typeisIP] 스크립트 날짜: 05/04/2012 14:07:50 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[web_game_server_count_typeisIP] ( @serverIP varchar(15) ) As SELECT count(*) FROM define_game_server WHERE serverIP = @serverIP GO /****** 개체: StoredProcedure [dbo].[web_medal_sum_point] 스크립트 날짜: 05/04/2012 14:08:10 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[web_medal_sum_point] ( @medalcode varchar(1000) ) AS DECLARE @sql varchar(1200) SET @sql = 'SELECT SUM(point) FROM define_medal WHERE medalCode in (' + @medalcode + ')' EXECUTE (@sql) GO /****** 개체: StoredProcedure [dbo].[web_coupon_get_user_count_temp] 스크립트 날짜: 05/04/2012 14:07:36 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[web_coupon_get_user_count_temp] ( @accountIDX varchar(10) , @flag varchar(20) ) AS DECLARE @sql varchar(500) SET @sql = 'SELECT count(*) FROM define_serial WHERE accountIDX=' + @accountIDX + ' and couponType in (' + @flag + ')' EXECUTE (@sql) GO /****** 개체: StoredProcedure [dbo].[web_coupon_use_coupon] 스크립트 날짜: 05/04/2012 14:07:37 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[web_coupon_use_coupon] ( @accountIDX int , @serial varchar(12) , @userIP varchar(15) , @flag tinyint ) AS BEGIN TRAN UPDATE define_serial SET accountIDX = @accountIDX , userIP = @userIP , regDate = getdate() WHERE sn=@serial and couponType=@flag COMMIT TRAN GO /****** 개체: StoredProcedure [dbo].[web_game_server_get_list_typeisIP] 스크립트 날짜: 05/04/2012 14:07:51 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[web_game_server_get_list_typeisIP] ( @serverIP varchar(15) ) As SELECT serverID, serverName FROM define_game_server WHERE serverIP = @serverIP GO /****** 개체: StoredProcedure [dbo].[game_trade_delete] 스크립트 날짜: 05/04/2012 14:07:23 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[game_trade_delete] ( @idx int ) AS DELETE FROM userTradeDB WHERE idx = @idx GO /****** 개체: StoredProcedure [dbo].[web_minihome_userinfo_battle_rank_data] 스크립트 날짜: 05/04/2012 14:08:30 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[web_minihome_userinfo_battle_rank_data] ( @accountIDX int ) As SELECT win_fix, tie_fix, lose_fix, win_prev, tie_prev, lose_prev, rank_prev, rank_now, rank_total, rank_battle FROM userRankingDB_battle WHERE accountIDX=@accountIDX GO /****** 개체: StoredProcedure [dbo].[game_guild_join_delete] 스크립트 날짜: 05/04/2012 14:06:15 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[game_guild_join_delete] ( @idx int ) AS DELETE FROM userGuildInfoDB WHERE idx=@idx GO /****** 개체: StoredProcedure [dbo].[game_guild_use_item] 스크립트 날짜: 05/04/2012 14:06:21 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[game_guild_use_item] ( @no varchar(4) , @tblIDX varchar(12) ) AS DECLARE @sql varchar(200) SET @sql = 'UPDATE userItemETCDB SET item' + @no + '_type=0, item' + @no + '_value1=0, item' + @no + '_value2=0 WHERE idx=' + @tblIDX EXECUTE (@sql) GO /****** 개체: StoredProcedure [dbo].[game_friend_check_member] 스크립트 날짜: 05/04/2012 14:06:07 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[game_friend_check_member] ( @friendNickName varchar (20) ) As SELECT userID, nickName, accountIDX FROM userMemberDB WHERE nickName = @friendNickName GO /****** 개체: StoredProcedure [dbo].[game_guild_member_out] 스크립트 날짜: 05/04/2012 14:06:19 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[game_guild_member_out] ( @idx int , @guildIDX int ) AS SET XACT_ABORT ON BEGIN TRAN UPDATE userGuildInfoDB SET guildJoinType=-1, msg=2 WHERE idx=@idx UPDATE userGuildDB SET membercount = membercount-1 WHERE idx=@guildIDX COMMIT TRAN GO /****** 개체: StoredProcedure [dbo].[web_define_quest_add] 스크립트 날짜: 05/04/2012 14:07:39 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[web_define_quest_add] ( @questIDX int , @title varchar(100) , @progress varchar(100) , @content1 varchar(150) , @content2 varchar(150) , @content3 varchar(150) , @content4 varchar(150) ) AS INSERT INTO define_quest (questIDX, title, progress, content1, content2, content3, content4) VALUES (@questIDX, @title, @progress, @content1, @content2, @content3, @content4) GO /****** 개체: StoredProcedure [dbo].[game_award_get_level] 스크립트 날짜: 05/04/2012 14:05:46 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[game_award_get_level] ( @accountIDX int ) AS SELECT awardLevel, expert FROM userRankingDB_award WHERE accountIDX=@accountIDX GO /****** 개체: StoredProcedure [dbo].[z_nouse_game_guild_ranking_level_save] 스크립트 날짜: 05/04/2012 14:09:03 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[z_nouse_game_guild_ranking_level_save] ( @guildIDX int , @ranking_prev int , @ranking_now int , @guildLevel int ) AS UPDATE userGuildDB SET ranking_prev = @ranking_prev , ranking_now = @ranking_now , guildLevel = @guildLevel WHERE idx=@guildIDX GO /****** 개체: StoredProcedure [dbo].[web_user_friend_get_data] 스크립트 날짜: 05/04/2012 14:08:57 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[web_user_friend_get_data] ( @idx varchar(10) , @userID varchar(12) , @topNo varchar(10) ) As DECLARE @strSQL varchar(500) SET @strSQL = 'Select Top ' + @topNo + ' idx, friendNickName from LosaWeb.DBO.userFriendDB where userID = ''' + @userID + ''' and idx < ' + @idx + ' order by idx desc' EXEC (@strSQL) GO /****** 개체: StoredProcedure [dbo].[game_guild_member_self_out] 스크립트 날짜: 05/04/2012 14:06:19 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[game_guild_member_self_out] ( @accountIDX int , @guildIDX int ) AS SET XACT_ABORT ON BEGIN TRAN DELETE FROM userGuildInfoDB WHERE guildIDX=@guildIDX and accountIDX=@accountIDX UPDATE userGuildDB SET membercount = membercount-1 WHERE idx=@guildIDX COMMIT TRAN GO /****** 개체: StoredProcedure [dbo].[web_user_login_update] 스크립트 날짜: 05/04/2012 14:08:59 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[web_user_login_update] ( @userID varchar(12) , @encodeKey char(15) , @gameServerID bigint ) As UPDATE userLoginDB SET encodeKey = @encodeKey , gameServerID = @gameServerID WHERE userID = @userID GO /****** 개체: StoredProcedure [dbo].[web_member_edit_get_data] 스크립트 날짜: 05/04/2012 14:08:16 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[web_member_edit_get_data] ( @accountIDX int ) AS SELECT a.userID, a.nickName, a.userPWD, a.EMail, a.mailling, a.joinType, b.userName, b.userEnCode, isNull(c.tel,'') AS 'tel', isNull(c.mobile,'') AS 'mobile', isNull(c.zipcode,'') AS 'zipcode', isNull(c.address1,'') AS 'address1', isNull(c.address2,'') AS 'address2' FROM userMemberDB a JOIN userNameDB b on a.accountIDX = b.accountIDX LEFT JOIN userInfoBDB c ON a.accountIDX=c.accountIDX WHERE a.accountIDX = @accountIDX GO /****** 개체: StoredProcedure [dbo].[web_define_quest_count] 스크립트 날짜: 05/04/2012 14:07:39 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[web_define_quest_count] ( @questIDX int ) AS SELECT count(*) FROM define_quest WHERE questIDX=@questIDX GO /****** 개체: StoredProcedure [dbo].[game_award_level_save] 스크립트 날짜: 05/04/2012 14:05:47 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[game_award_level_save] ( @accountIDX int , @awardLevel int , @expert int ) AS If (exists(SELECT * FROM userRankingDB_award WHERE accountIDX=@accountIDX)) BEGIN UPDATE userRankingDB_award SET awardLevel=@awardLevel, expert=@expert WHERE @accountIDX=@accountIDX END ELSE BEGIN INSERT INTO userRankingDB_award (accountIDX, awardLevel, expert, regDate) VALUES (@accountIDX, @awardLevel, @expert, getdate()) END GO /****** 개체: StoredProcedure [dbo].[z_nouse_game_guild_point_save] 스크립트 날짜: 05/04/2012 14:09:03 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[z_nouse_game_guild_point_save] ( @guildIDX int , @point_total int , @point_today int ) AS UPDATE userGuildDB SET point_total = @point_total , point_today = @point_today WHERE idx=@guildIDX GO /****** 개체: StoredProcedure [dbo].[web_minihome_userinfo_class_group_rank_data] 스크립트 날짜: 05/04/2012 14:08:31 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[web_minihome_userinfo_class_group_rank_data] ( @accountIDX int ) AS SELECT classType, nowRanking FROM userRankingDB_class WHERE accountIDX=@accountIDX GO /****** 개체: StoredProcedure [dbo].[game_guild_member_out_delete] 스크립트 날짜: 05/04/2012 14:06:19 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[game_guild_member_out_delete] ( @accountIDX int , @guildIDX int ) AS DELETE FROM userGuildInfoDB WHERE guildIDX=@guildIDX and accountIDX=@accountIDX GO /****** 개체: StoredProcedure [dbo].[game_character_delete] 스크립트 날짜: 05/04/2012 14:05:50 ******/ SET ANSI_NULLS OFF GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[game_character_delete] ( @idx int ) As DELETE FROM userCharacterDB WHERE idx=@idx GO /****** 개체: StoredProcedure [dbo].[z_nouse_game_guild_ranking_point_save] 스크립트 날짜: 05/04/2012 14:09:03 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[z_nouse_game_guild_ranking_point_save] ( @guildIDX int , @ranking_prev int , @ranking_now int , @point_total int , @point_today int , @guildLevel int ) AS UPDATE userGuildDB SET ranking_prev = @ranking_prev , ranking_now = @ranking_now , point_total = @point_total , point_today = @point_today , guildLevel = @guildLevel WHERE idx=@guildIDX GO /****** 개체: StoredProcedure [dbo].[web_minihome_userinfo_class_group_rank_data_temp] 스크립트 날짜: 05/04/2012 14:08:31 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[web_minihome_userinfo_class_group_rank_data_temp] ( @accountIDX int ) AS SELECT classType, nowRanking FROM userRankingDB_class WHERE accountIDX=@accountIDX GO /****** 개체: StoredProcedure [dbo].[game_guild_mark_save] 스크립트 날짜: 05/04/2012 14:06:18 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[game_guild_mark_save] ( @guildIDX int , @mark int ) AS UPDATE userGuildDB SET guildmark=@mark WHERE idx=@guildIDX GO /****** 개체: StoredProcedure [dbo].[web_define_quest_save] 스크립트 날짜: 05/04/2012 14:07:39 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[web_define_quest_save] ( @questIDX int , @title varchar(100) , @progress varchar(100) , @content1 varchar(150) , @content2 varchar(150) , @content3 varchar(150) , @content4 varchar(150) ) AS UPDATE define_quest SET title = @title , progress = @progress , content1 = @content1 , content2 = @content2 , content3 = @content3 , content4 = @content4 WHERE questIDX = @questIDX GO /****** 개체: StoredProcedure [dbo].[z_nouse_game_character_delete_limitdate] 스크립트 날짜: 05/04/2012 14:08:59 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[z_nouse_game_character_delete_limitdate] ( @accountIDX int ) As DELETE FROM userCharacterDB WHERE accountIDX = @accountIDX and getdate() > DateAdd(d,1,Class_limitdate) GO /****** 개체: StoredProcedure [dbo].[game_guild_intro_save] 스크립트 날짜: 05/04/2012 14:06:15 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[game_guild_intro_save] ( @guildIDX int , @content varchar(110) ) AS UPDATE userGuildDB SET aboutguild=@content WHERE idx=@guildIDX GO /****** 개체: StoredProcedure [dbo].[web_member_join_event_log_save] 스크립트 날짜: 05/04/2012 14:08:17 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[web_member_join_event_log_save] ( @mgameID varchar(20) , @flag varchar(50) ) AS UPDATE LosaGame_log.DBO.log_mgame_cash_event SET cash=1000, flag=@flag WHERE accountIDX=(SELECT accountIDX FROM userCooperationDB WHERE cpID=@mgameID and cpType=300) GO /****** 개체: StoredProcedure [dbo].[web_minihome_userinfo_faction_rank_data] 스크립트 날짜: 05/04/2012 14:08:32 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[web_minihome_userinfo_faction_rank_data] ( @accountIDX int ) As SELECT win_fix, tie_fix, lose_fix, win_prev, tie_prev, lose_prev, rank_prev, rank_now, rank_total, rank_faction FROM userRankingDB_faction WHERE accountIDX=@accountIDX GO /****** 개체: StoredProcedure [dbo].[web_event_recommend_add] 스크립트 날짜: 05/04/2012 14:07:41 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[web_event_recommend_add] ( @accountIDX int , @userIP varchar(15) , @ref varchar(200) ) AS INSERT INTO LosaGame_log.DBO.log_event_recommend (accountIDX, userIP, ref, point, regDate) VALUES (@accountIDX, @userIP, @ref, -1, getdate()) GO /****** 개체: StoredProcedure [dbo].[game_guild_position_save] 스크립트 날짜: 05/04/2012 14:06:20 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[game_guild_position_save] ( @accountIDX int , @guildIDX int , @position varchar(12) ) AS DECLARE @msg tinyint if (@position = '부길드장') SET @msg = 3 if (@position = '길드원') SET @msg = 5 UPDATE userGuildInfoDB SET guildPosition=@position, msg=@msg WHERE guildIDX=@guildIDX and accountIDX=@accountIDX GO /****** 개체: StoredProcedure [dbo].[web_minihome_ui_hq_class_rank_data] 스크립트 날짜: 05/04/2012 14:08:27 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[web_minihome_ui_hq_class_rank_data] ( @userID varchar(12) ) As SELECT class1, class2, class3, class4, class5, class6, class7, class8, class9, class10, class11, class12, class13, class14 FROM userRankingDB_class WHERE userID=@userID GO /****** 개체: StoredProcedure [dbo].[set_class_price] 스크립트 날짜: 05/04/2012 14:07:27 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[set_class_price] ( @c1 int , @c2 int , @c3 int , @c4 int , @c5 int , @c6 int , @c7 int , @c8 int , @c9 int , @c10 int , @c11 int , @c12 int , @c13 int , @c14 int , @c15 int , @c16 int , @c17 int , @c18 int , @c19 int , @c20 int , @c21 int , @c22 int , @c23 int , @c24 int , @c25 int , @c26 int , @c27 int , @c28 int , @c29 int , @c30 int , @c31 int , @c32 int , @c33 int , @c34 int , @c35 int , @c36 int , @c37 int , @c38 int , @c39 int , @c40 int , @c41 int , @c42 int , @c43 int , @c44 int , @c45 int , @c46 int , @c47 int , @c48 int , @c49 int , @c50 int ) AS DECLARE @i tinyint SET @i=1 While (@i <= 2) BEGIN INSERT INTO define_class_price ( class1_price, class1_buy_cnt, class2_price, class2_buy_cnt, class3_price, class3_buy_cnt, class4_price, class4_buy_cnt, class5_price, class5_buy_cnt, class6_price, class6_buy_cnt, class7_price, class7_buy_cnt, class8_price, class8_buy_cnt, class9_price, class9_buy_cnt, class10_price, class10_buy_cnt, class11_price, class11_buy_cnt, class12_price, class12_buy_cnt, class13_price, class13_buy_cnt, class14_price, class14_buy_cnt, class15_price, class15_buy_cnt, class16_price, class16_buy_cnt, class17_price, class17_buy_cnt, class18_price, class18_buy_cnt, class19_price, class19_buy_cnt, class20_price, class20_buy_cnt, class21_price, class21_buy_cnt, class22_price, class22_buy_cnt, class23_price, class23_buy_cnt, class24_price, class24_buy_cnt, class25_price, class25_buy_cnt, class26_price, class26_buy_cnt, class27_price, class27_buy_cnt, class28_price, class28_buy_cnt, class29_price, class29_buy_cnt, class30_price, class30_buy_cnt, class31_price, class31_buy_cnt, class32_price, class32_buy_cnt, class33_price, class33_buy_cnt, class34_price, class34_buy_cnt, class35_price, class35_buy_cnt, class36_price, class36_buy_cnt, class37_price, class37_buy_cnt, class38_price, class38_buy_cnt, class39_price, class39_buy_cnt, class40_price, class40_buy_cnt, class41_price, class41_buy_cnt, class42_price, class42_buy_cnt, class43_price, class43_buy_cnt, class44_price, class44_buy_cnt, class45_price, class45_buy_cnt, class46_price, class46_buy_cnt, class47_price, class47_buy_cnt, class48_price, class48_buy_cnt, class49_price, class49_buy_cnt, class50_price, class50_buy_cnt ) SELECT @c1, 0, @c2, 0, @c3, 0, @c4, 0, @c5, 0, @c6, 0, @c7, 0, @c8, 0, @c9, 0, @c10, 0, @c11, 0, @c12, 0, @c13, 0, @c14, 0, @c15, 0, @c12, 0, @c17, 0, @c18, 0, @c19, 0, @c20, 0, @c21, 0, @c22, 0, @c23, 0, @c24, 0, @c25, 0, @c26, 0, @c27, 0, @c28, 0, @c29, 0, @c30, 0, @c31, 0, @c32, 0, @c33, 0, @c34, 0, @c35, 0, @c36, 0, @c37, 0, @c38, 0, @c39, 0, @c40, 0, @c41, 0, @c42, 0, @c43, 0, @c44, 0, @c45, 0, @c46, 0, @c47, 0, @c48, 0, @c49, 0, @c50, 0 SET @i = @i + 1 END GO /****** 개체: StoredProcedure [dbo].[game_guild_position_msg_save] 스크립트 날짜: 05/04/2012 14:06:20 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[game_guild_position_msg_save] ( @accountIDX int , @guildIDX int , @msg int ) AS UPDATE userGuildInfoDB SET msg=@msg WHERE guildIDX=@guildIDX and accountIDX=@accountIDX GO /****** 개체: StoredProcedure [dbo].[web_event_recommend_get_checkip] 스크립트 날짜: 05/04/2012 14:07:41 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[web_event_recommend_get_checkip] ( @userIP varchar(16) ) AS SELECT TOP 1 accountIDX, point FROM LosaGame_log.DBO.log_event_recommend_ipcheck WHERE userIP=@userIP ORDER BY idx DESC GO /****** 개체: StoredProcedure [dbo].[web_event_recommend_get_idx] 스크립트 날짜: 05/04/2012 14:07:41 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[web_event_recommend_get_idx] ( @accountIDX int , @userIP varchar(15) ) AS SELECT MAX(idx) FROM LosaGame_log.DBO.log_event_recommend WITH(NOLOCK) WHERE accountIDX=@accountIDX and userIP=@userIP GO /****** 개체: StoredProcedure [dbo].[game_get_nickname] 스크립트 날짜: 05/04/2012 14:06:12 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[game_get_nickname] ( @accountIDX int ) AS SELECT nickName FROM userMemberDB WHERE accountIDX=@accountIDX GO /****** 개체: StoredProcedure [dbo].[web_event_recommend_get_ip] 스크립트 날짜: 05/04/2012 14:07:42 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[web_event_recommend_get_ip] ( @accountIDX int ) AS SELECT TOP 1 userIP FROM LosaGame_log.DBO.log_event_recommend_ipcheck with(nolock) WHERE accountIDX=@accountIDX ORDER BY idx DESC GO /****** 개체: StoredProcedure [dbo].[web_event_recommend_get_point] 스크립트 날짜: 05/04/2012 14:07:42 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[web_event_recommend_get_point] ( @accountIDX int ) AS SELECT nowpoint, todaypoint, accpoint FROM event_recommend WHERE accountIDX=@accountIDX GO /****** 개체: StoredProcedure [dbo].[game_guild_join_my_list] 스크립트 날짜: 05/04/2012 14:06:16 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[game_guild_join_my_list] ( @accountIDX int ) AS SELECT TOP 100 b.idx FROM userGuildInfoDB a INNER JOIN userGuildDB b ON a.guildIDX = b.idx WHERE accountIDX=@accountIDX ORDER BY a.idx ASC GO /****** 개체: StoredProcedure [dbo].[web_member_recommend_join_get_accountIDX] 스크립트 날짜: 05/04/2012 14:08:19 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[web_member_recommend_join_get_accountIDX] ( @rinkIP varchar(15) ) As SELECT accountIDX FROM LosaGame_log.DBO.log_recommend_join WHERE rinkIP=@rinkIP and flag=0 GO /****** 개체: StoredProcedure [dbo].[web_event_recommend_ip_count] 스크립트 날짜: 05/04/2012 14:07:42 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[web_event_recommend_ip_count] ( @userIP varchar(16) , @point int ) AS SELECT COUNT(*) FROM LosaGame_log.DBO.log_event_recommend WITH(NOLOCK) WHERE userIP=@userIP and point >= @point GO /****** 개체: StoredProcedure [dbo].[web_event_recommend_ipcount] 스크립트 날짜: 05/04/2012 14:07:42 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[web_event_recommend_ipcount] ( @userIP varchar(16) ) AS SELECT COUNT(*) FROM LosaGame_log.DBO.log_event_recommend_ipcheck WHERE userIP=@userIP GO /****** 개체: StoredProcedure [dbo].[game_event_openbeta_coin_log] 스크립트 날짜: 05/04/2012 14:05:59 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[game_event_openbeta_coin_log] ( @accountIDX int , @coin int ) AS INSERT INTO LosaGame_log.DBO.log_event_openbeta_coin (accountIDX, coin, flag, regDate) VALUES (@accountIDX, @coin, 0, getdate()) GO /****** 개체: StoredProcedure [dbo].[game_guild_fail_add_peso] 스크립트 날짜: 05/04/2012 14:06:14 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[game_guild_fail_add_peso] ( @accountIDX int , @peso int ) AS UPDATE userGameDB SET gameMoney = gameMoney + @peso WHERE accountIDX=@accountIDX GO /****** 개체: StoredProcedure [dbo].[web_member_userIP_count] 스크립트 날짜: 05/04/2012 14:08:19 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[web_member_userIP_count] ( @userIP varchar(15) ) AS SELECT count(*) FROM userInfoDB WHERE regDate >= DateAdd(n,-30,getdate()) and userIP=@userIP GO /****** 개체: StoredProcedure [dbo].[web_event_recommend_log_save] 스크립트 날짜: 05/04/2012 14:07:43 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[web_event_recommend_log_save] ( @idx int , @point int ) AS UPDATE LosaGame_log.DBO.log_event_recommend SET point=@point WHERE idx=@idx GO /****** 개체: StoredProcedure [dbo].[web_user_login_enkey_get_data_headquarter] 스크립트 날짜: 05/04/2012 14:08:58 ******/ SET ANSI_NULLS OFF GO SET QUOTED_IDENTIFIER OFF GO CREATE PROCEDURE [dbo].[web_user_login_enkey_get_data_headquarter] ( @userID varchar(12) ) As SELECT encodeKey, gameServerID, connDate FROM userLoginDB WHERE userID = @userID GO /****** 개체: StoredProcedure [dbo].[web_memberout_check_count] 스크립트 날짜: 05/04/2012 14:08:20 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[web_memberout_check_count] ( @userEnCode varchar(64) ) AS SELECT count(*) FROM LosaGame_log.DBO.log_secession WHERE userEnCode=@userEnCode and outDate >= DateAdd(d,-7,getdate()) GO /****** 개체: StoredProcedure [dbo].[web_event_recommend_point_save] 스크립트 날짜: 05/04/2012 14:07:43 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[web_event_recommend_point_save] ( @accountIDX int , @point int , @userIP varchar(15) ) AS INSERT INTO LosaGame_log.DBO.log_event_recommend_ipcheck (accountIDX, userIP, point, regDate) VALUES (@accountIDX, @userIP, @point, getdate()) IF (exists(SELECT * FROM event_recommend WHERE accountIDX=@accountIDX)) BEGIN UPDATE event_recommend SET nowpoint = nowpoint + @point , todaypoint = todaypoint + @point , accpoint = accpoint + @point WHERE accountIDX=@accountIDX END ELSE BEGIN INSERT INTO event_recommend (accountIDX, nowpoint, todaypoint, accpoint, regDate) VALUES (@accountIDX, @point, @point, @point, getdate()) END GO /****** 개체: StoredProcedure [dbo].[web_minihome_ui_index_rank_data] 스크립트 날짜: 05/04/2012 14:08:28 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[web_minihome_ui_index_rank_data] ( @userID varchar(12) ) As SELECT class, battle, training, award, medal, tester FROM userRankingDB_general WHERE userID=@userID GO /****** 개체: StoredProcedure [dbo].[web_event_recommend_use_list] 스크립트 날짜: 05/04/2012 14:07:44 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[web_event_recommend_use_list] ( @presentType int , @value1 int ) AS SELECT COUNT(*) FROM LosaGame_log.DBO.log_event_recommend_use WITH(NOLOCK) WHERE presentType=@presentType and value1=@value1 and regDate > '2010-12-30 12:00' GO /****** 개체: StoredProcedure [dbo].[web_memberout_get_parent_data] 스크립트 날짜: 05/04/2012 14:08:20 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[web_memberout_get_parent_data] ( @accountIDX int ) As SELECT parentName, parentJumin1, parentJumin2, parentEncode, email, agreeSDate, agreeEDate, agreeType, logIDX FROM userParentDB WHERE accountIDX = @accountIDX GO /****** 개체: StoredProcedure [dbo].[game_class_get_self_index] 스크립트 날짜: 05/04/2012 14:05:55 ******/ SET ANSI_NULLS OFF GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[game_class_get_self_index] ( @accountIDX int ) As SELECT MAX(idx) FROM userClassDB WHERE accountIDX = @accountIDX GO /****** 개체: StoredProcedure [dbo].[web_memberout_get_user_data] 스크립트 날짜: 05/04/2012 14:08:20 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[web_memberout_get_user_data] ( @accountIDX int ) As SELECT a.visit_count, b.userName, b.userJumin1, b.userJumin2, b.userEnCode, c.gameMoney, c.playTime, c.conn_count, c.userLevel, isNull(d.amtCash, 0) as 'amtCash', isNull(d.amtBonus, 0) as 'amtBonus' FROM userInfoDB a LEFT JOIN userNameDB b ON a.accountIDX = b.accountIDX LEFT JOIN userGameDB c ON a.accountIDX = c.accountIDX LEFT JOIN userCashDB d ON a.accountIDX = d.accountIDX WHERE a.accountIDX = @accountIDX GO /****** 개체: StoredProcedure [dbo].[web_minihome_ui_index_get_medal] 스크립트 날짜: 05/04/2012 14:08:27 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[web_minihome_ui_index_get_medal] ( @userID varchar(12) ) As SELECT medal1_type, medal2_type, medal3_type, medal4_type, medal5_type, medal6_type, medal7_type, medal8_type, medal9_type, medal10_type FROM LosaWeb.DBO.userMedalDB WHERE userID = @userID GO /****** 개체: StoredProcedure [dbo].[web_minihome_userinfo_member_count] 스크립트 날짜: 05/04/2012 14:08:32 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[web_minihome_userinfo_member_count] AS SELECT ROWCNT FROM SYSINDEXES WHERE INDID IN (1,0) AND OBJECTPROPERTY(ID, 'ISUSERTABLE') = 1 AND OBJECT_NAME(ID) IN ('userMemberDB') GO /****** 개체: StoredProcedure [dbo].[game_class_get_list] 스크립트 날짜: 05/04/2012 14:05:55 ******/ SET ANSI_NULLS OFF GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[game_class_get_list] ( @accountIDX int ) As SELECT idx, class1_type, class1_level, class1_expert, class2_type, class2_level, class2_expert, class3_type, class3_level, class3_expert, class4_type, class4_level, class4_expert, class5_type, class5_level, class5_expert, class6_type, class6_level, class6_expert, class7_type, class7_level, class7_expert, class8_type, class8_level, class8_expert, class9_type, class9_level, class9_expert, class10_type, class10_level, class10_expert FROM userClassDB WHERE accountIDX = @accountIDX ORDER BY idx ASC GO /****** 개체: StoredProcedure [dbo].[web_minihome_userinfo_rentalm_count] 스크립트 날짜: 05/04/2012 14:08:32 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[web_minihome_userinfo_rentalm_count] ( @accountIDX int ) AS SELECT COUNT(*) FROM LosaGame_log.DBO.log_class_rental_history WITH(NOLOCK) WHERE friendIDX=@accountIDX GO /****** 개체: StoredProcedure [dbo].[game_guild_msg_init] 스크립트 날짜: 05/04/2012 14:06:20 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[game_guild_msg_init] ( @accountIDX int , @guildIDX int ) AS UPDATE userGuildInfoDB SET msg=0 WHERE guildIDX=@guildIDX and accountIDX=@accountIDX and guildJoinType=1 GO /****** 개체: StoredProcedure [dbo].[web_friend_and_guildmember_list] 스크립트 날짜: 05/04/2012 14:07:45 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[web_friend_and_guildmember_list] ( @accountIDX varchar(120) ) AS DECLARE @sql varchar(1000) SET @sql = 'SELECT a.accountIDX, a.nickName, b.userLevel, b.connDate, c.gameServerID, ISNULL(d.class, 0) as ''userRanking'' ' SET @sql = @sql + 'FROM userMemberDB a JOIN userGameDB b ON a.accountIDX = b.accountIDX JOIN userLoginDB c ON a.accountIDX=c.accountIDX LEFT JOIN userRankingDB d ON a.accountIDX = d.accountIDX ' SET @sql = @sql + 'WHERE a.accountIDX in (' + @accountIDX + ') ORDER BY b.userLevel DESC' EXECUTE (@sql) GO /****** 개체: StoredProcedure [dbo].[web_minihome_userinfo_rentaly_count] 스크립트 날짜: 05/04/2012 14:08:33 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[web_minihome_userinfo_rentaly_count] ( @accountIDX int ) AS SELECT COUNT(*) FROM LosaGame_log.DBO.log_class_rental_history WITH(NOLOCK) WHERE accountIDX=@accountIDX GO /****** 개체: StoredProcedure [dbo].[web_minihome_userinfo_site] 스크립트 날짜: 05/04/2012 14:08:33 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[web_minihome_userinfo_site] ( @accountIDX int ) AS SELECT a.nickName, a.regDate, b.visit_count, b.rec_index, b.rec_inc, b.rec_dec, b.cnnDate, ISNULL(c.amtcash, 0) AS 'cash', ISNULL(d.userLevel,0) AS 'userLevel' FROM userMemberDB a LEFT JOIN userInfoDB b ON a.accountIDX = b.accountIDX LEFT JOIN userCashDB c ON a.accountIDX = c.accountIDX LEFT JOIN userGameDB d ON a.accountIDX = d.accountIDX WHERE a.accountIDX = @accountIDX GO /****** 개체: StoredProcedure [dbo].[web_mgame_event_get_logdb_count] 스크립트 날짜: 05/04/2012 14:08:22 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[web_mgame_event_get_logdb_count] ( @accountIDX int , @eventType int ) AS SELECT count(*) FROM LosaGame_log.DBO.log_mgame_cash_event WHERE accountIDX=@accountIDX and eventType=@eventType and flag = '0' GO /****** 개체: StoredProcedure [dbo].[web_cash_get_user_info] 스크립트 날짜: 05/04/2012 14:07:32 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[web_cash_get_user_info] ( @accountIDX int ) AS SELECT a.userID, b.userName, b.userNumber, b.userBirthday, b.userJumin1, b.userJumin2, a.EMail, b.userGender, a.joinType, ISNULL(c.zipcode, '') as 'zipcode' FROM userMemberDB a INNER JOIN userNameDB b ON a.accountIDX = b.accountIDX LEFT JOIN userInfoBDB c ON a.accountIDX = c.accountIDX WHERE a.accountIDX = @accountIDX GO /****** 개체: StoredProcedure [dbo].[web_minihome_userinfo_training_rank_data] 스크립트 날짜: 05/04/2012 14:08:33 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[web_minihome_userinfo_training_rank_data] ( @accountIDX int ) As SELECT win_fix, tie_fix, lose_fix, win_prev, tie_prev, lose_prev, rank_prev, rank_now, rank_total, rank_training FROM userRankingDB_training WHERE accountIDX=@accountIDX GO /****** 개체: StoredProcedure [dbo].[web_friend_get_friendcount] 스크립트 날짜: 05/04/2012 14:07:46 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[web_friend_get_friendcount] ( @accountIDX varchar(150) ) AS DECLARE @sql varchar(500) SET @sql = 'SELECT userAccIDX, count(*) AS ''cnt'' FROM userFriendDB WITH(NOLOCK) WHERE userAccIDX in (' + @accountIDX + ') GROUP BY userAccIDX' EXECUTE (@sql) GO /****** 개체: StoredProcedure [dbo].[game_ability_get_self_index] 스크립트 날짜: 05/04/2012 14:05:41 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[game_ability_get_self_index] ( @accountIDX int ) AS SELECT TOP 1 idx FROM userAbilityDB WHERE accountIDX = @accountIDX ORDER BY idx DESC GO /****** 개체: StoredProcedure [dbo].[web_play_error_log_add] 스크립트 날짜: 05/04/2012 14:08:35 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[web_play_error_log_add] ( @accountIDX int , @userIP varchar(15) , @logType tinyint , @note varchar(200) ) As INSERT INTO LosaGame_log.DBO.log_play_exec (accountIDX, userIP, logType, note, regDate) VALUES (@accountIDX, @userIP, @logType, @note, getdate()) GO /****** 개체: StoredProcedure [dbo].[web_minihome_friend_list] 스크립트 날짜: 05/04/2012 14:08:24 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[web_minihome_friend_list] ( @accountIDX varchar(10) , @pagesize varchar(8) , @notpage varchar(8) ) AS DECLARE @sql varchar(1000) SET @sql = 'SELECT TOP ' + @pagesize + ' b.userLevel, d.accountIDX, d.nickName, b.connDate, c.gameServerID, ISNULL(e.class, 0) as ''userRanking'' FROM userFriendDB a INNER JOIN userGameDB b ON a.friendAccIDX = b.accountIDX INNER JOIN userLoginDB c ON a.friendAccIDX = c.accountIDX INNER JOIN userMemberDB d ON a.friendAccIDX = d.accountIDX LEFT JOIN userRankingDB e ON a.friendAccIDX = e.accountIDX ' SET @sql = @sql + 'WHERE a.userAccIDX=' + @accountIDX + ' and a.idx not in (SELECT TOP ' + @notpage + ' a.idx FROM userFriendDB a INNER JOIN userGameDB b ON a.friendAccIDX = b.accountIDX INNER JOIN userLoginDB c ON a.friendAccIDX = c.accountIDX INNER JOIN userMemberDB d ON a.friendAccIDX = d.accountIDX LEFT JOIN userRankingDB e ON a.friendAccIDX = e.accountIDX WHERE a.userAccIDX=' + @accountIDX + ' ORDER BY b.userLevel DESC) ' SET @sql = @sql + 'ORDER BY b.userLevel DESC' EXECUTE(@sql) GO /****** 개체: StoredProcedure [dbo].[web_friend_join_delete] 스크립트 날짜: 05/04/2012 14:07:48 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[web_friend_join_delete] ( @idx varchar(150) ) AS DECLARE @sql varchar(500) SET @sql = 'DELETE FROM userFriendDB WHERE idx in (' + @idx + ')' EXECUTE (@sql) GO /****** 개체: StoredProcedure [dbo].[web_game_server_count] 스크립트 날짜: 05/04/2012 14:07:50 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[web_game_server_count] As SELECT count(*) FROM define_game_server GO /****** 개체: StoredProcedure [dbo].[web_play_tester_get_data] 스크립트 날짜: 05/04/2012 14:08:36 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[web_play_tester_get_data] ( @accountIDX int ) As SELECT a.visit_count, a.rec_index, b.userLevel FROM userInfoDB a join userGameDB b on a.accountIDX = b.accountIDX WHERE a.accountIDX = @accountIDX GO /****** 개체: StoredProcedure [dbo].[web_user_id_pwd_check] 스크립트 날짜: 05/04/2012 14:08:58 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[web_user_id_pwd_check] ( @userID varchar(12) , @userPWD varchar(24) ) As select count(*) from userMemberDB where userID = @userID and userPWD = @userPWD GO /****** 개체: StoredProcedure [dbo].[web_tester_level_info] 스크립트 날짜: 05/04/2012 14:08:56 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[web_tester_level_info] ( @userID varchar(12) ) As Select a.cntSiteVisit, a.gamerecomm, b.userLevel From LosaWeb.DBO.userInfoDB a join userGameDB b on a.userID = b.userID where a.userID = @userID GO /****** 개체: StoredProcedure [dbo].[web_quest_board_get_title] 스크립트 날짜: 05/04/2012 14:08:37 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[web_quest_board_get_title] ( @questIDX varchar(100) ) AS DECLARE @sql varchar(300) SET @sql = 'SELECT questIDX, title FROM define_quest WHERE questIDX in (' + @questIDX + ')' EXECUTE (@sql) GO /****** 개체: StoredProcedure [dbo].[web_friend_list] 스크립트 날짜: 05/04/2012 14:07:49 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[web_friend_list] ( @accountIDX int , @pagesize int , @notpage int ) AS SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED DECLARE @sql nvarchar(2500) DECLARE @ParmDefinition nvarchar(500) SET @sql = N'SELECT TOP (@pagesize_in) b.userLevel, c.accountIDX, c.nickName, b.connDate ' SET @sql = @sql + 'FROM userFriendDB a WITH(NOLOCK) INNER JOIN userGameDB b WITH(NOLOCK) ON a.friendAccIDX = b.accountIDX INNER JOIN userMemberDB c WITH(NOLOCK) ON a.friendAccIDX = c.accountIDX ' SET @sql = @sql + 'WHERE a.userAccIDX=@accountIDX_in and a.flag=1 and friendAccIDX not in (' SET @sql = @sql + '209274,322139,209270,209272,209273,1105,1106,209271,380032,1107,209264,209268,1108,209267,209276,281811,209269,2304,485241,380044,591852,711450,505421,380045,382884,380042,380043,361290,1414836,1871572,1871573,1871574,1896968' SET @sql = @sql + ') and a.idx not in (SELECT TOP (@notpage_in) a.idx FROM userFriendDB a WITH(NOLOCK) INNER JOIN userGameDB b WITH(NOLOCK) ON a.friendAccIDX = b.accountIDX INNER JOIN userMemberDB c WITH(NOLOCK) ON a.friendAccIDX = c.accountIDX WHERE a.userAccIDX=(@accountIDX_in) and a.flag=1 and friendAccIDX not in (' SET @sql = @sql + '209274,322139,209270,209272,209273,1105,1106,209271,380032,1107,209264,209268,1108,209267,209276,281811,209269,2304,485241,380044,591852,711450,505421,380045,382884,380042,380043,361290,1414836,1871572,1871573,1871574,1896968' SET @sql = @sql + ') ORDER BY b.userLevel DESC) ORDER BY b.userLevel DESC' SET @ParmDefinition = N'@pagesize_in int, @accountIDX_in int, @notpage_in int' EXECUTE sp_executesql @sql, @ParmDefinition, @accountIDX_in=@accountIDX, @pagesize_in=@pagesize, @notpage_in=@notpage GO /****** 개체: StoredProcedure [dbo].[web_friend_list_dev] 스크립트 날짜: 05/04/2012 14:07:49 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[web_friend_list_dev] ( @accountIDX varchar(10) , @pagesize varchar(8) , @notpage varchar(8) ) AS DECLARE @sql varchar(1500) SET @sql = 'SELECT TOP ' + @pagesize + ' b.userLevel, d.accountIDX, d.nickName, b.connDate, c.gameServerID, ISNULL(e.class, 0) as ''userRanking'' ' SET @sql = @sql + 'FROM userFriendDB a WITH(NOLOCK) INNER JOIN userGameDB b WITH(NOLOCK) ON a.friendAccIDX = b.accountIDX INNER JOIN userLoginDB c WITH(NOLOCK) ON a.friendAccIDX = c.accountIDX INNER JOIN userMemberDB d WITH(NOLOCK) ON a.friendAccIDX = d.accountIDX LEFT JOIN userRankingDB e WITH(NOLOCK) ON a.friendAccIDX = e.accountIDX ' SET @sql = @sql + 'WHERE a.userAccIDX=' + @accountIDX + ' and a.flag=1 and a.idx not in (SELECT TOP ' + @notpage + ' a.idx FROM userFriendDB a WITH(NOLOCK) INNER JOIN userGameDB b WITH(NOLOCK) ON a.friendAccIDX = b.accountIDX INNER JOIN userLoginDB c WITH(NOLOCK) ON a.friendAccIDX = c.accountIDX INNER JOIN userMemberDB d WITH(NOLOCK) ON a.friendAccIDX = d.accountIDX LEFT JOIN userRankingDB e WITH(NOLOCK) ON a.friendAccIDX = e.accountIDX WHERE a.userAccIDX=' + @accountIDX + ' and a.flag=1 ORDER BY b.userLevel DESC) ' SET @sql = @sql + 'ORDER BY b.userLevel DESC' EXECUTE(@sql) GO /****** 개체: StoredProcedure [dbo].[game_character_rental_history] 스크립트 날짜: 05/04/2012 14:05:51 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[game_character_rental_history] ( @accountIDX int , @friendIDX int , @classType int ) AS INSERT INTO LosaGame_log.DBO.log_class_rental_history (accountIDX, friendIDX, classType, regDate) VALUES (@accountIDX, @friendIDX, @classType, getdate()) GO /****** 개체: StoredProcedure [dbo].[web_quest_define_list] 스크립트 날짜: 05/04/2012 14:08:37 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[web_quest_define_list] AS SELECT questIDX, title, progress, content1, content2, content3, content4 FROM define_quest with(nolock) GO /****** 개체: StoredProcedure [dbo].[web_quest_define_count] 스크립트 날짜: 05/04/2012 14:08:37 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[web_quest_define_count] AS SELECT max(questIDX/10000) FROM define_quest GO /****** 개체: StoredProcedure [dbo].[web_minihome_userinfo_all_award_level] 스크립트 날짜: 05/04/2012 14:08:28 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[web_minihome_userinfo_all_award_level] ( @accountIDX int ) AS SELECT awardLevel, expert FROM userRankingDB_award WITH(NOLOCK) WHERE accountIDX=@accountIDX GO /****** 개체: StoredProcedure [dbo].[game_character_rental_list] 스크립트 날짜: 05/04/2012 14:05:51 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[game_character_rental_list] ( @accountIDX int , @selectDate datetime ) AS SELECT friendIDX, regDate FROM LosaGame_log.DBO.log_class_rental_history WITH(NOLOCK) WHERE friendIDX=@accountIDX and regDate >= @selectDate GO /****** 개체: StoredProcedure [dbo].[web_user_game_get_data] 스크립트 날짜: 05/04/2012 14:08:57 ******/ SET ANSI_NULLS OFF GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[web_user_game_get_data] ( @userID varchar(12) ) As SELECT cnt_win, cnt_tie, cnt_lose, cnt_win_training, cnt_tie_training, cnt_lose_training, cnt_kill, cnt_death, playedTime, userLevel, connDate FROM userGameDB WHERE userID=@userID GO /****** 개체: StoredProcedure [dbo].[web_quest_get_define_data] 스크립트 날짜: 05/04/2012 14:08:38 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[web_quest_get_define_data] ( @questIDX int ) AS SELECT title, progress, content1, content2, content3, content4 FROM define_quest WHERE questIDX=@questIDX GO /****** 개체: StoredProcedure [dbo].[web_ranking_award_detail_count] 스크립트 날짜: 05/04/2012 14:08:38 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[web_ranking_award_detail_count] ( @awardType int ) AS SELECT count(*) FROM userRankingDB_award_top100 WITH(NOLOCK) WHERE awardType=@awardType GO /****** 개체: StoredProcedure [dbo].[web_ranking_award_list] 스크립트 날짜: 05/04/2012 14:08:38 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[web_ranking_award_list] ( @pagesize int , @notpage int , @awardType int ) AS DECLARE @sql nvarchar(1000) DECLARE @ParmDefinition nvarchar(500) SET @sql = N'SELECT TOP (@pagesize_in) a.accountIDX, a.nickName, a.userLevel, a.rank_prev, a.rank_now, a.awardEXP, b.idx, b.guildName, b.guildmark FROM userRankingDB_award_top100 a WITH(NOLOCK) LEFT JOIN userGuildDB b WITH(NOLOCK) ON a.guildIDX=b.idx ' SET @sql = @sql + 'WHERE a.awardType=@awardType_in and a.idx not in (SELECT TOP (@notpage_in) idx FROM userRankingDB_award_top100 WHERE awardType=@awardType_in ORDER BY rank_now ASC) ORDER BY a.rank_now ASC' SET @ParmDefinition = N'@pagesize_in int, @awardType_in int, @notpage_in int' EXECUTE sp_executesql @sql, @ParmDefinition, @pagesize_in=@pagesize, @awardType_in=@awardType, @notpage_in=@notpage GO /****** 개체: StoredProcedure [dbo].[web_minihome_userinfo_all_userinfo_data] 스크립트 날짜: 05/04/2012 14:08:30 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[web_minihome_userinfo_all_userinfo_data] ( @accountIDX int ) As SELECT visit_count, rec_Index FROM userInfoDB WHERE accountIDX = @accountIDX GO /****** 개체: StoredProcedure [dbo].[game_guild_change_guildname] 스크립트 날짜: 05/04/2012 14:06:13 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[game_guild_change_guildname] ( @guildIDX int , @guildName varchar(20) ) AS DECLARE @cnt int, @errcount int SET @cnt = 0 SET @errcount = 0 SET @cnt = (SELECT count(*) FROM userGuildDB WHERE guildName=@guildName) if (@cnt > 0) BEGIN SET @errcount = 2 SELECT @errcount AS 'returnVal' RETURN END if (@errcount = 0) BEGIN SELECT 1 AS 'returnVal' UPDATE userGuildDB SET guildName=@guildName WHERE idx=@guildIDX END GO /****** 개체: StoredProcedure [dbo].[web_ranking_award_top3_count] 스크립트 날짜: 05/04/2012 14:08:38 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[web_ranking_award_top3_count] AS DECLARE @nDate datetime, @dateIDX char(8) SET @nDate = Left(getdate(),10) SET @dateIDX = convert(char(8),@nDate,112) IF (not exists(SELECT TOP 1 * FROM userRankingDB_award_top3 WITH(NOLOCK) WHERE dateIDX=@dateIDX)) BEGIN SET @dateIDX = convert(char(8),Left(getdate()-1,10),112) END SELECT count(*) FROM userRankingDB_award_top3 WITH(NOLOCK) WHERE dateIDX = @dateIDX GO /****** 개체: StoredProcedure [dbo].[z_nouse_game_get_ladderpoint] 스크립트 날짜: 05/04/2012 14:09:01 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[z_nouse_game_get_ladderpoint] ( @accountIDX int ) AS SELECT ladderpoint FROM userGameDB WHERE accountIDX=@accountIDX GO /****** 개체: StoredProcedure [dbo].[web_ranking_class_detail_count] 스크립트 날짜: 05/04/2012 14:08:39 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[web_ranking_class_detail_count] ( @classType int ) AS SELECT count(*) FROM userRankingDB_class_top100 WITH(NOLOCK) WHERE classType=@classType GO /****** 개체: StoredProcedure [dbo].[web_get_cash] 스크립트 날짜: 05/04/2012 14:07:52 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[web_get_cash] ( @accountIDX int ) As SELECT amtCash FROM userCashDB WHERE accountIDX = @accountIDX GO /****** 개체: StoredProcedure [dbo].[web_user_login_outin] 스크립트 날짜: 05/04/2012 14:08:59 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[web_user_login_outin] ( @userID varchar(12) ) As SELECT gameServerID FROM userLoginDB WHERE userID = @userID GO /****** 개체: StoredProcedure [dbo].[web_ranking_class_top3_count] 스크립트 날짜: 05/04/2012 14:08:39 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[web_ranking_class_top3_count] AS DECLARE @nDate datetime, @dateIDX char(8) SET @nDate = Left(getdate(),10) SET @dateIDX = convert(char(8),@nDate,112) IF (not exists(SELECT TOP 1 * FROM userRankingDB_class_top3 WITH(NOLOCK) WHERE dateIDX=@dateIDX)) BEGIN SET @dateIDX = convert(char(8),Left(getdate()-1,10),112) END SELECT count(*) FROM userRankingDB_class_top3 WITH(NOLOCK) WHERE dateIDX = @dateIDX GO /****** 개체: StoredProcedure [dbo].[web_ranking_class_top3_list] 스크립트 날짜: 05/04/2012 14:08:39 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[web_ranking_class_top3_list] AS SELECT classType, accountIDX, nickname, userLevel FROM userRankingDB_class_top100 WITH(NOLOCK) WHERE rank_now in (1,2,3) ORDER BY classType DESC, rank_now ASC GO /****** 개체: StoredProcedure [dbo].[game_guild_join_self_delete] 스크립트 날짜: 05/04/2012 14:06:16 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[game_guild_join_self_delete] ( @accountIDX int , @guildIDX int ) AS DELETE FROM userGuildInfoDB WHERE guildIDX=@guildIDX and accountIDX=@accountIDX and guildJoinType=0 GO /****** 개체: StoredProcedure [dbo].[web_ranking_class_list] 스크립트 날짜: 05/04/2012 14:08:39 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[web_ranking_class_list] ( @pagesize int , @notpage int , @classType int ) AS DECLARE @sql nvarchar(1000) DECLARE @ParmDefinition nvarchar(500) SET @sql = N'SELECT TOP (@pagesize_in) a.accountIDX, a.nickName, a.userLevel, a.rank_prev, a.rank_now, a.classLevel, a.classEXP, b.idx, b.guildName, b.guildmark FROM userRankingDB_class_top100 a WITH(NOLOCK) LEFT JOIN userGuildDB b WITH(NOLOCK) ON a.guildIDX=b.idx ' SET @sql = @sql + 'WHERE a.classType=@classType_in and a.idx not in (SELECT TOP (@notpage_in) idx FROM userRankingDB_class_top100 WITH(NOLOCK) WHERE classType=@classType_in ORDER BY rank_now ASC) ORDER BY a.rank_now ASC' SET @ParmDefinition = N'@pagesize_in int, @classType_in int, @notpage_in int' EXECUTE sp_executesql @sql, @ParmDefinition, @pagesize_in=@pagesize, @classType_in=@classType, @notpage_in=@notpage GO /****** 개체: StoredProcedure [dbo].[game_guild_change_master] 스크립트 날짜: 05/04/2012 14:06:13 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[game_guild_change_master] ( @masterIDX int , @changeIDX int , @guildIDX int ) AS SET XACT_ABORT ON BEGIN TRAN UPDATE userGuildInfoDB SET guildPosition='길드장', msg=4 WHERE guildIDX=@guildIDX and accountIDX=@changeIDX UPDATE userGuildInfoDB SET guildPosition='길드원' WHERE guildIDX=@guildIDX and accountIDX=@masterIDX COMMIT TRAN GO /****** 개체: StoredProcedure [dbo].[web_user_game_get_expert] 스크립트 날짜: 05/04/2012 14:08:57 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[web_user_game_get_expert] ( @userID varchar(12) ) As SELECT CONVERT(int, ISNULL(SUM(class1_expert), 0) + ISNULL(SUM(class2_expert), 0) + ISNULL(SUM(class3_expert), 0) + ISNULL(SUM(class4_expert), 0) + ISNULL(SUM(class5_expert), 0) + ISNULL(SUM(class6_expert), 0) + ISNULL(SUM(class7_expert), 0) + ISNULL(SUM(class8_expert), 0) + ISNULL(SUM(class9_expert), 0) + ISNULL(SUM(class10_expert), 0)) FROM userClassDB WHERE accountIDX = (SELECT accountIDX FROM userGameDB WHERE userID=@userID) GO /****** 개체: StoredProcedure [dbo].[web_ranking_classgroup_count] 스크립트 날짜: 05/04/2012 14:08:39 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[web_ranking_classgroup_count] AS -- SELECT count(*) FROM userRankingDB_classgroup with(nolock) SELECT rowcnt FROM sysindexes WHERE id=373576369 and indid < 2 GO /****** 개체: StoredProcedure [dbo].[web_get_classHanName] 스크립트 날짜: 05/04/2012 14:07:52 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[web_get_classHanName] ( @classType int ) AS SELECT classHanName FROM define_class WHERE idx=@classType GO /****** 개체: StoredProcedure [dbo].[web_ranking_classgroup_list] 스크립트 날짜: 05/04/2012 14:08:40 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[web_ranking_classgroup_list] ( @pagesize int , @notpage int ) AS DECLARE @sql nvarchar(2000) DECLARE @ParmDefinition nvarchar(500) SET @sql = N'SELECT TOP (@pagesize_in) b.accountIDX, b.nickName, a.userLevel, a.ranking_2day, a.ranking_1day, a.expert, isnull(d.idx,'''') as ''idx'', isnull(d.guildName,'''') as ''guildName'', isnull(d.guildmark, '''') as ''guildmark'' FROM userRankingDB_classgroup a WITH(NOLOCK) JOIN userMemberDB b WITH(NOLOCK) ON a.accountIDX = b.accountIDX LEFT JOIN (SELECT accountIDX, max(guildIDX) AS ''guildIDX'' FROM userGuildInfoDB WITH(NOLOCK) WHERE guildJoinType=1 GROUP BY accountIDX) c ON a.accountIDX = c.accountIDX LEFT JOIN userGuildDB d ON c.guildIDX = d.idx ' SET @sql = @sql + 'WHERE a.ranking_1day > 0 and a.accountIDX not in (SELECT TOP (@notpage_in) accountIDX FROM userRankingDB_classgroup WHERE ranking_1day > 0 ORDER BY ranking_1day ASC) ORDER BY ranking_1day ASC' SET @ParmDefinition = N'@pagesize_in int, @notpage_in int' EXECUTE sp_executesql @sql, @ParmDefinition, @pagesize_in=@pagesize, @notpage_in=@notpage GO /****** 개체: StoredProcedure [dbo].[game_guild_join_init] 스크립트 날짜: 05/04/2012 14:06:16 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[game_guild_join_init] ( @guildIDX int ) AS DELETE FROM userGuildInfoDB WHERE guildIDX=@guildIDX and guildJoinType=0 GO /****** 개체: StoredProcedure [dbo].[game_log_class_buytime] 스크립트 날짜: 05/04/2012 14:06:55 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[game_log_class_buytime] ( @classType int , @buyTime bigint ) AS INSERT INTO LosaGame_log.DBO.log_class_buytime (classType, buyTime, regDate) VALUES (@classType, @buyTime, getdate()) GO /****** 개체: StoredProcedure [dbo].[game_region_compen_delete] 스크립트 날짜: 05/04/2012 14:07:19 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[game_region_compen_delete] ( @idx int , @accountIDX int , @nickName varchar(20) , @peso int ) AS INSERT INTO Log_Data.dbo.log_data_peso (accountIDX, nickName, peso, logType, regDate) VALUES (@accountIDX, @nickName, @peso, 9, getdate()) DELETE FROM userRegionDB_compen WHERE idx=@idx GO /****** 개체: StoredProcedure [dbo].[game_log_level_playtime] 스크립트 날짜: 05/04/2012 14:06:55 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[game_log_level_playtime] ( @userLevel int , @playTime bigint ) AS INSERT INTO LosaGame_log.DBO.log_level_playtime (userLevel, playTime, regDate) VALUES (@userLevel, @playTime, getdate()) GO /****** 개체: StoredProcedure [dbo].[web_ranking_medal_list] 스크립트 날짜: 05/04/2012 14:08:40 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[web_ranking_medal_list] ( @pagesize varchar(8) , @notpage varchar(8) ) AS DECLARE @sql varchar(1000) SET @sql = 'SELECT TOP ' + @pagesize + ' b.accountIDX, b.nickName, a.medalLevel, a.expert, a.ranking_prev, a.ranking_now, isnull(d.idx,'''') as ''idx'', isnull(d.guildName,'''') as ''guildName'', isnull(d.guildmark, '''') as ''guildmark'', e.userLevel FROM userRankingDB_medal a JOIN userMemberDB b ON a.accountIDX = b.accountIDX LEFT JOIN (SELECT accountIDX, max(guildIDX) AS ''guildIDX'' FROM userGuildInfoDB WHERE guildJoinType=1 GROUP BY accountIDX) c ON a.accountIDX = c.accountIDX LEFT JOIN userGuildDB d ON c.guildIDX = d.idx JOIN userGameDB e ON a.accountIDX = e.accountIDX ' SET @sql = @sql + 'WHERE a.ranking_now > 0 and a.accountIDX not in (SELECT TOP ' + @notpage + ' accountIDX FROM userRankingDB_medal WHERE ranking_now > 0 ORDER BY ranking_now ASC) ORDER BY ranking_now ASC' EXECUTE(@sql) GO /****** 개체: StoredProcedure [dbo].[game_region_player_count] 스크립트 날짜: 05/04/2012 14:07:20 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[game_region_player_count] ( @regionType int ) AS DECLARE @limitRenpoint int SET @limitRenpoint = DBO.DEFINE_REGION_LIMIT_RENSPOINT() SELECT count(*) FROM userGameDB WHERE regionType=@regionType and renspoint > @limitRenpoint GO /****** 개체: StoredProcedure [dbo].[game_game_renpoint_save] 스크립트 날짜: 05/04/2012 14:06:10 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[game_game_renpoint_save] ( @accountIDX int , @rencpoint int , @renspoint int ) As UPDATE userGameDB SET rencpoint = @rencpoint , renspoint = @renspoint WHERE accountIDX = @accountIDX GO /****** 개체: StoredProcedure [dbo].[web_get_ranking_diff] 스크립트 날짜: 05/04/2012 14:07:55 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[web_get_ranking_diff] ( @accountIDX int ) AS SELECT ranking_2day - ranking_1day AS 'diff' FROM userRankingDB_classgroup WITH(NOLOCK) WHERE accountIDX=@accountIDX GO /****** 개체: StoredProcedure [dbo].[game_get_limitType] 스크립트 날짜: 05/04/2012 14:06:12 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[game_get_limitType] ( @accountIDX int ) As SELECT limitType, limitDate FROM userMemberDB WHERE accountIDX=@accountIDX GO /****** 개체: StoredProcedure [dbo].[game_region_init_renspoint] 스크립트 날짜: 05/04/2012 14:07:20 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[game_region_init_renspoint] AS UPDATE userGameDB SET renspoint=0 WHERE renspoint > 0 GO /****** 개체: StoredProcedure [dbo].[web_ranking_myinfo_class_ranking_data] 스크립트 날짜: 05/04/2012 14:08:42 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[web_ranking_myinfo_class_ranking_data] ( @accountIDX int ) AS SELECT class1_now, class2_now, class3_now, class4_now, class5_now, class6_now, class7_now, class8_now, class9_now, class10_now, class11_now, class12_now, class13_now, class14_now, class15_now , class16_now , class17_now , class18_now, class19_now, class20_now, isNull(class21_now, 0) as 'class21_now', isNull(class22_now, 0) as 'class22_now', isNull(class23_now, 0) as 'class23_now', isNull(class24_now, 0) as 'class24_now', isNull(class25_now, 0) as 'class25_now', isNull(class26_now, 0) as 'class26_now', isNull(class27_now, 0) as 'class27_now', isNull(class28_now, 0) as 'class28_now', isNull(class29_now, 0) as 'class29_now', isNull(class30_now, 0) as 'class30_now', isNull(class31_now, 0) as 'class31_now', isNull(class32_now, 0) as 'class32_now', isNull(class33_now, 0) as 'class33_now', isNull(class34_now, 0) as 'class34_now', isNull(class35_now, 0) as 'class35_now', isNull(class36_now, 0) as 'class36_now', isNull(class37_now, 0) as 'class37_now', isNull(class38_now, 0) as 'class38_now', isNull(class39_now, 0) as 'class39_now', isNull(class40_now, 0) as 'class40_now' FROM userRankingDB_classA a LEFT JOIN userRankingDB_classB b ON a.accountIDX=b.accountIDX WHERE a.accountIDX=@accountIDX GO /****** 개체: StoredProcedure [dbo].[z_nouse_game_region_season_end] 스크립트 날짜: 05/04/2012 14:09:04 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[z_nouse_game_region_season_end] AS BEGIN TRAN DECLARE @inregionpoint int, @inmembercount int, @regionType int, @totalpoint int, @season int DECLARE @masterIDX1 int, @masterIDX2 int DECLARE @const int, @limitRenpoint int, @limitPrepoint int SET @regionType = 1 SET @const = DBO.DEFINE_REGION_LIMIT_CONST() SET @limitRenpoint = DBO.DEFINE_REGION_LIMIT_RENSPOINT() SET @limitPrepoint = DBO.DEFINE_REGION_LIMIT_SE_RENSPOINT() SET @season = isNull((SELECT max(season) FROM userRegionDB), 0) + 1 While (@regionType <= 2) BEGIN SET @inregionpoint = (SELECT SUM(renspoint) FROM userGameDB WHERE regionType=@regionType) SET @totalpoint = (SELECT SUM(renspoint) FROM userGameDB WHERE regionType in (1,2)) SET @inmembercount = (SELECT count(*) FROM userGameDB WHERE regionType=@regionType and renspoint > @limitRenpoint) If (@totalpoint > 0) BEGIN INSERT INTO userPresentDB (sendIDX, receiveIDX, presentType, packet, regDate) SELECT 141 AS 'sendIDX', accountIDX, 4 AS 'presentType', (convert(int, (convert(float, @const) * renspoint * @inmembercount) / convert(float, @totalpoint))) AS 'packet', getdate() AS 'regDate' FROM userGameDB WHERE regionType=@regionType and renspoint > @limitPrepoint -- SELECT 141 AS 'sendIDX', accountIDX, 4 AS 'presentType', (convert(float, @inregionpoint) / @totalpoint) * 10000 * (convert(float, renspoint) / (convert(float, @inregionpoint)/@inmembercount)) AS 'packet', getdate() AS 'regDate' FROM userGameDB WHERE regionType=@regionType and renspoint > @limitPrepoint END SET @regionType = @regionType + 1 INSERT INTO userRegionDB (point, membercount, regionType, season, regDate) VALUES (@inregionpoint, @inmembercount, @regionType, @season, getdate()) END COMMIT TRAN GO /****** 개체: StoredProcedure [dbo].[web_ranking_myinfo_classgroup_data] 스크립트 날짜: 05/04/2012 14:08:42 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[web_ranking_myinfo_classgroup_data] ( @accountIDX int ) AS SELECT ranking_8day, ranking_7day, ranking_6day, ranking_5day, ranking_4day, ranking_3day, ranking_2day, ranking_1day FROM userRankingDB_classgroup WHERE accountIDX=@accountIDX GO /****** 개체: StoredProcedure [dbo].[game_quest_board_add] 스크립트 날짜: 05/04/2012 14:07:07 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[game_quest_board_add] ( @accountIDX int , @nickname varchar(20) , @gameLevel int , @questIDX int , @userIP varchar(16) ) AS INSERT INTO LosaWeb.DBO.web_quest_board (questIDX, accountIDX, nickname, gameLevel, comtcount, userIP, regDate) VALUES (@questIDX, @accountIDX, @nickname, @gameLevel, 0, @userIP, getdate()) GO /****** 개체: StoredProcedure [dbo].[web_minihome_ui_award_rank_data] 스크립트 날짜: 05/04/2012 14:08:26 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[web_minihome_ui_award_rank_data] ( @userID varchar(12) ) As SELECT award1, award2, award3, award4, award5, award6, award7, award8, award9, award10, award11, award12, award13, award14, award15, award16, award17, award18, award19, award20 FROM userRankingDB_award WHERE userID=@userID GO /****** 개체: StoredProcedure [dbo].[game_server_connection_count_save] 스크립트 날짜: 05/04/2012 14:07:22 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[game_server_connection_count_save] ( @idx int , @count int ) As UPDATE define_game_server SET connNumber = @count WHERE idx = @idx GO /****** 개체: StoredProcedure [dbo].[web_ranking_myinfo_classgroup_uplevel_count] 스크립트 날짜: 05/04/2012 14:08:42 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[web_ranking_myinfo_classgroup_uplevel_count] ( @accountIDX int ) AS SELECT count(*) FROM userRankingDB_classgroup WHERE ranking_1day < (SELECT ranking_1day FROM userRankingDB_classgroup WHERE accountidx=@accountIDX) GO /****** 개체: StoredProcedure [dbo].[game_server_get_list] 스크립트 날짜: 05/04/2012 14:07:22 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[game_server_get_list] As SELECT idx, serverIP, serverPort FROM define_game_server ORDER BY regDate ASC GO /****** 개체: StoredProcedure [dbo].[game_present_delete_all] 스크립트 날짜: 05/04/2012 14:07:01 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[game_present_delete_all] ( @accountIDX int ) AS DELETE FROM userPresentDB WHERE receiveIDX=@accountIDX GO /****** 개체: StoredProcedure [dbo].[game_present_delete] 스크립트 날짜: 05/04/2012 14:07:01 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[game_present_delete] ( @idx int ) AS DELETE FROM userPresentDB WHERE idx=@idx GO /****** 개체: StoredProcedure [dbo].[web_ranking_myinfo_all_game_data] 스크립트 날짜: 05/04/2012 14:08:41 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[web_ranking_myinfo_all_game_data] ( @accountIDX int ) As SELECT a.userLevel , b.type1_win AS 'battle_win' , b.type1_lose AS 'battle_lose' , b.type1_kill AS 'battle_kill' , b.type1_death AS 'battle_death' FROM userGameDB a INNER JOIN userRecordBattleDB b ON a.accountIDX = b.accountIDX WHERE a.accountIDX=@accountIDX GO /****** 개체: StoredProcedure [dbo].[web_minihome_userinfo_all_game_data] 스크립트 날짜: 05/04/2012 14:08:29 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[web_minihome_userinfo_all_game_data] ( @accountIDX int ) As SELECT a.playTime , c.type1_win AS 'battle_win' , c.type1_lose AS 'battle_lose' , c.type1_kill AS 'battle_kill' , c.type1_death AS 'battle_death' , a.userLevel, a.connDate, b.gameServerID FROM userGameDB a WITH(NOLOCK) INNER JOIN userLoginDB b WITH(NOLOCK) ON a.accountIDX = b.accountIDX INNER JOIN userRecordBattleDB c WITH(NOLOCK) ON a.accountIDX = c.accountIDX WHERE a.accountIDX=@accountIDX GO /****** 개체: StoredProcedure [dbo].[web_minihome_userinfo_training_game_data] 스크립트 날짜: 05/04/2012 14:08:33 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[web_minihome_userinfo_training_game_data] ( @accountIDX int ) As SELECT type1_win AS 'win' , type1_lose AS 'lose' , type1_kill AS 'kill' , type1_death AS 'death' FROM userRecordBattleDB WHERE accountIDX=@accountIDX GO /****** 개체: StoredProcedure [dbo].[web_minihome_userinfo_ladder_data] 스크립트 날짜: 05/04/2012 14:08:32 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[web_minihome_userinfo_ladder_data] ( @accountIDX int ) AS SELECT a.type3_win, a.type3_lose, a.type3_kill, a.type3_death, a.type4_win, a.type4_lose, a.type4_kill, a.type4_death, b.daily, b.dailyB, b.title FROM userRecordBattleDB a LEFT JOIN userRankingDB_hero b ON a.accountIDX=b.accountIDX WHERE a.accountIDX=@accountIDX GO /****** 개체: StoredProcedure [dbo].[web_minihome_userinfo_faction_game_data] 스크립트 날짜: 05/04/2012 14:08:32 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[web_minihome_userinfo_faction_game_data] ( @accountIDX int ) AS SELECT type2_win AS 'win' , type2_lose AS 'lose' , type2_kill AS 'kill' , type2_death AS 'death' FROM userRecordBattleDB WHERE accountIDX=@accountIDX GO /****** 개체: StoredProcedure [dbo].[web_minihome_userinfo_battle_record_data] 스크립트 날짜: 05/04/2012 14:08:31 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[web_minihome_userinfo_battle_record_data] ( @accountIDX int ) AS SELECT a.userLevel, b.type1_kill, b.type1_death, b.type2_kill, b.type2_death, b.type3_kill, b.type3_death, b.type4_kill, b.type4_death FROM userGameDB a JOIN userRecordBattleDB b ON a.accountIDX=b.accountIDX WHERE a.accountIDX=@accountIDX GO /****** 개체: StoredProcedure [dbo].[web_member_add_naver] 스크립트 날짜: 05/04/2012 14:08:16 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[web_member_add_naver] ( @userID varchar(12) , @nickName varchar(12) , @EMail varchar(50) , @mailling int , @userType int , @joinType int , @gender int , @userIP varchar(15) , @naverIDX int , @naverID varchar(20) , @cpType int , @userName varchar(10) , @userBirthday varchar(6) , @userEnCode varchar(64) , @userNumber int , @returnValue int , @returnVal int output ) As SET XACT_ABORT ON BEGIN TRAN DECLARE @accountIDX int -- 게임 관련 기본 데이터 저장 INSERT INTO userMemberDB (userID, nickName, userPWD, EMail, mailling, userType, joinType, eventType, cpType, limitType, limitDate, regDate) VALUES (@userID, @nickName, '', @EMail, @mailling, @userType, @joinType, 0, @cpType, 0, '1999-01-01', getdate()) SET @accountIDX = (SELECT accountIDX FROM userMemberDB WHERE userID=@userID) INSERT INTO userCashDB (accountIDX, amtCash, amtBonus, amtLimit, amtSum, chgDate, regDate) VALUES (@accountIDX, 1000, 1000, 99900, 0, getdate(), getdate()) INSERT INTO userInfoDB (accountIDX, visit_count, rec_index, rec_inc, rec_dec, checkDate, cnnDate, userIP, regDate) VALUES (@accountIDX, 0, 0, 0, 0, getdate()-1, '2000-01-01', @userIP, getdate()) INSERT INTO userGameDB (accountIDX, userState, gameMoney, playTime, conn_count, userLevel, userEXP, rencpoint, renspoint, regionType, refillData, connDate,regDate) VALUES (@accountIDX, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, '2000-01-01', getdate()) INSERT INTO userRecordBattleDB (accountIDX, type1_win, type1_lose, type1_kill, type1_death, type2_win, type2_lose, type2_kill, type2_death, type3_win, type3_lose, type3_kill, type3_death, type4_win, type4_lose, type4_kill, type4_death, regDate) VALUES (@accountIDX, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, getdate()) INSERT INTO userLoginDB (accountIDX, encodeKey, gameServerID, connDate) VALUES (@accountIDX, '111111111111111', 0, getdate()) -- 채널링 데이터 INSERT INTO userCooperationDB (accountIDX, userID, cpIDX, cpID, cpType, note, regDate) VALUES (@accountIDX, @userID, 0, @naverID, @cpType, @naverIDX, getdate()) INSERT INTO userNameDB (accountIDX, userName, userBirthday, userEnCode, userNumber, userGender, returnValue, userIP, regDate) VALUES (@accountIDX, @userName, @userBirthday, @userEnCode, @userNumber, @gender, @returnValue, @userIP, getdate()) SET @returnVal = @@error if (@@error = 0) Commit Tran else Rollback Tran INSERT INTO LosaWeb.DBO.web_user_avatar (accountIDX,NGR010,NFS020,NHD030,PHD040,NEY050,PEY060,NMT070,PMT080,NEB090,PEB100,NHR110,PHR120,NBS130,NBD140,PBD150,NUD160,PUD170,NFT180,PFT190,NPT200,PPT210,NST220,PST230,NJK240,PJK250,PAS260,gender,regDate) VALUES (@accountIDX, 1, 0, 1, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, @gender, getdate()) INSERT INTO LosaWeb.DBO.web_user_minihome (accountIDX, today_visit_count, total_visit_count, write_board_count, write_comt_count, regDate) VALUES (@accountIDX,0, 0, 0, 0, getdate()) GO /****** 개체: StoredProcedure [dbo].[web_member_add_mgame] 스크립트 날짜: 05/04/2012 14:08:15 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[web_member_add_mgame] ( @userID varchar(12) , @nickName varchar(12) , @EMail varchar(50) , @mailling int , @userType int , @joinType int , @gender int , @userIP varchar(15) , @mgameIDX int , @mgameID varchar(20) , @cpType int , @userName varchar(10) , @userBirthday varchar(6) , @userNumber int , @returnValue int , @zipcode varchar(8) , @address varchar(150) , @mobile varchar(16) , @returnVal int output ) As SET XACT_ABORT ON BEGIN TRAN DECLARE @accountIDX int -- 게임 관련 기본 데이터 저장 INSERT INTO userMemberDB (userID, nickName, userPWD, EMail, mailling, userType, joinType, eventType, cpType, limitType, limitDate, regDate) VALUES (@userID, @nickName, '', @EMail, @mailling, @userType, @joinType, 0, @cpType, 0, '1999-01-01', getdate()) SET @accountIDX = (SELECT accountIDX FROM userMemberDB WHERE userID=@userID) INSERT INTO userCashDB (accountIDX, amtCash, amtBonus, amtLimit, amtSum, chgDate, regDate) VALUES (@accountIDX, 1000, 1000, 99900, 0, getdate(), getdate()) INSERT INTO userInfoDB (accountIDX, visit_count, rec_index, rec_inc, rec_dec, checkDate, cnnDate, userIP, regDate) VALUES (@accountIDX, 0, 0, 0, 0, getdate()-1, '2000-01-01', @userIP, getdate()) INSERT INTO userGameDB (accountIDX, userState, gameMoney, playTime, conn_count, userLevel, userEXP, rencpoint, renspoint, regionType, refillData, connDate,regDate) VALUES (@accountIDX, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, '2000-01-01', getdate()) INSERT INTO userRecordBattleDB (accountIDX, type1_win, type1_lose, type1_kill, type1_death, type2_win, type2_lose, type2_kill, type2_death, type3_win, type3_lose, type3_kill, type3_death, type4_win, type4_lose, type4_kill, type4_death, regDate) VALUES (@accountIDX, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, getdate()) INSERT INTO userLoginDB (accountIDX, encodeKey, gameServerID, connDate) VALUES (@accountIDX, '111111111111111', 0, getdate()) -- 채널링 데이터 INSERT INTO userCooperationDB (accountIDX, userID, cpIDX, cpID, cpType, regDate) VALUES (@accountIDX, @userID, @mgameIDX, @mgameID, @cpType, getdate()) INSERT INTO userNameDB (accountIDX, userName, userBirthday, userEnCode, userNumber, userGender, returnValue, userIP, regDate) VALUES (@accountIDX, @userName, @userBirthday, 'B82D00B33E1CB0084A8D43B52E13D579C6B2DE00', @userNumber, @gender, @returnValue, @userIP, getdate()) INSERT INTO userInfoBDB (accountIDX, tel, mobile, zipcode, address1, address2, regDate) VALUES (@accountIDX, '', @mobile, @zipcode, @address, '', getdate()) INSERT INTO LosaGame_log.DBO.log_mgame_cash_event (accountIDX, eventType, cash, flag, regDate) VALUES (@accountIDX, 1, 0, '0', getdate()) SET @returnVal = @@error if (@@error = 0) Commit Tran else Rollback Tran INSERT INTO LosaWeb.DBO.web_user_avatar (accountIDX,NGR010,NFS020,NHD030,PHD040,NEY050,PEY060,NMT070,PMT080,NEB090,PEB100,NHR110,PHR120,NBS130,NBD140,PBD150,NUD160,PUD170,NFT180,PFT190,NPT200,PPT210,NST220,PST230,NJK240,PJK250,PAS260,gender,regDate) VALUES (@accountIDX, 1, 0, 1, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, @gender, getdate()) INSERT INTO LosaWeb.DBO.web_user_minihome (accountIDX, today_visit_count, total_visit_count, write_board_count, write_comt_count, regDate) VALUES (@accountIDX,0, 0, 0, 0, getdate()) GO /****** 개체: StoredProcedure [dbo].[web_minihome_userinfo_battle_game_data] 스크립트 날짜: 05/04/2012 14:08:30 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[web_minihome_userinfo_battle_game_data] ( @accountIDX int ) As SELECT type1_win AS 'win' , type1_lose AS 'lose' , type1_kill AS 'kill' , type1_death AS 'death' FROM userRecordBattleDB WHERE accountIDX=@accountIDX GO /****** 개체: StoredProcedure [dbo].[web_member_add_daum] 스크립트 날짜: 05/04/2012 14:08:14 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[web_member_add_daum] ( @userID varchar(12) , @nickName varchar(12) , @EMail varchar(50) , @mailling int , @userType int , @joinType int , @gender int , @userIP varchar(15) , @daumUniqID varchar(20) , @daumID varchar(20) , @cpType int , @userName varchar(10) , @userBirthday char(6) , @userJumin1 char(12) , @userJumin2 char(14) , @userEnCode varchar(64) , @userNumber tinyint , @returnValue int , @realType int , @tel varchar(16) , @mobile varchar(16) , @zipcode varchar(8) , @address1 varchar(150) , @address2 varchar(50) , @returnVal int output ) AS SET XACT_ABORT ON BEGIN TRAN DECLARE @accountIDX int -- 게임 관련 기본 데이터 저장 INSERT INTO userMemberDB (userID, nickName, userPWD, EMail, mailling, userType, joinType, eventType, cpType, limitType, limitDate, regDate) VALUES (@userID, @nickName, '', @EMail, @mailling, @userType, @joinType, 0, @cpType, 0, '1999-01-01', getdate()) SET @accountIDX = (SELECT accountIDX FROM userMemberDB WHERE userID=@userID) INSERT INTO userCashDB (accountIDX, amtCash, amtBonus, amtLimit, amtSum, chgDate, regDate) VALUES (@accountIDX, 1000, 1000, 99900, 0, getdate(), getdate()) INSERT INTO userInfoDB (accountIDX, visit_count, rec_index, rec_inc, rec_dec, checkDate, cnnDate, userIP, regDate) VALUES (@accountIDX, 0, 0, 0, 0, getdate()-1, '2000-01-01', @userIP, getdate()) INSERT INTO userGameDB (accountIDX, userState, gameMoney, playTime, conn_count, userLevel, userEXP, rencpoint, renspoint, relateLevel, regionType, refillData, connDate, regDate) VALUES (@accountIDX, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, '2000-01-01', getdate()) INSERT INTO userRecordBattleDB (accountIDX, type1_win, type1_lose, type1_kill, type1_death, type2_win, type2_lose, type2_kill, type2_death, type3_win, type3_lose, type3_kill, type3_death, type4_win, type4_lose, type4_kill, type4_death, regDate) VALUES (@accountIDX, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, getdate()) INSERT INTO userLoginDB (accountIDX, encodeKey, gameServerID, connDate) VALUES (@accountIDX, '111111111111111', 0, getdate()) -- 채널링 데이터 INSERT INTO userCooperationDB (accountIDX, userID, cpIDX, cpID, cpType, note, regDate) VALUES (@accountIDX, @userID, '', @daumID, @cpType, @daumUniqID, getdate()) If (@joinType >= 5) BEGIN INSERT INTO userNameDB (accountIDX, userName, userBirthday, userJumin1, userJumin2, userEnCode, userNumber, userGender, returnValue, userIP, realType, regDate) VALUES (@accountIDX, @userName, @userBirthday, @userJumin1, @userJumin2, @userEnCode, @userNumber, @gender, @returnValue, @userIP, @realType, getdate()) END If (@joinType = 10) BEGIN INSERT INTO userInfoBDB (accountIDX, tel, mobile, zipcode, address1, address2, regDate) VALUES (@accountIDX, @tel, @mobile, @zipcode, @address1, @address2, getdate()) END SET @returnVal = @@error if (@@error = 0) Commit Tran else Rollback Tran INSERT INTO LosaWeb.DBO.web_user_avatar (accountIDX,NGR010,NFS020,NHD030,PHD040,NEY050,PEY060,NMT070,PMT080,NEB090,PEB100,NHR110,PHR120,NBS130,NBD140,PBD150,NUD160,PUD170,NFT180,PFT190,NPT200,PPT210,NST220,PST230,NJK240,PJK250,PAS260,gender,regDate) VALUES (@accountIDX, 1, 0, 1, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, @gender, getdate()) INSERT INTO LosaWeb.DBO.web_user_minihome (accountIDX, today_visit_count, total_visit_count, write_board_count, write_comt_count, regDate) VALUES (@accountIDX,0, 0, 0, 0, getdate()) GO /****** 개체: StoredProcedure [dbo].[web_member_add_buddybuddy] 스크립트 날짜: 05/04/2012 14:08:12 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[web_member_add_buddybuddy] ( @userID varchar(12) , @nickName varchar(12) , @EMail varchar(50) , @mailling int , @userType int , @joinType int , @gender int , @userIP varchar(15) , @buddyIDX int , @buddyID varchar(20) , @cpType int , @userName varchar(10) , @userBirthday varchar(6) , @userNumber int , @returnValue int , @note varchar(20) , @returnVal int output ) As SET XACT_ABORT ON BEGIN TRAN DECLARE @accountIDX int -- 게임 관련 기본 데이터 저장 INSERT INTO userMemberDB (userID, nickName, userPWD, EMail, mailling, userType, joinType, eventType, cpType, limitType, limitDate, regDate) VALUES (@userID, @nickName, '', @EMail, @mailling, @userType, @joinType, 0, @cpType, 0, '1999-01-01', getdate()) SET @accountIDX = (SELECT accountIDX FROM userMemberDB WHERE userID=@userID) INSERT INTO userCashDB (accountIDX, amtCash, amtBonus, amtLimit, amtSum, chgDate, regDate) VALUES (@accountIDX, 1000, 1000, 99900, 0, getdate(), getdate()) INSERT INTO userInfoDB (accountIDX, visit_count, rec_index, rec_inc, rec_dec, checkDate, cnnDate, userIP, regDate) VALUES (@accountIDX, 0, 0, 0, 0, getdate()-1, '2000-01-01', @userIP, getdate()) INSERT INTO userGameDB (accountIDX, userState, gameMoney, playTime, conn_count, userLevel, userEXP, rencpoint, renspoint, regionType, refillData, connDate,regDate) VALUES (@accountIDX, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, '2000-01-01', getdate()) INSERT INTO userRecordBattleDB (accountIDX, type1_win, type1_lose, type1_kill, type1_death, type2_win, type2_lose, type2_kill, type2_death, type3_win, type3_lose, type3_kill, type3_death, type4_win, type4_lose, type4_kill, type4_death, regDate) VALUES (@accountIDX, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, getdate()) INSERT INTO userLoginDB (accountIDX, encodeKey, gameServerID, connDate) VALUES (@accountIDX, '111111111111111', 0, getdate()) -- 채널링 데이터 INSERT INTO userCooperationDB (accountIDX, userID, cpIDX, cpID, cpType, note, regDate) VALUES (@accountIDX, @userID, @buddyIDX, @buddyID, @cpType, @note, getdate()) INSERT INTO userNameDB (accountIDX, userName, userBirthday, userEnCode, userNumber, userGender, returnValue, userIP, regDate) VALUES (@accountIDX, @userName, @userBirthday, 'B82D00B33E1CB0084A8D43B52E13D579C6B2DE00', @userNumber, @gender, @returnValue, @userIP, getdate()) SET @returnVal = @@error if (@@error = 0) Commit Tran else Rollback Tran INSERT INTO LosaWeb.DBO.web_user_avatar (accountIDX,NGR010,NFS020,NHD030,PHD040,NEY050,PEY060,NMT070,PMT080,NEB090,PEB100,NHR110,PHR120,NBS130,NBD140,PBD150,NUD160,PUD170,NFT180,PFT190,NPT200,PPT210,NST220,PST230,NJK240,PJK250,PAS260,gender,regDate) VALUES (@accountIDX, 1, 0, 1, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, @gender, getdate()) INSERT INTO LosaWeb.DBO.web_user_minihome (accountIDX, today_visit_count, total_visit_count, write_board_count, write_comt_count, regDate) VALUES (@accountIDX,0, 0, 0, 0, getdate()) GO /****** 개체: StoredProcedure [dbo].[web_member_add] 스크립트 날짜: 05/04/2012 14:08:11 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[web_member_add] ( @userID varchar(12) , @nickName varchar(12) , @userPWD varchar(24) , @EMail varchar(50) , @mailling int , @userType int , @joinType int , @gender int , @userIP varchar(15) , @returnVal int output ) As SET XACT_ABORT ON BEGIN TRAN DECLARE @accountIDX int -- 게임 관련 기본 데이터 저장 INSERT INTO userMemberDB (userID, nickName, userPWD, EMail, mailling, userType, joinType, limitType, limitDate, regDate) VALUES (@userID, @nickName, @userPWD, @EMail, @mailling, @userType, @joinType, 0, '1999-01-01', getdate()) SET @accountIDX = (SELECT accountIDX FROM userMemberDB with(nolock) WHERE userID=@userID) INSERT INTO userCashDB (accountIDX, amtCash, amtBonus, amtLimit, amtSum, chgDate, regDate) VALUES (@accountIDX, 1000, 1000, 99900, 0, getdate(), getdate()) INSERT INTO userInfoDB (accountIDX, visit_count, rec_index, rec_inc, rec_dec, checkDate, cnnDate, userIP, regDate) VALUES (@accountIDX, 0, 0, 0, 0, getdate()-1, '2000-01-01', @userIP, getdate()) INSERT INTO userGameDB (accountIDX, userState, gameMoney, playTime, conn_count, userLevel, userEXP, rencpoint, renspoint, relateLevel, regionType, refillData, connDate,regDate) VALUES (@accountIDX, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, '2000-01-01', getdate()) -- userRecordBattleDB 쿼리 다시 만들것. 잊어버릴까봐 임시로 넣어 놓음. INSERT INTO userRecordBattleDB (accountIDX, type1_win, type1_lose, type1_kill, type1_death, type2_win, type2_lose, type2_kill, type2_death, type3_win, type3_lose, type3_kill, type3_death, type4_win, type4_lose, type4_kill, type4_death, regDate) VALUES (@accountIDX, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, getdate()) INSERT INTO userLoginDB (accountIDX, encodeKey, gameServerID, connDate) VALUES (@accountIDX, '111111111111111', 0, getdate()) SET @returnVal = @@error if (@@error = 0) Commit Tran else Rollback Tran INSERT INTO LosaWeb.DBO.web_user_avatar (accountIDX,NGR010,NFS020,NHD030,PHD040,NEY050,PEY060,NMT070,PMT080,NEB090,PEB100,NHR110,PHR120,NBS130,NBD140,PBD150,NUD160,PUD170,NFT180,PFT190,NPT200,PPT210,NST220,PST230,NJK240,PJK250,PAS260,gender,regDate) VALUES (@accountIDX, 1, 0, 1, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, @gender, getdate()) INSERT INTO LosaWeb.DBO.web_user_minihome (accountIDX, today_visit_count, total_visit_count, write_board_count, write_comt_count, regDate) VALUES (@accountIDX,0, 0, 0, 0, getdate()) GO /****** 개체: StoredProcedure [dbo].[game_ranking_hero_topN] 스크립트 날짜: 05/04/2012 14:07:17 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[game_ranking_hero_topN] ( @rank1 int , @rank2 int ) AS SET NOCOUNT ON SELECT a.accountIDX, b.userLevel, c.nickName, a.title, d.type3_win, d.type3_lose, b.regionType, b.userHerocEXP + b.userHerosEXP AS 'userHeroEXP' FROM userRankingDB_hero a WITH(NOLOCK) LEFT JOIN userGameDB b WITH(NOLOCK) ON a.accountIDX = b.accountIDX LEFT JOIN userMemberDB c WITH(NOLOCK) ON a.accountIDX = c.accountIDX LEFT JOIN userRecordBattleDB d WITH(NOLOCK) ON a.accountIDX = d.accountIDX WHERE a.daily >= @rank1 and a.daily <= @rank2 ORDER BY a.daily ASC GO /****** 개체: StoredProcedure [dbo].[game_region_season_end_data_init] 스크립트 날짜: 05/04/2012 14:07:21 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[game_region_season_end_data_init] AS UPDATE userGameDB SET renspoint=0 WHERE renspoint > 0 UPDATE userRecordBattleDB SET type4_win=0 WHERE type4_win > 0 UPDATE userRecordBattleDB SET type4_lose=0 WHERE type4_lose > 0 UPDATE userRecordBattleDB SET type4_kill=0 WHERE type4_kill > 0 UPDATE userRecordBattleDB SET type4_death=0 WHERE type4_death > 0 UPDATE userGameDB SET userHerocEXP = CONVERT(int, userHerocEXP * 0.9) + userHerosEXP, userHerosEXP=-1 WHERE userHerosEXP > 0 GO /****** 개체: StoredProcedure [dbo].[game_record_battle_save] 스크립트 날짜: 05/04/2012 14:07:19 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[game_record_battle_save] ( @accountIDX int , @type1_win int , @type1_lose int , @type1_kill int , @type1_death int , @type2_win int , @type2_lose int , @type2_kill int , @type2_death int , @type3_win int , @type3_lose int , @type3_kill int , @type3_death int , @type4_win int , @type4_lose int , @type4_kill int , @type4_death int ) AS if (not exists(SELECT * FROM userRecordBattleDB WHERE accountIDX=@accountIDX)) BEGIN INSERT INTO userRecordBattleDB (accountIDX, type1_win, type1_lose, type1_kill, type1_death, type2_win, type2_lose, type2_kill, type2_death, type3_win, type3_lose, type3_kill, type3_death, type4_win, type4_lose, type4_kill, type4_death, regDate) VALUES (@accountIDX, @type1_win, @type1_lose, @type1_kill, @type1_death, @type2_win, @type2_lose, @type2_kill, @type2_death, @type3_win, @type3_lose, @type3_kill, @type3_death, @type4_win, @type4_lose, @type4_kill, @type4_death, getdate()) END ELSE BEGIN UPDATE userRecordBattleDB SET type1_win = @type1_win , type1_lose = @type1_lose , type1_kill = @type1_kill , type1_death = @type1_death , type2_win = @type2_win , type2_lose = @type2_lose , type2_kill = @type2_kill , type2_death = @type2_death , type3_win = @type3_win , type3_lose = @type3_lose , type3_kill = @type3_kill , type3_death = @type3_death , type4_win = @type4_win , type4_lose = @type4_lose , type4_kill = @type4_kill , type4_death = @type4_death WHERE accountIDX = @accountIDX END GO /****** 개체: StoredProcedure [dbo].[game_record_battle_get_data] 스크립트 날짜: 05/04/2012 14:07:17 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[game_record_battle_get_data] ( @accountIDX int ) AS SELECT type1_win, type1_lose, type1_kill, type1_death, type2_win, type2_lose, type2_kill, type2_death, type3_win, type3_lose, type3_kill, type3_death, type4_win, type4_lose, type4_kill, type4_death FROM userRecordBattleDB WHERE accountIDX = @accountIDX GO /****** 개체: StoredProcedure [dbo].[web_login_get_battle_level] 스크립트 날짜: 05/04/2012 14:08:04 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[web_login_get_battle_level] ( @accountIDX int ) As SELECT type1_win AS 'battle_win' , type1_lose AS 'battle_lose' , type1_kill AS 'battle_kill' , type1_death AS 'battle_death' FROM userRecordBattleDB WITH(NOLOCK) WHERE accountIDX=@accountIDX GO /****** 개체: StoredProcedure [dbo].[usp_web_member_add_tooniland] 스크립트 날짜: 05/04/2012 14:07:29 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO /*========================================================================== ' 작 성 : 이수진 [2011-10-25] ' 용 도 : 채널링_투니랜드 회원가입 ' RETURN : 1 : 성공 -1 ~ -10 : 실패 ==========================================================================*/ --DROP PROC usp_web_member_add_tooniland --GO CREATE PROC [dbo].[usp_web_member_add_tooniland] @sUserId varchar(12), -- 사용자아이디 @sNickName varchar(12), -- 사용자닉네임 @sEMail varchar(50), -- 이메일주소 @nMailling int = '', -- 메일수신동의여부 @nUserType int, -- 가입자등급(100:정회원) @nJoinType int, -- 회원확인 @nGender int, -- 성별(M:남자, F:여자 ) @sUserIP varchar(15), -- 사용자IP @nTooniIDX int, -- 투니랜드IDX @sTooniId varchar(20), -- 투니랜드ID @nCpType int, -- CP타입(투니랜드:700) @sUserName varchar(10), -- 사용자이름 @sUserBirthday varchar(6) = '', -- 생년월일 @sEncodeJumin1 varchar(12) = '', -- 주민번호앞자리(암호화) @sEncodeJumin2 varchar(14) = '', -- 주민번호뒷자리(암호화) @sUserEnCode varchar(64) = '', -- 전체주민번호(암호화) @nUserNumber tinyint, -- 주민번호뒷자리처음(남자:1, 여자:2, 2000년생은 3,4) @sZipcode varchar(8) = '', -- 우편번호 @sAddress1 varchar(150) = '', -- 주소1 @sAddress2 varchar(50) = '', -- 주소2 @sMobile varchar(16) = '' -- 핸드폰번호 AS BEGIN -- 변수 선언 DECLARE @nAccountIDX int -- 변수 세팅 SET @nAccountIDX = 0 -- TRAN START BEGIN TRAN -- 게임 관련 기본 데이터 저장 INSERT INTO userMemberDB (userID, nickName, userPWD, EMail, mailling, userType, joinType, eventType, cpType, limitType, limitDate, regDate) VALUES (@sUserId, @sNickName, '', @sEMail, @nMailling, @nUserType, @nJoinType, 0, @nCpType, 0, '1999-01-01', GETDATE()) IF @@ROWCOUNT <> 1 OR @@ERROR <> 0 BEGIN ROLLBACK TRAN RETURN (-1) END -- 사용자idx SET @nAccountIDX = @@IDENTITY INSERT INTO userCashDB (accountIDX, amtCash, amtBonus, amtLimit, amtSum, chgDate, regDate) VALUES (@nAccountIDX, 1000, 1000, 99900, 0, GETDATE(), GETDATE()) IF @@ROWCOUNT <> 1 OR @@ERROR <> 0 BEGIN ROLLBACK TRAN RETURN (-2) END INSERT INTO userInfoDB (accountIDX, visit_count, rec_index, rec_inc, rec_dec, checkDate, cnnDate, userIP, regDate) VALUES (@nAccountIDX, 0, 0, 0, 0, getdate() - 1, '2000-01-01', @sUserIP, GETDATE()) IF @@ROWCOUNT <> 1 OR @@ERROR <> 0 BEGIN ROLLBACK TRAN RETURN (-2) END INSERT INTO userGameDB (accountIDX, userState, gameMoney, playTime, conn_count, userLevel, userEXP, rencpoint, renspoint, relateLevel, regionType, refillData, connDate, regDate) VALUES (@nAccountIDX, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, '2000-01-01', GETDATE()) IF @@ROWCOUNT <> 1 OR @@ERROR <> 0 BEGIN ROLLBACK TRAN RETURN (-3) END INSERT INTO userRecordBattleDB (accountIDX, type1_win, type1_lose, type1_kill, type1_death, type2_win, type2_lose, type2_kill, type2_death, type3_win, type3_lose, type3_kill, type3_death, type4_win, type4_lose, type4_kill, type4_death, regDate) VALUES (@nAccountIDX, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, GETDATE()) IF @@ROWCOUNT <> 1 OR @@ERROR <> 0 BEGIN ROLLBACK TRAN RETURN (-4) END INSERT INTO userLoginDB (accountIDX, encodeKey, gameServerID, connDate) VALUES (@nAccountIDX, '111111111111111', 0, GETDATE()) IF @@ROWCOUNT <> 1 OR @@ERROR <> 0 BEGIN ROLLBACK TRAN RETURN (-5) END -- 채널링 데이터 INSERT INTO userCooperationDB (accountIDX, userID, cpIDX, cpID, cpType, note, regDate) VALUES (@nAccountIDX, @sUserId, @nTooniIDX, @sTooniId, @nCpType, '', GETDATE()) IF @@ROWCOUNT <> 1 OR @@ERROR <> 0 BEGIN ROLLBACK TRAN RETURN (-6) END INSERT INTO userNameDB (accountIDX, userName, userBirthday, userJumin1, userJumin2, userEnCode, userNumber, userGender, returnValue, userIP, regDate) VALUES (@nAccountIDX, @sUserName, @sUserBirthday, @sEncodeJumin1, @sEncodeJumin2, @sUserEnCode, @nUserNumber, @nGender, 1, @sUserIP, GETDATE()) IF @@ROWCOUNT <> 1 OR @@ERROR <> 0 BEGIN ROLLBACK TRAN RETURN (-7) END INSERT INTO userInfoBDB (accountIDX, tel, mobile, zipcode, address1, address2, regDate) VALUES (@nAccountIDX, '', @sMobile, @sZipcode, @sAddress1, @sAddress2, GETDATE()) IF @@ROWCOUNT <> 1 OR @@ERROR <> 0 BEGIN ROLLBACK TRAN RETURN (-8) END INSERT INTO LosaWeb.DBO.web_user_avatar (accountIDX, NGR010, NFS020, NHD030, PHD040, NEY050, PEY060, NMT070, PMT080, NEB090, PEB100, NHR110, PHR120, NBS130, NBD140, PBD150, NUD160, PUD170, NFT180, PFT190, NPT200, PPT210, NST220, PST230, NJK240, PJK250, PAS260, gender, regDate) VALUES (@nAccountIDX, 1, 0, 1, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, @nGender, GETDATE()) IF @@ROWCOUNT <> 1 OR @@ERROR <> 0 BEGIN ROLLBACK TRAN RETURN (-9) END INSERT INTO LosaWeb.DBO.web_user_minihome (accountIDX, today_visit_count, total_visit_count, write_board_count, write_comt_count, regDate) VALUES (@nAccountIDX, 0, 0, 0, 0, GETDATE()) IF @@ROWCOUNT <> 1 OR @@ERROR <> 0 BEGIN ROLLBACK TRAN RETURN (-10) END -- COMMIT TRAN COMMIT TRAN RETURN (1) END GO /****** 개체: StoredProcedure [dbo].[z_nouse_game_guild_battle_record_save] 스크립트 날짜: 05/04/2012 14:09:02 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[z_nouse_game_guild_battle_record_save] ( @guildIDX int , @type1_win int , @type1_tie int , @type1_lose int , @type1_kill int , @type1_death int , @type2_win int , @type2_tie int , @type2_lose int , @type2_kill int , @type2_death int , @type3_win int , @type3_tie int , @type3_lose int , @type3_kill int , @type3_death int , @type4_win int , @type4_tie int , @type4_lose int , @type4_kill int , @type4_death int ) AS UPDATE userRecordGuildDB SET type1_win = @type1_win , type1_tie = @type1_tie , type1_lose = @type1_lose , type1_kill = @type1_kill , type1_death = @type1_death , type2_win = @type2_win , type2_tie = @type2_tie , type2_lose = @type2_lose , type2_kill = @type2_kill , type2_death = @type2_death , type3_win = @type3_win , type3_tie = @type3_tie , type3_lose = @type3_lose , type3_kill = @type3_kill , type3_death = @type3_death , type4_win = @type4_win , type4_tie = @type4_tie , type4_lose = @type4_lose , type4_kill = @type4_kill , type4_death = @type4_death WHERE guildIDX=@guildIDX GO /****** 개체: StoredProcedure [dbo].[game_guild_get_list] 스크립트 날짜: 05/04/2012 14:06:14 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[game_guild_get_list] ( @topn int , @idx int ) AS SELECT TOP (@topn) a.idx, a.guildName, a.aboutguild, a.guildmark, a.point, a.maxcount, a.regDate, a.membercount, a.todaypoint, a.guildLevel, a.regionType, b.type1_win, b.type1_lose, b.type1_kill, b.type1_death FROM userGuildDB a WITH(NOLOCK) INNER JOIN userRecordGuildDB b WITH(NOLOCK) ON a.idx = b.guildIDX WHERE a.idx < @idx ORDER BY a.idx DESC GO /****** 개체: StoredProcedure [dbo].[game_guild_create_guild] 스크립트 날짜: 05/04/2012 14:06:14 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[game_guild_create_guild] ( @accountIDX int , @guildName varchar(20) , @aboutguild varchar(110) , @guildmark int , @maxcount int , @regionType int ) AS SET XACT_ABORT ON DECLARE @cnt int, @errcount int, @guildIDX int, @masterIDX int SET @cnt = 0 SET @errcount = 0 SET @cnt = (SELECT count(*) FROM userGuildDB WHERE guildName=@guildName) if (@cnt > 0) BEGIN SET @errcount = 2 SELECT @errcount AS 'returnVal' RETURN END SET @cnt = (SELECT count(*) FROM userGuildInfoDB WHERE accountIDX=@accountIDX and guildJoinType > 0) if (@cnt > 0) BEGIN SET @errcount = 3 SELECT @errcount AS 'returnVal' RETURN END BEGIN TRAN if (@errcount = 0) BEGIN SELECT 1 AS 'returnVal' DELETE FROM userGuildInfoDB WHERE accountIDX = @accountIDX INSERT INTO userGuildDB (guildName, aboutguild, guildmark, ranking, point, todaypoint, guildLevel, maxcount, membercount, regionType, regDate) VALUES (@guildName, @aboutguild, @guildmark, 0, 0, 0, 0, @maxcount, 1, @regionType, getdate()) SET @guildIDX = (SELECT idx FROM userGuildDB WHERE guildName=@guildName) INSERT INTO userGuildInfoDB (accountIDX, guildIDX, guildPosition, guildJoinType, regDate) VALUES (@accountIDX, @guildIDX, '길드장', 1, getdate()) INSERT INTO userRecordGuildDB (guildIDX, type1_win, type1_lose, type1_kill, type1_death, regDate) VALUES (@guildIDX, 0, 0, 0, 0, getdate()) END COMMIT TRAN GO /****** 개체: StoredProcedure [dbo].[game_guild_battle_record_save] 스크립트 날짜: 05/04/2012 14:06:12 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[game_guild_battle_record_save] ( @guildIDX int , @battleType int , @win int , @lose int , @killed int , @death int ) AS UPDATE userRecordGuildDB SET type1_win = @win, type1_lose = @lose, type1_kill = @killed, type1_death = @death WHERE guildIDX = @guildIDX GO /****** 개체: StoredProcedure [dbo].[game_region_season_end] 스크립트 날짜: 05/04/2012 14:07:21 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[game_region_season_end] AS BEGIN TRAN DECLARE @limitRenpoint int, @limitPrepoint int, @season int, @totalpoint int DECLARE @rt1point int, @rt1point_bonus int, @rt1count int, @rt2point int, @rt2point_bonus int, @rt2count int SET @limitRenpoint = DBO.DEFINE_REGION_LIMIT_RENSPOINT() SET @limitPrepoint = DBO.DEFINE_REGION_LIMIT_SE_RENSPOINT() SET @season = isNull((SELECT max(season) FROM userRegionDB_history), 0) + 1 SET @totalpoint = (SELECT rt1point + rt2point AS 'rp' FROM userRegionDB) SET @rt1point = (SELECT rt1point FROM userRegionDB) SET @rt2point = (SELECT rt2point FROM userRegionDB) SET @rt1point_bonus = (SELECT rt1point_bonus FROM userRegionDB) SET @rt2point_bonus = (SELECT rt2point_bonus FROM userRegionDB) SET @rt1count = (SELECT count(*) FROM userGameDB WHERE regionType=1 and renspoint > @limitRenpoint) SET @rt2count = (SELECT count(*) FROM userGameDB WHERE regionType=2 and renspoint > @limitRenpoint) If (@totalpoint > 0) BEGIN INSERT INTO userRegionDB_compen (accountIDX, rt1point, rt1point_bonus, rt1count, rt2point, rt2point_bonus, rt2count, regionType, renspoint, regionRanking, regDate) SELECT a.accountIDX, @rt1point, @rt1point_bonus, @rt1count, @rt2point, @rt2point_bonus, @rt2count, a.regionType, a.renspoint, isNull(b.region, 0), getdate() FROM userGameDB a LEFT JOIN userRankingDB b ON a.accountIDX=b.accountIDX WHERE a.regionType > 0 and renspoint > @limitPrepoint END DELETE FROM userRegionDB_compen WHERE regDate < Left(getdate(), 10) INSERT INTO userRegionDB_history (point, point_bonus, membercount, regionType, season, regDate) VALUES (@rt1point, @rt1point_bonus, @rt1count, 1, @season, getdate()) INSERT INTO userRegionDB_history (point, point_bonus, membercount, regionType, season, regDate) VALUES (@rt2point, @rt2point_bonus, @rt2count, 2, @season, getdate()) COMMIT TRAN GO /****** 개체: StoredProcedure [dbo].[game_region_season_end_server_close] 스크립트 날짜: 05/04/2012 14:07:21 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[game_region_season_end_server_close] AS BEGIN TRAN DECLARE @limitRenpoint int, @limitPrepoint int, @season int, @totalpoint int DECLARE @rt1point int, @rt1point_bonus int, @rt1count int, @rt2point int, @rt2point_bonus int, @rt2count int SET @limitRenpoint = DBO.DEFINE_REGION_LIMIT_RENSPOINT() SET @limitPrepoint = DBO.DEFINE_REGION_LIMIT_SE_RENSPOINT() SET @season = isNull((SELECT max(season) FROM userRegionDB_history), 0) + 1 SET @totalpoint = (SELECT rt1point + rt2point AS 'rp' FROM userRegionDB) SET @rt1point = (SELECT rt1point FROM userRegionDB) SET @rt2point = (SELECT rt2point FROM userRegionDB) SET @rt1point_bonus = (SELECT rt1point_bonus FROM userRegionDB) SET @rt2point_bonus = (SELECT rt2point_bonus FROM userRegionDB) SET @rt1count = (SELECT count(*) FROM userGameDB WHERE regionType=1 and renspoint > @limitRenpoint) SET @rt2count = (SELECT count(*) FROM userGameDB WHERE regionType=2 and renspoint > @limitRenpoint) If (@totalpoint > 0) BEGIN INSERT INTO userRegionDB_compen (accountIDX, rt1point, rt1point_bonus, rt1count, rt2point, rt2point_bonus, rt2count, regionType, renspoint, regionRanking, regDate) SELECT a.accountIDX, @rt1point, @rt1point_bonus, @rt1count, @rt2point, @rt2point_bonus, @rt2count, a.regionType, a.renspoint, isNull(b.region, 0), getdate() FROM userGameDB a LEFT JOIN userRankingDB b ON a.accountIDX=b.accountIDX WHERE a.regionType > 0 and renspoint > @limitPrepoint END DELETE FROM userRegionDB_compen WHERE regDate < Left(getdate(), 10) INSERT INTO userRegionDB_history (point, point_bonus, membercount, regionType, season, regDate) VALUES (@rt1point, @rt1point_bonus, @rt1count, 1, @season, getdate()) INSERT INTO userRegionDB_history (point, point_bonus, membercount, regionType, season, regDate) VALUES (@rt2point, @rt2point_bonus, @rt2count, 2, @season, getdate()) EXEC game_region_init_renspoint COMMIT TRAN GO /****** 개체: StoredProcedure [dbo].[game_region_backup_compen] 스크립트 날짜: 05/04/2012 14:07:19 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[game_region_backup_compen] AS DECLARE @tblName varchar(100), @sql varchar(300), @limitRenpoint int DECLARE @i tinyint, @rtn bit, @tcount tinyint SET @i = 65 SET @rtn = 0 SET @limitRenpoint = DBO.DEFINE_REGION_LIMIT_RENSPOINT() WHILE (@rtn = 0) BEGIN SET @tblName = 'LosaGame_' + RTrim(substring(convert(varchar(10), getdate(), 112),3,10)) + '_userRegionDB_compen_se_' + char(@i) SET @tcount = (SELECT count(*) FROM [Backup].DBO.sysobjects WHERE [uid]=1 and xtype='U' and [name]=@tblName) If (@tcount = 0) SET @rtn = 1 ELSE SET @i = @i + 1 END SET @sql = 'SELECT accountIDX, rt1point, rt1point_bonus, rt1count, rt2point, rt2point_bonus, rt2count, regionType, renspoint, regDate INTO [Backup].DBO.' + @tblName + ' FROM userRegionDB_compen WHERE regDate > ''' + Left(getdate(), 10) + '''' EXECUTE (@sql) GO /****** 개체: StoredProcedure [dbo].[game_region_backup_point] 스크립트 날짜: 05/04/2012 14:07:19 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[game_region_backup_point] AS DECLARE @tblNameA varchar(100), @tblNameB varchar(100), @sql varchar(300), @limitRenpoint int DECLARE @i tinyint, @rtn bit, @tcount tinyint SET @i = 65 SET @rtn = 0 SET @limitRenpoint = DBO.DEFINE_REGION_LIMIT_RENSPOINT() WHILE (@rtn = 0) BEGIN SET @tblNameA = 'LosaGame_' + RTrim(substring(convert(varchar(10), getdate(), 112),3,10)) + '_userGameDB_se_' + char(@i) SET @tblNameB = 'LosaGame_' + RTrim(substring(convert(varchar(10), getdate(), 112),3,10)) + '_userGuildDB_se_' + char(@i) SET @tcount = (SELECT count(*) FROM [Backup].DBO.sysobjects WHERE [uid]=1 and xtype='U' and [name]=@tblNameA) SET @tcount = @tcount + (SELECT count(*) FROM [Backup].DBO.sysobjects WHERE [uid]=1 and xtype='U' and [name]=@tblNameB) If (@tcount = 0) SET @rtn = 1 ELSE SET @i = @i + 1 END SET @sql = 'SELECT accountIDX, gameMoney, userLevel, userEXP, rencpoint, renspoint INTO [Backup].DBO.' + @tblNameA + ' FROM userGameDB WHERE renspoint > ' + Convert(varchar(6), @limitRenpoint) EXECUTE (@sql) SET @sql = 'SELECT idx, guildName, guildmark, ranking, point, todaypoint, guildLevel, regionType INTO [Backup].DBO.' + @tblNameB + ' FROM userGuildDB' EXECUTE (@sql) GO /****** 개체: StoredProcedure [dbo].[web_play_game_server_get_data] 스크립트 날짜: 05/04/2012 14:08:35 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[web_play_game_server_get_data] As DECLARE @maxcount int SET @maxcount = DBO.DEFINE_SERVER_CONNECTION_MAX_COUNT() SELECT TOP 1 serverID FROM define_game_server WHERE connNumber < @maxcount and [status]=1 ORDER BY connNumber ASC GO /****** 개체: StoredProcedure [dbo].[web_game_server_get_data_top1] 스크립트 날짜: 05/04/2012 14:07:50 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[web_game_server_get_data_top1] As DECLARE @maxcount int SET @maxcount = DBO.DEFINE_SERVER_CONNECTION_MAX_COUNT() SELECT TOP 1 serverID FROM define_game_server WHERE connNumber < @maxcount and [status]=1 ORDER BY connNumber ASC GO /****** 개체: StoredProcedure [dbo].[web_log_game_exec] 스크립트 날짜: 05/04/2012 14:08:03 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[web_log_game_exec] ( @userID varchar(12) , @userIP varchar(15) , @logType tinyint , @note varchar(200) ) As INSERT INTO Log_play_web (userID, userIP, logType, note, regDate) VALUES (@userID, @userIP, @logType, @note, getdate()) GO /****** 개체: StoredProcedure [dbo].[game_server_add] 스크립트 날짜: 05/04/2012 14:07:21 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[game_server_add] ( @serverID bigint , @serverIP varchar(15) , @serverPort int , @serverName varchar(50) , @clientPort int ) As BEGIN TRAN IF (NOT EXISTS(SELECT * FROM define_game_server WHERE serverID = @serverID)) BEGIN DECLARE @cnt smallint SET @cnt = ISNULL((SELECT MAX(idx) FROM define_game_server), 0) SET @cnt = @cnt + 1 INSERT define_game_server (idx, serverID, serverIP, serverPort, serverName, clientPort, connNumber, [status], regDate) VALUES (@cnt, @serverID, @serverIP, @serverPort, @serverName, @clientPort, 0, 0, getdate()) END COMMIT TRAN GO /****** 개체: StoredProcedure [dbo].[web_play_game_server_get_count] 스크립트 날짜: 05/04/2012 14:08:35 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[web_play_game_server_get_count] As SELECT COUNT(*) FROM define_game_server with(nolock) WHERE [status]=1 GO /****** 개체: StoredProcedure [dbo].[web_mgame_event_get_info] 스크립트 날짜: 05/04/2012 14:08:22 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[web_mgame_event_get_info] ( @mgameID varchar(20) ) AS SELECT a.accountIDX, a.cpIDX, b.userName FROM userCooperationDB a INNER JOIN userNameDB b ON a.accountIDX=b.accountIDX WHERE a.cpID=@mgameID and a.cpType=300 GO /****** 개체: StoredProcedure [dbo].[web_namecheck_jumin_count] 스크립트 날짜: 05/04/2012 14:08:34 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[web_namecheck_jumin_count] ( @accountIDX varchar(12) ) As SELECT COUNT(*) FROM userNameDB WHERE accountIDX = @accountIDX GO /****** 개체: StoredProcedure [dbo].[web_namecheck_add] 스크립트 날짜: 05/04/2012 14:08:34 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[web_namecheck_add] ( @accountIDX int , @userName varchar(10) , @userJumin1 char(6) , @userEnCode varchar(64) , @userNumber tinyint , @gender int , @ncrtn tinyint , @userIP varchar(15) , @returnVal int output ) As BEGIN TRAN INSERT INTO userNameDB (accountIDX, userName, userBirthday, userEnCode, userNumber, userGender, returnValue, userIP, regDate) VALUES (@accountIDX, @userName, @userJumin1, @userEnCode, @userNumber, @gender, @ncrtn, @userIP, getdate()) SET @returnVal = @@error if (@@error = 0) Commit Tran else Rollback Tran GO /****** 개체: StoredProcedure [dbo].[web_member_jumin_count] 스크립트 날짜: 05/04/2012 14:08:17 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[web_member_jumin_count] ( @userJumin varchar(64) ) As SELECT COUNT(*) FROM userNameDB WHERE userEnCode = @userJumin GO /****** 개체: StoredProcedure [dbo].[web_member_jumin_get_userID] 스크립트 날짜: 05/04/2012 14:08:18 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[web_member_jumin_get_userID] ( @userJumin varchar(64) ) AS SELECT userID FROM userMemberDB WHERE accountIDX=(SELECT TOP 1 accountIDX FROM userNameDB WHERE userEnCode = @userJumin) GO /****** 개체: StoredProcedure [dbo].[web_member_namecheck_add] 스크립트 날짜: 05/04/2012 14:08:18 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[web_member_namecheck_add] ( @accountIDX int , @userName varchar(10) , @userJumin1 char(6) , @userEnCode varchar(64) , @userNumber tinyint , @gender int , @userIP varchar(15) ) AS INSERT INTO userNameDB (accountIDX, userName, userBirthday, userEnCode, userNumber, userGender, returnValue, userIP, regDate) VALUES (@accountIDX, @userName, @userJumin1, @userEnCode, @userNumber, @gender, 0, @userIP, getdate()) UPDATE userMemberDB SET joinType=5 WHERE accountIDX=@accountIDX GO /****** 개체: StoredProcedure [dbo].[usp_web_get_userAge] 스크립트 날짜: 05/04/2012 14:07:28 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO /*============================================================================== -- 작 성 : 이수진 [2011-11-02] -- 용 도 : 이용자 나이 조회 ==============================================================================*/ --DROP PROC usp_web_get_userAge --GO CREATE PROCEDURE [dbo].[usp_web_get_userAge] @accountIDX int -- 사용자 IDX 조회 AS BEGIN SET NOCOUNT ON SELECT YEAR(GETDATE() - (Case When userNumber = 1 OR userNumber = 2 Then Convert(datetime, Convert(varchar(8), '19' + userBirthday)) Else Case When userNumber = 3 OR userNumber = 4 Then Convert(datetime, Convert(varchar(8), '20' + userBirthday)) End End) - 1) - YEAR(0) FROM userNameDB WITH(NOLOCK) WHERE accountIDX = @accountIDX SET NOCOUNT OFF END GO /****** 개체: StoredProcedure [dbo].[web_agreend_adult] 스크립트 날짜: 05/04/2012 14:07:30 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[web_agreend_adult] ( @accountIDX int ) AS BEGIN TRAN INSERT INTO LosaGame_log.DBO.backup_agrend_parent (accountIDX, parentName, parentBirth, parentJumin1, parentJumin2, parentEncode, parentNumber, email, agreeSDate, agreeEDate, agreeType, logIDX, regDate, initDate) SELECT accountIDX, parentName, parentBirth, parentJumin1, parentJumin2, parentEncode, parentNumber, email, agreeSDate, agreeEDate, agreeType, logIDX, regDate, getdate() FROM userParentDB WHERE accountIDX=@accountIDX INSERT INTO LosaGame_log.DBO.backup_agrend_infob (accountIDX, tel, mobile, zipcode, address1, address2, regDate, initDate) SELECT accountIDX, tel, mobile, zipcode, address1, address2, regDate, getdate() FROM userInfoBDB WHERE accountIDX=@accountIDX DELETE FROM userParentDB WHERE accountIDX=@accountIDX DELETE FROM userInfoBDB WHERE accountIDX=@accountIDX UPDATE userNameDB SET realType=0 WHERE accountIDX=@accountIDX UPDATE userMemberDB SET joinType=5 WHERE accountIDX=@accountIDX COMMIT TRAN GO /****** 개체: StoredProcedure [dbo].[web_realmember_namecheck_saveA] 스크립트 날짜: 05/04/2012 14:08:51 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[web_realmember_namecheck_saveA] ( @accountIDX int , @userJumin1 char(12) , @userJumin2 char(14) , @userGender tinyint , @userNumber tinyint , @userIP varchar(15) , @returnValue tinyint , @realType tinyint ) AS UPDATE userNameDB SET userJumin1 = @userJumin1 , userJumin2 = @userJumin2 , userNumber = @userNumber , userGender = @userGender , returnValue = @returnValue , userIP = @userIP , realType = @realType , regDate = getdate() WHERE accountIDX = @accountIDX GO /****** 개체: StoredProcedure [dbo].[web_realmember_namecheck_saveB] 스크립트 날짜: 05/04/2012 14:08:51 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[web_realmember_namecheck_saveB] ( @accountIDX int , @userName varchar(10) , @userBirthday char(6) , @userJumin1 char(12) , @userJumin2 char(14) , @userEnCode varchar(64) , @userGender tinyint , @userNumber tinyint , @userIP varchar(15) , @returnValue tinyint , @realType tinyint ) AS BEGIN TRAN INSERT INTO LosaGame_log.DBO.log_userNameDB_backup (accountIDX, userName, userBirthday, userEnCode, userNumber, userGender, returnValue, userIP, regDate) SELECT accountIDX, userName, userBirthday, userEnCode, userNumber, userGender, returnValue, userIP, regDate FROM userNameDB WHERE accountIDX=@accountIDX UPDATE userNameDB SET userName = @userName , userBirthday = @userBirthday , userJumin1 = @userJumin1 , userJumin2 = @userJumin2 , userEnCode = @userEnCode , userGender = @userGender , userNumber = @userNumber , returnValue = @returnValue , userIP = @userIP , realType = @realType , regDate = getdate() WHERE accountIDX = @accountIDX COMMIT TRAN GO /****** 개체: StoredProcedure [dbo].[web_join_edit_get_data] 스크립트 날짜: 05/04/2012 14:08:01 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[web_join_edit_get_data] ( @accountIDX int ) AS SELECT a.userID, a.nickName, a.userPWD, a.EMail, a.mailling, b.userEnCode FROM userMemberDB a JOIN userNameDB b on a.accountIDX = b.accountIDX WHERE a.accountIDX = @accountIDX GO /****** 개체: StoredProcedure [dbo].[game_get_age] 스크립트 날짜: 05/04/2012 14:06:11 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[game_get_age] ( @accountIDX int ) AS SELECT userBirthday, userNumber FROM userNameDB WITH(NOLOCK) WHERE accountIDX=@accountIDX GO /****** 개체: StoredProcedure [dbo].[web_realmember_namecheck_add] 스크립트 날짜: 05/04/2012 14:08:49 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[web_realmember_namecheck_add] ( @accountIDX int , @userName varchar(10) , @userBirthday char(6) , @userJumin1 char(12) , @userJumin2 char(14) , @userEnCode varchar(64) , @userGender tinyint , @userNumber tinyint , @userIP varchar(15) , @returnValue tinyint , @realType tinyint ) AS UPDATE userMemberDB SET joinType=5 WHERE accountIDX=@accountIDX INSERT INTO userNameDB (accountIDX, userName, userBirthday, userJumin1, userJumin2, userEnCode, userNumber, userGender, returnValue, userIP, realType, regDate) VALUES (@accountIDX, @userName, @userBirthday, @userJumin1, @userJumin2, @userEnCode, @userNumber, @userGender, @returnValue, @userIP, @realType, getdate()) GO /****** 개체: StoredProcedure [dbo].[web_realmember_get_username_birth] 스크립트 날짜: 05/04/2012 14:08:47 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[web_realmember_get_username_birth] ( @accountIDX int ) AS SELECT a.userID, b.userName, b.userBirthday, b.userNumber FROM userMemberDB a JOIN userNameDB b ON a.accountIDX=b.accountIDX WHERE a.accountIDX=@accountIDX GO /****** 개체: StoredProcedure [dbo].[web_realmember_get_userID_from_jumin] 스크립트 날짜: 05/04/2012 14:08:46 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[web_realmember_get_userID_from_jumin] ( @userJumin varchar(64) ) AS SELECT userID FROM userMemberDB WHERE accountIDX=(SELECT TOP 1 accountIDX FROM userNameDB WHERE userEnCode = @userJumin) GO /****** 개체: StoredProcedure [dbo].[web_realmember_get_returnValue] 스크립트 날짜: 05/04/2012 14:08:46 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[web_realmember_get_returnValue] ( @accountIDX int ) AS SELECT returnValue, realType FROM userNameDB WHERE accountIDX=@accountIDX GO /****** 개체: StoredProcedure [dbo].[web_realmember_get_realType] 스크립트 날짜: 05/04/2012 14:08:45 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[web_realmember_get_realType] ( @accountIDX int ) As SELECT realType FROM userNameDB WHERE accountIDX = @accountIDX GO /****** 개체: StoredProcedure [dbo].[web_realmember_get_realnamejumin] 스크립트 날짜: 05/04/2012 14:08:45 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[web_realmember_get_realnamejumin] ( @accountIDX int ) AS SELECT userName, userJumin1, userJumin2, userEnCode FROM userNameDB WHERE accountIDX = @accountIDX GO /****** 개체: StoredProcedure [dbo].[web_realmember_get_name_data] 스크립트 날짜: 05/04/2012 14:08:45 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[web_realmember_get_name_data] ( @accountIDX int ) AS SELECT accountIDX, userName, userEnCode, realType FROM userNameDB WHERE accountIDX=@accountIDX GO /****** 개체: StoredProcedure [dbo].[web_realmember_get_accountIDX] 스크립트 날짜: 05/04/2012 14:08:44 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[web_realmember_get_accountIDX] ( @userJumin varchar(64) ) As SELECT accountIDX FROM userNameDB WHERE userEnCode = @userJumin GO /****** 개체: StoredProcedure [dbo].[web_search_userID_get_data] 스크립트 날짜: 05/04/2012 14:08:56 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[web_search_userID_get_data] ( @juminEncode varchar(64) ) AS SELECT userID FROM userMemberDB WHERE accountIDX in (SELECT accountIDX FROM userNameDB WHERE userEnCode=@juminEncode) GO /****** 개체: StoredProcedure [dbo].[web_search_userPWD_get_data] 스크립트 날짜: 05/04/2012 14:08:56 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[web_search_userPWD_get_data] ( @userID varchar(12) , @juminEncode varchar(64) ) AS SELECT a.userID, a.userPWD, a.EMail FROM userMemberDB a JOIN userNameDB b ON a.accountIDX=b.accountIDX WHERE a.userID = @userID and b.userEnCode = @juminEncode GO /****** 개체: StoredProcedure [dbo].[game_get_age_from_id] 스크립트 날짜: 05/04/2012 14:06:11 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[game_get_age_from_id] ( @userID varchar(12) ) AS SELECT b.userBirthday, b.userNumber FROM userMemberDB a WITH(NOLOCK) JOIN userNameDB b WITH(NOLOCK) ON a.accountIDX=b.accountIDX WHERE a.userID=@userID GO /****** 개체: StoredProcedure [dbo].[web_get_jumin] 스크립트 날짜: 05/04/2012 14:07:54 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[web_get_jumin] ( @accountIDX int ) AS SELECT userEnCode FROM userNameDB WITH(NOLOCK) WHERE accountIDX=@accountIDX GO /****** 개체: StoredProcedure [dbo].[web_get_userName] 스크립트 날짜: 05/04/2012 14:07:56 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[web_get_userName] ( @accountIDX int ) As SELECT userName FROM userNameDB WITH(NOLOCK) WHERE accountIDX = @accountIDX GO /****** 개체: StoredProcedure [dbo].[game_item_add] 스크립트 날짜: 05/04/2012 14:06:26 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[game_item_add] ( @accountIDX int , @item1_type int , @item1_code int , @item2_type int , @item2_code int , @item3_type int , @item3_code int , @item4_type int , @item4_code int , @item5_type int , @item5_code int , @item6_type int , @item6_code int , @item7_type int , @item7_code int , @item8_type int , @item8_code int , @item9_type int , @item9_code int , @item10_type int , @item10_code int , @item11_type int , @item11_code int , @item12_type int , @item12_code int , @item13_type int , @item13_code int , @item14_type int , @item14_code int , @item15_type int , @item15_code int , @item16_type int , @item16_code int , @item17_type int , @item17_code int , @item18_type int , @item18_code int , @item19_type int , @item19_code int , @item20_type int , @item20_code int ) As Insert into userItemDB (accountIDX, item1_type, item1_code, item2_type, item2_code, item3_type, item3_code, item4_type, item4_code, item5_type, item5_code, item6_type, item6_code, item7_type, item7_code, item8_type, item8_code, item9_type, item9_code, item10_type, item10_code, item11_type, item11_code, item12_type, item12_code, item13_type, item13_code, item14_type, item14_code, item15_type, item15_code, item16_type, item16_code, item17_type, item17_code, item18_type, item18_code, item19_type, item19_code, item20_type, item20_code) values (@accountIDX, @item1_type, @item1_code, @item2_type, @item2_code, @item3_type, @item3_code, @item4_type, @item4_code, @item5_type, @item5_code, @item6_type, @item6_code, @item7_type, @item7_code, @item8_type, @item8_code, @item9_type, @item9_code, @item10_type, @item10_code, @item11_type, @item11_code, @item12_type, @item12_code, @item13_type, @item13_code, @item14_type, @item14_code, @item15_type, @item15_code, @item16_type, @item16_code, @item17_type, @item17_code, @item18_type, @item18_code, @item19_type, @item19_code, @item20_type, @item20_code) GO /****** 개체: StoredProcedure [dbo].[game_item_save] 스크립트 날짜: 05/04/2012 14:06:55 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[game_item_save] ( @idx int , @item1_type int , @item1_code int , @item2_type int , @item2_code int , @item3_type int , @item3_code int , @item4_type int , @item4_code int , @item5_type int , @item5_code int , @item6_type int , @item6_code int , @item7_type int , @item7_code int , @item8_type int , @item8_code int , @item9_type int , @item9_code int , @item10_type int , @item10_code int , @item11_type int , @item11_code int , @item12_type int , @item12_code int , @item13_type int , @item13_code int , @item14_type int , @item14_code int , @item15_type int , @item15_code int , @item16_type int , @item16_code int , @item17_type int , @item17_code int , @item18_type int , @item18_code int , @item19_type int , @item19_code int , @item20_type int , @item20_code int ) As UPDATE userItemDB SET item1_type = @item1_type , item1_code = @item1_code , item2_type = @item2_type , item2_code = @item2_code , item3_type = @item3_type , item3_code = @item3_code , item4_type = @item4_type , item4_code = @item4_code , item5_type = @item5_type , item5_code = @item5_code , item6_type = @item6_type , item6_code = @item6_code , item7_type = @item7_type , item7_code = @item7_code , item8_type = @item8_type , item8_code = @item8_code , item9_type = @item9_type , item9_code = @item9_code , item10_type = @item10_type , item10_code = @item10_code , item11_type = @item11_type , item11_code = @item11_code , item12_type = @item12_type , item12_code = @item12_code , item13_type = @item13_type , item13_code = @item13_code , item14_type = @item14_type , item14_code = @item14_code , item15_type = @item15_type , item15_code = @item15_code , item16_type = @item16_type , item16_code = @item16_code , item17_type = @item17_type , item17_code = @item17_code , item18_type = @item18_type , item18_code = @item18_code , item19_type = @item19_type , item19_code = @item19_code , item20_type = @item20_type , item20_code = @item20_code WHERE idx = @idx GO /****** 개체: StoredProcedure [dbo].[game_item_get_self_index] 스크립트 날짜: 05/04/2012 14:06:43 ******/ SET ANSI_NULLS OFF GO SET QUOTED_IDENTIFIER OFF GO CREATE PROCEDURE [dbo].[game_item_get_self_index] ( @accountIDX int ) As SELECT TOP 1 idx FROM userItemDB WHERE accountIDX = @accountIDX ORDER BY idx DESC GO /****** 개체: StoredProcedure [dbo].[game_item_get_data_list] 스크립트 날짜: 05/04/2012 14:06:43 ******/ SET ANSI_NULLS OFF GO SET QUOTED_IDENTIFIER OFF GO CREATE PROCEDURE [dbo].[game_item_get_data_list] ( @accountIDX int ) As SELECT idx, item1_type, item1_code, item2_type, item2_code, item3_type, item3_code, item4_type, item4_code, item5_type, item5_code, item6_type, item6_code, item7_type, item7_code, item8_type, item8_code, item9_type, item9_code, item10_type, item10_code, item11_type, item11_code, item12_type, item12_code, item13_type, item13_code, item14_type, item14_code, item15_type, item15_code, item16_type, item16_code, item17_type, item17_code, item18_type, item18_code, item19_type, item19_code, item20_type, item20_code FROM userItemDB WHERE accountIDX = @accountIDX GO /****** 개체: StoredProcedure [dbo].[web_memberout_inst] 스크립트 날짜: 05/04/2012 14:08:22 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[web_memberout_inst] ( @userID varchar(12) , @nickName varchar(12) , @email varchar(50) , @lastDate datetime , @regDate datetime , @item varchar(1000) , @cash varchar(20) , @avatar varchar(100) , @cntTotal int , @cntBoard int , @cntComt int , @cntVisit int , @cntFriend int , @cause varchar(1000) , @userIP varchar(16) , @returnVal int output ) As Begin Tran Insert into LosaWeb.DBO.Log_Secession (userID,nickName,email,lastDate,regDate,item,cash,avatar,cntTotal,cntBoard,cntComt,cntVisit,cntFriend,cause,userIP,outDate) values (@userID,@nickName,@email,@lastDate,@regDate,@item,@cash,@avatar,@cntTotal,@cntBoard,@cntComt,@cntVisit,@cntFriend,@cause,@userIP,getdate()) DECLARE @accountIDX int SET @accountIDX = (SELECT accountIDX FROM LosaWeb.DBO.userMemberDB WHERE userID = @userID) -- 사이트 관련 삭제 DELETE FROM LosaWeb.DBO.comty_minihp WHERE adminID = @userID DELETE FROM LosaWeb.DBO.userAvatarInfoDB WHERE userID = @userID DELETE FROM LosaWeb.DBO.userCashDB WHERE userID = @userID DELETE FROM LosaWeb.DBO.userItemDB WHERE userID = @userID DELETE FROM LosaWeb.DBO.userMemberDB WHERE userID = @userID DELETE FROM LosaWeb.DBO.userInfoDB WHERE userID = @userID DELETE FROM LosaWeb.DBO.userFriendDB WHERE userID = @userID DELETE FROM LosaWeb.DBO.userMedalDB WHERE userID = @userID -- 게임 관련 삭제 DELETE FROM userCharacterDB WHERE accountIDX = @accountIDX DELETE FROM userClassInfoDB WHERE accountIDX = @accountIDX DELETE FROM userClassDB WHERE accountIDX = @accountIDX DELETE FROM userEmblemDB WHERE accountIDX = @accountIDX DELETE FROM userGameDB WHERE userID = @userID DELETE FROM userItemDB WHERE accountIDX = @accountIDX DELETE FROM userLoginDB WHERE userID = @userID DELETE FROM userQuestDB WHERE accountIDX = @accountIDX DELETE FROM userQuestDB_complete WHERE accountIDX = @accountIDX DELETE FROM userAwardDB WHERE accountIDX = @accountIDX DELETE FROM userRankingDB_training where userID=@userID DELETE FROM userRankingDB_class where userID=@userID DELETE FROM userRankingDB_award where userID=@userID DELETE FROM userRankingDB_battle where userID=@userID Set @returnVal = @@error if (@@error = 0) Commit Tran else Rollback Tran GO /****** 개체: StoredProcedure [dbo].[web_medal_receive_get_flag] 스크립트 날짜: 05/04/2012 14:08:10 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[web_medal_receive_get_flag] ( @idx int , @accountIDX int ) AS SELECT flag FROM userMedalDB_receive WHERE idx=@idx and accountIDX=@accountIDX GO /****** 개체: StoredProcedure [dbo].[web_medal_get_receive_data] 스크립트 날짜: 05/04/2012 14:08:09 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[web_medal_get_receive_data] ( @accountIDX int ) As SELECT TOP 5 idx FROM userMedalDB_receive WHERE accountIDX=@accountIDX and flag=0 ORDER BY idx ASC GO /****** 개체: StoredProcedure [dbo].[web_medal_add_point] 스크립트 날짜: 05/04/2012 14:08:07 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[web_medal_add_point] ( @accountIDX int , @medalIDX int , @medalLevel int , @expert int ) AS BEGIN TRAN UPDATE userMedalDB_receive SET flag=1 WHERE accountIDX=@accountIDX and medalIDX=@medalIDX IF (exists(SELECT * FROM userRankingDB_medal WHERE accountIDX=@accountIDX)) UPDATE userRankingDB_medal SET medalLevel = @medalLevel, expert = @expert WHERE accountIDX=@accountIDX ELSE BEGIN INSERT INTO userRankingDB_medal (accountIDX, medalLevel, expert, ranking_prev, ranking_now, regDate) VALUES (@accountIDX, @medalLevel, @expert, 0, 0, getdate()) END COMMIT TRAN GO /****** 개체: StoredProcedure [dbo].[game_medal_add] 스크립트 날짜: 05/04/2012 14:06:57 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[game_medal_add] ( @accountIDX int , @medalIDX int ) AS INSERT INTO userMedalDB_receive (accountIDX, medalIDX, flag, regDate) VALUES (@accountIDX, @medalIDX, 0, getdate()) GO /****** 개체: StoredProcedure [dbo].[web_get_userState] 스크립트 날짜: 05/04/2012 14:07:56 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[web_get_userState] ( @accountIDX int ) AS SELECT userState FROM userGameDB WITH(NOLOCK) WHERE accountIDX=@accountIDX GO /****** 개체: StoredProcedure [dbo].[web_guild_hp_get_master_info] 스크립트 날짜: 05/04/2012 14:07:58 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[web_guild_hp_get_master_info] ( @guildIDX int ) AS DECLARE @accidx int SET @accidx = (SELECT accountIDX FROM userGuildInfoDB WITH(NOLOCK) WHERE guildIDX=@guildIDX and guildJoinType=1 and guildPosition='길드장') SELECT a.nickname, b.userLevel FROM userMemberDB a WITH(NOLOCK) JOIN userGameDB b WITH(NOLOCK) ON a.accountIDX = b.accountIDX WHERE a.accountIDX=@accidx GO /****** 개체: StoredProcedure [dbo].[game_game_sexp_deduct_init] 스크립트 날짜: 05/04/2012 14:06:11 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[game_game_sexp_deduct_init] AS UPDATE userGameDB SET userHerosEXP=0 WHERE userHerosEXP=-1 GO /****** 개체: StoredProcedure [dbo].[game_game_get_data] 스크립트 날짜: 05/04/2012 14:06:09 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[game_game_get_data] ( @userID varchar(12) ) As SELECT a.accountIDX, b.userID, b.nickName, a.userState, a.gameMoney, a.conn_count, a.connDate, a.userLevel, a.userEXP, a.relateLevel, b.eventType, isNull(c.class,0) as 'class', b.joinType, b.regDate, a.regionType, a.rencpoint, a.renspoint, isNull(c.region,0) as 'region', b.cpType, ISNULL(d.cpID, '') AS 'cpID', ISNULL(d.note, '') AS 'cpUNIQ', b.limitType, b.limitDate, a.userFishingLevel, a.userFishingEXP, a.refillData, a.userExcavationLevel, a.userExcavationEXP, a.userHerocEXP, a.userHerosEXP FROM userGameDB a JOIN userMemberDB b ON a.accountIDX = b.accountIDX LEFT JOIN userRankingDB c ON a.accountIDX = c.accountIDX LEFT JOIN userCooperationDB d ON a.accountIDX=d.accountIDX WHERE b.userID = @userID GO /****** 개체: StoredProcedure [dbo].[game_game_heroexp_save] 스크립트 날짜: 05/04/2012 14:06:10 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[game_game_heroexp_save] ( @accountIDX int , @heroEXP int ) As UPDATE userGameDB SET userHerosEXP = @heroEXP WHERE accountIDX = @accountIDX GO /****** 개체: StoredProcedure [dbo].[web_minihome_userinfo_all_classgroup_expert] 스크립트 날짜: 05/04/2012 14:08:29 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[web_minihome_userinfo_all_classgroup_expert] ( @accountIDX int ) AS SELECT userEXP FROM userGameDB WITH(NOLOCK) WHERE accountIDX=@accountIDX GO /****** 개체: StoredProcedure [dbo].[web_friend_join_list] 스크립트 날짜: 05/04/2012 14:07:48 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[web_friend_join_list] ( @accountIDX int ) AS SELECT TOP 10 a.idx, b.userLevel, d.accountIDX, d.nickName, b.connDate, c.gameServerID, ISNULL(e.class, 0) as 'userRanking' FROM userFriendDB a WITH(NOLOCK) INNER JOIN userGameDB b WITH(NOLOCK) ON a.friendAccIDX = b.accountIDX INNER JOIN userLoginDB c WITH(NOLOCK) ON a.friendAccIDX = c.accountIDX INNER JOIN userMemberDB d WITH(NOLOCK) ON a.friendAccIDX = d.accountIDX LEFT JOIN userRankingDB e WITH(NOLOCK) ON a.friendAccIDX = e.accountIDX WHERE a.userAccIDX=@accountIDX and a.flag=0 and friendAccIDX not in (SELECT accountIDX FROM userMemberDB WHERE userType < 10) ORDER BY a.idx ASC GO /****** 개체: StoredProcedure [dbo].[web_friend_list_get_guildmember] 스크립트 날짜: 05/04/2012 14:07:49 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[web_friend_list_get_guildmember] ( @accountIDX int , @guildIDX int ) AS SELECT a.accountIDX, b.userLevel FROM userGuildInfoDB a WITH(NOLOCK) JOIN userGameDB b WITH(NOLOCK) ON a.accountIDX = b.accountIDX WHERE a.guildIDX=@guildIDX and a.guildJoinType=1 and a.accountIDX not in (@accountIDX) GO /****** 개체: StoredProcedure [dbo].[web_friend_list_get_idx_level] 스크립트 날짜: 05/04/2012 14:07:49 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[web_friend_list_get_idx_level] ( @accountIDX int ) AS SELECT a.friendAccIDX, b.userLevel FROM userFriendDB a WITH(NOLOCK) JOIN userGameDB b WITH(NOLOCK) ON a.friendAccIDX = b.accountIDX WHERE a.userAccIDX=@accountIDX and a.flag=1 and a.friendAccIDX not in (SELECT accountIDX FROM userMemberDB WITH(NOLOCK) WHERE userType < 10) GO /****** 개체: StoredProcedure [dbo].[web_friend_list_get_idx_level_dev] 스크립트 날짜: 05/04/2012 14:07:50 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[web_friend_list_get_idx_level_dev] ( @accountIDX int ) AS SELECT a.friendAccIDX, b.userLevel FROM userFriendDB a WITH(NOLOCK) JOIN userGameDB b WITH(NOLOCK) ON a.friendAccIDX = b.accountIDX WHERE a.userAccIDX=@accountIDX and a.flag=1 GO /****** 개체: StoredProcedure [dbo].[web_quest_get_nicklevel] 스크립트 날짜: 05/04/2012 14:08:38 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[web_quest_get_nicklevel] ( @accountIDX int ) AS SELECT a.nickname, b.userLevel FROM userMemberDB a JOIN userGameDB b ON a.accountIDX=b.accountIDX WHERE a.accountIDX=@accountIDX GO /****** 개체: StoredProcedure [dbo].[web_minihome_get_nickname_level] 스크립트 날짜: 05/04/2012 14:08:25 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[web_minihome_get_nickname_level] ( @accountIDX int ) AS SELECT a.nickname, b.userLevel from userMemberDB a WITH(NOLOCK) INNER JOIN userGameDB b WITH(NOLOCK) ON a.accountIDX=b.accountIDX where a.accountIDX = @accountIDX GO /****** 개체: StoredProcedure [dbo].[web_get_userLevel] 스크립트 날짜: 05/04/2012 14:07:56 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[web_get_userLevel] ( @accountIDX int ) As SELECT userLevel FROM userGameDB WITH(NOLOCK) WHERE accountIDX = @accountIDX GO /****** 개체: StoredProcedure [dbo].[web_get_regionType] 스크립트 날짜: 05/04/2012 14:07:55 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[web_get_regionType] ( @accountIDX int ) AS SELECT regionType FROM userGameDB WITH(NOLOCK) WHERE accountIDX=@accountIDX GO /****** 개체: StoredProcedure [dbo].[web_get_playTime] 스크립트 날짜: 05/04/2012 14:07:54 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[web_get_playTime] ( @accountIDX int ) As SELECT playTime FROM userGameDB WITH(NOLOCK) WHERE accountIDX = @accountIDX GO /****** 개체: StoredProcedure [dbo].[game_game_heroexp_init] 스크립트 날짜: 05/04/2012 14:06:09 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[game_game_heroexp_init] ( @accountIDX int ) AS UPDATE userGameDB SET userHerocEXP = 0 , userHerosEXP = 0 WHERE accountIDX=@accountIDX GO /****** 개체: StoredProcedure [dbo].[web_ranking_myinfo_all_classgroup_expert] 스크립트 날짜: 05/04/2012 14:08:40 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[web_ranking_myinfo_all_classgroup_expert] ( @accountIDX int ) As SELECT userEXP FROM userGameDB WHERE accountIDX = @accountIDX GO /****** 개체: StoredProcedure [dbo].[web_get_game_connectionDate] 스크립트 날짜: 05/04/2012 14:07:53 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[web_get_game_connectionDate] ( @accountIDX int ) As SELECT connDate FROM userGameDB WITH(NOLOCK) WHERE accountIDX=@accountIDX GO /****** 개체: StoredProcedure [dbo].[web_play_fixkey_get_data] 스크립트 날짜: 05/04/2012 14:08:35 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[web_play_fixkey_get_data] As SELECT encodeKey FROM define_encode_key WHERE idx = (SELECT MAX(idx) FROM define_encode_key) GO /****** 개체: StoredProcedure [dbo].[web_fixkey_get_data] 스크립트 날짜: 05/04/2012 14:07:44 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[web_fixkey_get_data] As SELECT encodeKey FROM define_encode_key WHERE idx = (SELECT MAX(idx) FROM define_encode_key) GO /****** 개체: StoredProcedure [dbo].[AGENT_ENCODE_FIX_KEY_CREATE] 스크립트 날짜: 05/04/2012 14:05:37 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[AGENT_ENCODE_FIX_KEY_CREATE] As DECLARE @rndType tinyint, @i tinyint DECLARE @encodeKey varchar(15) SET @encodeKey = '' SET @i = 0 WHILE (@i < 15) BEGIN SET @rndType = Convert(tinyint, Round(rand() * 9 - 0.5,0)) if (@rndType % 3 = 0) SET @encodeKey = @encodeKey + char(Round(rand() * 10 - 0.5,0) + 48) else if (@rndType % 3 = 1) SET @encodeKey = @encodeKey + char(Round(rand() * 26 - 0.5,0) + 65) else SET @encodeKey = @encodeKey + char(Round(rand() * 26 - 0.5,0) + 97) SET @i = @i + 1 END INSERT INTO define_encodeKeyDB (encodeKey, regDate) VALUES (@encodeKey, getdate()) GO /****** 개체: StoredProcedure [dbo].[game_encode_get_fix_key] 스크립트 날짜: 05/04/2012 14:05:58 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[game_encode_get_fix_key] As SELECT encodeKey FROM define_encode_key WHERE idx = (SELECT MAX(idx) FROM define_encode_key) GO /****** 개체: StoredProcedure [dbo].[manage_adminTool_announce_get_data] 스크립트 날짜: 05/04/2012 14:07:24 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE Procedure [dbo].[manage_adminTool_announce_get_data] As SELECT Top 1 idx,content FROM gameAnnounce ORDER BY idx DESC GO /****** 개체: StoredProcedure [dbo].[z_nouse_game_fame_get_dec_top_n] 스크립트 날짜: 05/04/2012 14:09:00 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[z_nouse_game_fame_get_dec_top_n] ( @accountIDX int ) As SELECT ISNULL(SUM(CASE WHEN point < 0 THEN -point ELSE 0 END), 0) FROM (SELECT TOP 100 point FROM userMannerpointDB WHERE accountIDX=@accountIDX ORDER BY regDate DESC) a GO /****** 개체: StoredProcedure [dbo].[game_event_chuchun_get_data] 스크립트 날짜: 05/04/2012 14:05:58 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[game_event_chuchun_get_data] ( @accountIDX int ) AS SELECT idx, friendIDX FROM event_chuchun WITH(NOLOCK) WHERE accountIDX=@accountIDX GO /****** 개체: StoredProcedure [dbo].[game_event_chuchun_save] 스크립트 날짜: 05/04/2012 14:05:59 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[game_event_chuchun_save] ( @idx int ) AS UPDATE event_chuchun SET flag=1 WHERE idx=@idx GO /****** 개체: StoredProcedure [dbo].[web_guild_get_guild_count] 스크립트 날짜: 05/04/2012 14:07:56 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[web_guild_get_guild_count] ( @guildIDX int ) AS SELECT count(*) FROM userGuildDB WITH(NOLOCK) WHERE idx=@guildIDX GO /****** 개체: StoredProcedure [dbo].[web_guild_hp_visit_add] 스크립트 날짜: 05/04/2012 14:07:59 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[web_guild_hp_visit_add] ( @guildIDX int ) AS UPDATE userGuildDB SET today_vc = today_vc + 1 , total_vc = total_vc + 1 WHERE idx = @guildIDX GO /****** 개체: StoredProcedure [dbo].[web_guild_get_guildinfo] 스크립트 날짜: 05/04/2012 14:07:57 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[web_guild_get_guildinfo] ( @accountIDX int ) AS SELECT idx, guildName, guildmark, ranking, point, regionType FROM userGuildDB WITH(NOLOCK) WHERE idx=(SELECT guildIDX FROM userGuildInfoDB WITH(NOLOCK) WHERE accountIDX=@accountIDX) GO /****** 개체: StoredProcedure [dbo].[web_guild_hp_get_guild_info] 스크립트 날짜: 05/04/2012 14:07:58 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[web_guild_hp_get_guild_info] ( @guildIDX int ) AS SELECT guildName, aboutguild, guildmark, ranking, point, todaypoint, guildLevel, membercount, today_vc, total_vc, regionType, regDate FROM userGuildDB WITH(NOLOCK) WHERE idx=@guildIDX GO /****** 개체: StoredProcedure [dbo].[web_guild_get_todaypoint_top3] 스크립트 날짜: 05/04/2012 14:07:58 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[web_guild_get_todaypoint_top3] ( @regionType tinyint ) AS SELECT TOP 3 idx, guildName, guildmark FROM userGuildDB WITH(NOLOCK) WHERE regionType=@regionType and ranking > 0 ORDER BY ranking ASC GO /****** 개체: StoredProcedure [dbo].[web_guild_ranking_top5] 스크립트 날짜: 05/04/2012 14:08:01 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[web_guild_ranking_top5] ( @regionType tinyint ) AS SELECT TOP 5 idx, guildname, guildmark FROM userGuildDB WITH(NOLOCK) WHERE ranking > 0 and regionType=@regionType ORDER BY ranking ASC, point DESC GO /****** 개체: StoredProcedure [dbo].[web_guild_ranking_count] 스크립트 날짜: 05/04/2012 14:08:00 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[web_guild_ranking_count] ( @regionType tinyint ) AS If (@regionType > 0) BEGIN SELECT count(*) FROM userGuildDB WITH(NOLOCK) WHERE ranking > 0 and regionType = @regionType END ELSE BEGIN SELECT count(*) FROM userGuildDB WITH(NOLOCK) WHERE ranking > 0 END GO /****** 개체: StoredProcedure [dbo].[web_minihome_guild_get_info] 스크립트 날짜: 05/04/2012 14:08:25 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[web_minihome_guild_get_info] ( @guildIDX int ) AS SELECT guildname, guildmark FROM userGuildDB WITH(NOLOCK) WHERE idx=@guildIDX GO /****** 개체: StoredProcedure [dbo].[game_guild_ranking_point_save] 스크립트 날짜: 05/04/2012 14:06:21 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[game_guild_ranking_point_save] ( @guildIDX int , @ranking int , @point int , @todaypoint int , @guildLevel int , @maxcount int ) AS UPDATE userGuildDB SET ranking=@ranking , point=@point , todaypoint=@todaypoint , guildLevel=@guildLevel , maxcount=@maxcount WHERE idx=@guildIDX GO /****** 개체: StoredProcedure [dbo].[game_guild_delete] 스크립트 날짜: 05/04/2012 14:06:14 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[game_guild_delete] ( @guildIDX int ) AS DELETE FROM userGuildDB WHERE idx=@guildIDX DELETE FROM userGuildInfoDB WHERE guildIDX=@guildIDX GO /****** 개체: StoredProcedure [dbo].[web_memberout_delete_guild] 스크립트 날짜: 05/04/2012 14:08:20 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[web_memberout_delete_guild] ( @guildIDX int ) AS DELETE FROM userGuildDB WHERE idx=@guildIDX GO /****** 개체: StoredProcedure [dbo].[web_get_guidlIDX_to_guildname] 스크립트 날짜: 05/04/2012 14:07:53 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[web_get_guidlIDX_to_guildname] ( @guildName varchar(20) ) As SELECT idx FROM userGuildDB WITH(NOLOCK) WHERE guildName = @guildName GO /****** 개체: StoredProcedure [dbo].[web_get_guildname_to_guildIDX] 스크립트 날짜: 05/04/2012 14:07:53 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[web_get_guildname_to_guildIDX] ( @guildIDX int ) As SELECT guildName FROM userGuildDB WITH(NOLOCK) WHERE idx=@guildIDX GO /****** 개체: StoredProcedure [dbo].[game_questcomplete_save] 스크립트 날짜: 05/04/2012 14:07:17 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[game_questcomplete_save] ( @idx int , @quest1_type int , @quest1_time int , @quest2_type int , @quest2_time int , @quest3_type int , @quest3_time int , @quest4_type int , @quest4_time int , @quest5_type int , @quest5_time int , @quest6_type int , @quest6_time int , @quest7_type int , @quest7_time int , @quest8_type int , @quest8_time int , @quest9_type int , @quest9_time int , @quest10_type int , @quest10_time int , @quest11_type int , @quest11_time int , @quest12_type int , @quest12_time int , @quest13_type int , @quest13_time int , @quest14_type int , @quest14_time int , @quest15_type int , @quest15_time int , @quest16_type int , @quest16_time int , @quest17_type int , @quest17_time int , @quest18_type int , @quest18_time int , @quest19_type int , @quest19_time int , @quest20_type int , @quest20_time int ) AS UPDATE userQuestCompleteDB SET quest1_type = @quest1_type , quest1_time = @quest1_time , quest2_type = @quest2_type , quest2_time = @quest2_time , quest3_type = @quest3_type , quest3_time = @quest3_time , quest4_type = @quest4_type , quest4_time = @quest4_time , quest5_type = @quest5_type , quest5_time = @quest5_time , quest6_type = @quest6_type , quest6_time = @quest6_time , quest7_type = @quest7_type , quest7_time = @quest7_time , quest8_type = @quest8_type , quest8_time = @quest8_time , quest9_type = @quest9_type , quest9_time = @quest9_time , quest10_type = @quest10_type , quest10_time = @quest10_time , quest11_type = @quest11_type , quest11_time = @quest11_time , quest12_type = @quest12_type , quest12_time = @quest12_time , quest13_type = @quest13_type , quest13_time = @quest13_time , quest14_type = @quest14_type , quest14_time = @quest14_time , quest15_type = @quest15_type , quest15_time = @quest15_time , quest16_type = @quest16_type , quest16_time = @quest16_time , quest17_type = @quest17_type , quest17_time = @quest17_time , quest18_type = @quest18_type , quest18_time = @quest18_time , quest19_type = @quest19_type , quest19_time = @quest19_time , quest20_type = @quest20_type , quest20_time = @quest20_time WHERE idx = @idx GO /****** 개체: StoredProcedure [dbo].[game_questcomplete_get_self_index] 스크립트 날짜: 05/04/2012 14:07:14 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[game_questcomplete_get_self_index] ( @accountIDX int ) AS SELECT Max(idx) FROM userQuestCompleteDB WHERE accountIDX = @accountIDX GO /****** 개체: StoredProcedure [dbo].[game_questcomplete_add] 스크립트 날짜: 05/04/2012 14:07:14 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[game_questcomplete_add] ( @accountIDX int , @quest1_type int , @quest1_time int , @quest2_type int , @quest2_time int , @quest3_type int , @quest3_time int , @quest4_type int , @quest4_time int , @quest5_type int , @quest5_time int , @quest6_type int , @quest6_time int , @quest7_type int , @quest7_time int , @quest8_type int , @quest8_time int , @quest9_type int , @quest9_time int , @quest10_type int , @quest10_time int , @quest11_type int , @quest11_time int , @quest12_type int , @quest12_time int , @quest13_type int , @quest13_time int , @quest14_type int , @quest14_time int , @quest15_type int , @quest15_time int , @quest16_type int , @quest16_time int , @quest17_type int , @quest17_time int , @quest18_type int , @quest18_time int , @quest19_type int , @quest19_time int , @quest20_type int , @quest20_time int ) AS INSERT INTO userQuestCompleteDB (accountIDX, quest1_type, quest1_time, quest2_type, quest2_time, quest3_type, quest3_time, quest4_type, quest4_time, quest5_type, quest5_time, quest6_type, quest6_time, quest7_type, quest7_time, quest8_type, quest8_time, quest9_type, quest9_time, quest10_type, quest10_time, quest11_type, quest11_time, quest12_type, quest12_time, quest13_type, quest13_time, quest14_type, quest14_time, quest15_type, quest15_time, quest16_type, quest16_time, quest17_type, quest17_time, quest18_type, quest18_time, quest19_type, quest19_time, quest20_type, quest20_time) VALUES (@accountIDX, @quest1_type, @quest1_time, @quest2_type, @quest2_time, @quest3_type, @quest3_time, @quest4_type, @quest4_time, @quest5_type, @quest5_time, @quest6_type, @quest6_time, @quest7_type, @quest7_time, @quest8_type, @quest8_time, @quest9_type, @quest9_time, @quest10_type, @quest10_time, @quest11_type, @quest11_time, @quest12_type, @quest12_time, @quest13_type, @quest13_time, @quest14_type, @quest14_time, @quest15_type, @quest15_time, @quest16_type, @quest16_time, @quest17_type, @quest17_time, @quest18_type, @quest18_time, @quest19_type, @quest19_time, @quest20_type, @quest20_time) GO /****** 개체: StoredProcedure [dbo].[game_questcomplete_get_list] 스크립트 날짜: 05/04/2012 14:07:14 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[game_questcomplete_get_list] ( @accountIDX int ) AS SELECT idx, quest1_type, quest1_time, quest2_type, quest2_time, quest3_type, quest3_time, quest4_type, quest4_time, quest5_type, quest5_time, quest6_type, quest6_time, quest7_type, quest7_time, quest8_type, quest8_time, quest9_type, quest9_time, quest10_type, quest10_time, quest11_type, quest11_time, quest12_type, quest12_time, quest13_type, quest13_time, quest14_type, quest14_time, quest15_type, quest15_time, quest16_type, quest16_time, quest17_type, quest17_time, quest18_type, quest18_time, quest19_type, quest19_time, quest20_type, quest20_time FROM userQuestCompleteDB WHERE accountIDX = @accountIDX GO /****** 개체: StoredProcedure [dbo].[web_quest_get_data] 스크립트 날짜: 05/04/2012 14:08:37 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[web_quest_get_data] ( @accountIDX int ) AS SELECT quest1_type, quest1_time, quest2_type, quest2_time, quest3_type, quest3_time, quest4_type, quest4_time, quest5_type, quest5_time, quest6_type, quest6_time, quest7_type, quest7_time, quest8_type, quest8_time, quest9_type, quest9_time, quest10_type, quest10_time, quest11_type, quest11_time, quest12_type, quest12_time, quest13_type, quest13_time, quest14_type, quest14_time, quest15_type, quest15_time, quest16_type, quest16_time, quest17_type, quest17_time, quest18_type, quest18_time, quest19_type, quest19_time, quest20_type, quest20_time FROM userQuestCompleteDB WHERE accountIDX=@accountIDX GO /****** 개체: StoredProcedure [dbo].[game_item_medal_extend_add] 스크립트 날짜: 05/04/2012 14:06:48 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[game_item_medal_extend_add] ( @accountIDX int , @medal1_class int , @medal1_slot tinyint , @medal1_period int , @medal2_class int , @medal2_slot tinyint , @medal2_period int , @medal3_class int , @medal3_slot tinyint , @medal3_period int , @medal4_class int , @medal4_slot tinyint , @medal4_period int , @medal5_class int , @medal5_slot tinyint , @medal5_period int , @medal6_class int , @medal6_slot tinyint , @medal6_period int , @medal7_class int , @medal7_slot tinyint , @medal7_period int , @medal8_class int , @medal8_slot tinyint , @medal8_period int , @medal9_class int , @medal9_slot tinyint , @medal9_period int , @medal10_class int , @medal10_slot tinyint , @medal10_period int ) AS INSERT INTO dbo.userItemMedalExtendDB ( accountIDX, medal1_class, medal1_slot, medal1_period, medal2_class, medal2_slot, medal2_period, medal3_class, medal3_slot, medal3_period, medal4_class, medal4_slot, medal4_period, medal5_class, medal5_slot, medal5_period, medal6_class, medal6_slot, medal6_period, medal7_class, medal7_slot, medal7_period, medal8_class, medal8_slot, medal8_period, medal9_class, medal9_slot, medal9_period, medal10_class, medal10_slot, medal10_period, regDate ) VALUES ( @accountIDX, @medal1_class, @medal1_slot, @medal1_period, @medal2_class, @medal2_slot, @medal2_period, @medal3_class, @medal3_slot, @medal3_period, @medal4_class, @medal4_slot, @medal4_period, @medal5_class, @medal5_slot, @medal5_period, @medal6_class, @medal6_slot, @medal6_period, @medal7_class, @medal7_slot, @medal7_period, @medal8_class, @medal8_slot, @medal8_period, @medal9_class, @medal9_slot, @medal9_period, @medal10_class, @medal10_slot, @medal10_period, GETDATE() ) GO /****** 개체: StoredProcedure [dbo].[game_item_medal_extend_get_list] 스크립트 날짜: 05/04/2012 14:06:48 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[game_item_medal_extend_get_list] ( @accountIDX int ) AS SELECT idx, medal1_class, medal1_slot, medal1_period, medal2_class, medal2_slot, medal2_period, medal3_class, medal3_slot, medal3_period, medal4_class, medal4_slot, medal4_period, medal5_class, medal5_slot, medal5_period, medal6_class, medal6_slot, medal6_period, medal7_class, medal7_slot, medal7_period, medal8_class, medal8_slot, medal8_period, medal9_class, medal9_slot, medal9_period, medal10_class, medal10_slot, medal10_period FROM dbo.userItemMedalExtendDB WITH(NOLOCK) WHERE accountIDX = @accountIDX GO /****** 개체: StoredProcedure [dbo].[game_item_medal_extend_save] 스크립트 날짜: 05/04/2012 14:06:50 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[game_item_medal_extend_save] ( @idx int , @medal1_class int , @medal1_slot tinyint , @medal1_period int , @medal2_class int , @medal2_slot tinyint , @medal2_period int , @medal3_class int , @medal3_slot tinyint , @medal3_period int , @medal4_class int , @medal4_slot tinyint , @medal4_period int , @medal5_class int , @medal5_slot tinyint , @medal5_period int , @medal6_class int , @medal6_slot tinyint , @medal6_period int , @medal7_class int , @medal7_slot tinyint , @medal7_period int , @medal8_class int , @medal8_slot tinyint , @medal8_period int , @medal9_class int , @medal9_slot tinyint , @medal9_period int , @medal10_class int , @medal10_slot tinyint , @medal10_period int ) AS UPDATE dbo.userItemMedalExtendDB SET medal1_class = @medal1_class , medal1_slot = @medal1_slot , medal1_period = @medal1_period , medal2_class = @medal2_class , medal2_slot = @medal2_slot , medal2_period = @medal2_period , medal3_class = @medal3_class , medal3_slot = @medal3_slot , medal3_period = @medal3_period , medal4_class = @medal4_class , medal4_slot = @medal4_slot , medal4_period = @medal4_period , medal5_class = @medal5_class , medal5_slot = @medal5_slot , medal5_period = @medal5_period , medal6_class = @medal6_class , medal6_slot = @medal6_slot , medal6_period = @medal6_period , medal7_class = @medal7_class , medal7_slot = @medal7_slot , medal7_period = @medal7_period , medal8_class = @medal8_class , medal8_slot = @medal8_slot , medal8_period = @medal8_period , medal9_class = @medal9_class , medal9_slot = @medal9_slot , medal9_period = @medal9_period , medal10_class = @medal10_class , medal10_slot = @medal10_slot , medal10_period = @medal10_period WHERE idx = @idx GO /****** 개체: StoredProcedure [dbo].[game_item_medal_extend_get_self_index] 스크립트 날짜: 05/04/2012 14:06:48 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[game_item_medal_extend_get_self_index] ( @accountIDX int ) AS SELECT TOP 1 idx FROM dbo.userItemMedalExtendDB WHERE accountIDX = @accountIDX ORDER BY idx DESC GO /****** 개체: StoredProcedure [dbo].[game_trade_add] 스크립트 날짜: 05/04/2012 14:07:23 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[game_trade_add] ( @accountIDX int , @itemType int , @value1 int , @value2 int , @price bigint , @mcustom int , @fcustom int , @userIP varchar(16) , @periodDate int ) AS INSERT INTO userTradeDB (accountIDX, itemType, value1, value2, price, mcustom, fcustom, userIP, periodDate, regDate) VALUES (@accountIDX, @itemType, @value1, @value2, @price, @mcustom, @fcustom, @userIP, @periodDate, getdate()) GO /****** 개체: StoredProcedure [dbo].[game_trade_get_list] 스크립트 날짜: 05/04/2012 14:07:23 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[game_trade_get_list] ( @topn int , @idx int ) AS SELECT TOP (@topn) a.idx, a.accountIDX, b.nickName, a.itemType, a.value1, a.value2, a.price, a.mcustom, a.fcustom, a.periodDate, a.regDate FROM userTradeDB a WITH(NOLOCK) JOIN userMemberDB b WITH(NOLOCK) ON a.accountIDX = b.accountIDX WHERE a.idx < @idx ORDER BY a.idx DESC GO /****** 개체: StoredProcedure [dbo].[game_fish_add] 스크립트 날짜: 05/04/2012 14:06:03 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[game_fish_add] ( @accountIDX int , @fish1_type tinyint , @fish1_an int , @fish2_type tinyint , @fish2_an int , @fish3_type tinyint , @fish3_an int , @fish4_type tinyint , @fish4_an int , @fish5_type tinyint , @fish5_an int , @fish6_type tinyint , @fish6_an int , @fish7_type tinyint , @fish7_an int , @fish8_type tinyint , @fish8_an int , @fish9_type tinyint , @fish9_an int , @fish10_type tinyint , @fish10_an int , @fish11_type tinyint , @fish11_an int , @fish12_type tinyint , @fish12_an int , @fish13_type tinyint , @fish13_an int , @fish14_type tinyint , @fish14_an int , @fish15_type tinyint , @fish15_an int , @fish16_type tinyint , @fish16_an int , @fish17_type tinyint , @fish17_an int , @fish18_type tinyint , @fish18_an int , @fish19_type tinyint , @fish19_an int , @fish20_type tinyint , @fish20_an int ) AS INSERT INTO userFishDB ( accountIDX, fish1_type, fish1_an, fish2_type, fish2_an, fish3_type, fish3_an, fish4_type, fish4_an, fish5_type, fish5_an, fish6_type, fish6_an, fish7_type, fish7_an, fish8_type, fish8_an, fish9_type, fish9_an, fish10_type, fish10_an, fish11_type, fish11_an, fish12_type, fish12_an, fish13_type, fish13_an, fish14_type, fish14_an, fish15_type, fish15_an, fish16_type, fish16_an, fish17_type, fish17_an, fish18_type, fish18_an, fish19_type, fish19_an, fish20_type, fish20_an, regDate ) VALUES ( @accountIDX, @fish1_type, @fish1_an, @fish2_type, @fish2_an, @fish3_type, @fish3_an, @fish4_type, @fish4_an, @fish5_type, @fish5_an, @fish6_type, @fish6_an, @fish7_type, @fish7_an, @fish8_type, @fish8_an, @fish9_type, @fish9_an, @fish10_type, @fish10_an, @fish11_type, @fish11_an, @fish12_type, @fish12_an, @fish13_type, @fish13_an, @fish14_type, @fish14_an, @fish15_type, @fish15_an, @fish16_type, @fish16_an, @fish17_type, @fish17_an, @fish18_type, @fish18_an, @fish19_type, @fish19_an, @fish20_type, @fish20_an, getdate() ) GO /****** 개체: StoredProcedure [dbo].[usp_web_challing_idx_srch] 스크립트 날짜: 05/04/2012 14:07:28 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO /*========================================================================== ' 작 성 : 이수진 [2011-10-25] ' 용 도 : 채널링 타입으로 정보 있는지 조회 ' RETURN : 1 : 성공 -1 ~ -10 : 실패 ==========================================================================*/ --DROP PROC usp_web_challing_idx_srch --GO CREATE PROC [dbo].[usp_web_challing_idx_srch] @nCpIDX int, -- 채널링IDX @nCpType int -- CP타입(300:엠게임, 400:엠게임, 500:버디버디, 600:네이버, 700:투니랜드) AS BEGIN SET NOCOUNT ON SELECT accountIDX, cpID FROM userCooperationDB WITH (NOLOCK) WHERE cpIDX = @nCpIDX AND cpType = @nCpType SET NOCOUNT OFF END GO /****** 개체: StoredProcedure [dbo].[web_channeling_member_count] 스크립트 날짜: 05/04/2012 14:07:33 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[web_channeling_member_count] ( @cpID varchar(20) , @cpType int ) AS SELECT count(*) FROM userCooperationDB WHERE cpID=@cpID and cpType=@cpType GO /****** 개체: StoredProcedure [dbo].[web_channeling_member_get_userID] 스크립트 날짜: 05/04/2012 14:07:33 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[web_channeling_member_get_userID] ( @cpID varchar(20) , @cpType int ) AS SELECT userID FROM userCooperationDB WHERE cpID=@cpID and cpType=@cpType GO /****** 개체: StoredProcedure [dbo].[web_member_cpID_count] 스크립트 날짜: 05/04/2012 14:08:16 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[web_member_cpID_count] ( @cpID varchar(20) , @cpType smallint ) AS SELECT count(*) FROM userCooperationDB WHERE cpID=@cpID and cpType=@cpType GO /****** 개체: StoredProcedure [dbo].[web_play_mgameIDX] 스크립트 날짜: 05/04/2012 14:08:36 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[web_play_mgameIDX] ( @accountIDX int ) AS SELECT cpID, cpIDX FROM userCooperationDB WHERE accountIDX=@accountIDX and cpType=300 GO /****** 개체: StoredProcedure [dbo].[web_get_accountIDX_to_cpID] 스크립트 날짜: 05/04/2012 14:07:51 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[web_get_accountIDX_to_cpID] ( @cpID varchar(20) , @cpType int ) As SELECT accountIDX, cpID FROM userCooperationDB WHERE cpID=@cpID and cpType=@cpType GO /****** 개체: StoredProcedure [dbo].[web_get_accountIDX_to_naverIDX] 스크립트 날짜: 05/04/2012 14:07:52 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[web_get_accountIDX_to_naverIDX] ( @naverIDX int ) As SELECT accountIDX, cpID FROM userCooperationDB WHERE note=@naverIDX and cpType=600 GO /****** 개체: StoredProcedure [dbo].[web_ranking_medal_count] 스크립트 날짜: 05/04/2012 14:08:40 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[web_ranking_medal_count] AS SELECT count(*) FROM userRankingDB_medal GO /****** 개체: StoredProcedure [dbo].[web_ranking_myinfo_medal_uplevel_count] 스크립트 날짜: 05/04/2012 14:08:43 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[web_ranking_myinfo_medal_uplevel_count] ( @accountIDX int ) AS SELECT count(*) FROM userRankingDB_medal WHERE ranking_now > 0 and ranking_now < (SELECT ranking_now FROM userRankingDB_medal WHERE accountidx=@accountIDX) GO /****** 개체: StoredProcedure [dbo].[web_ranking_myinfo_get_medal_ranking] 스크립트 날짜: 05/04/2012 14:08:42 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[web_ranking_myinfo_get_medal_ranking] ( @accountIDX int ) AS SELECT ranking_now, medalLevel, expert FROM userRankingDB_medal WHERE accountidx=@accountIDX GO /****** 개체: StoredProcedure [dbo].[web_minihome_userinfo_all_medal_level] 스크립트 날짜: 05/04/2012 14:08:29 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[web_minihome_userinfo_all_medal_level] ( @accountIDX int ) AS SELECT medalLevel, expert FROM userRankingDB_medal WHERE accountIDX=@accountIDX GO /****** 개체: StoredProcedure [dbo].[game_medal_get_level] 스크립트 날짜: 05/04/2012 14:06:57 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[game_medal_get_level] ( @accountIDX int ) AS SELECT medalLevel, expert FROM userRankingDB_medal WHERE accountIDX=@accountIDX GO /****** 개체: StoredProcedure [dbo].[web_medal_get_level] 스크립트 날짜: 05/04/2012 14:08:09 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[web_medal_get_level] ( @accountIDX int ) AS SELECT medalLevel, expert FROM userRankingDB_medal WHERE accountIDX = @accountIDX GO /****** 개체: StoredProcedure [dbo].[web_event_present_add] 스크립트 날짜: 05/04/2012 14:07:41 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[web_event_present_add] ( @accountIDX int , @presentType int , @value1 int , @value2 int , @value3 int , @value4 int , @msgType int , @limitDate varchar(10) ) AS INSERT INTO userPresentDB (sendIDX, receiveIDX, presentType, value1, value2, value3, value4, msgType, flag, limitDate, regDate) VALUES (1105, @accountIDX, @presentType, @value1, @value2, @value3, @value4, @msgType, 1, CONVERT(datetime, @limitDate, 121), getdate()) INSERT INTO Log_Data.DBO.log_present (accountIDX, nickname, receiveIDX, presentType, value1, value2, eventType, userIP, note, regDate) VALUES (1105, '개발자K', @accountIDX, @presentType, @value1, @value2, 6, '127.0.0.1', '웹 이벤트 아이템 지급', getdate()) GO /****** 개체: StoredProcedure [dbo].[web_event_login_bonus_peso] 스크립트 날짜: 05/04/2012 14:07:40 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[web_event_login_bonus_peso] ( @accountIDX varchar(12) , @bonusCash int , @userIP varchar(16) ) AS INSERT INTO userPresentDB (sendIDX, receiveIDX, presentType, value1, value2, msgType, flag, limitDate, regDate) VALUES (1105, @accountIDX, 4, @bonusCash, 0, 4, 1, getdate() + 28, getdate()) INSERT INTO LosaGame_log.DBO.log_cash (accountIDX, userIP, [DBID], applyType, amount, note, regDate) VALUES (@accountIDX, @userIP, 'LOGIN', 'B0', @bonusCash, '로그인 보너스 페소', getdate()) GO /****** 개체: StoredProcedure [dbo].[game_present_save] 스크립트 날짜: 05/04/2012 14:07:01 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[game_present_save] ( @tblIDX int , @flag smallint ) AS UPDATE userPresentDB SET flag=@flag WHERE idx=@tblIDX GO /****** 개체: StoredProcedure [dbo].[web_event_recommend_use] 스크립트 날짜: 05/04/2012 14:07:43 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[web_event_recommend_use] ( @accountIDX int , @presentType int , @value1 int , @value2 int , @mypoint int , @userIP varchar(15) , @limitdate varchar(20) ) AS UPDATE event_recommend SET nowpoint=0 WHERE accountIDX=@accountIDX INSERT INTO userPresentDB (sendIDX, receiveIDX, presentType, value1, value2, msgType, flag, limitDate, regDate) VALUES (1105, @accountIDX, @presentType, @value1, @value2, 3, 1, @limitdate, getdate()) INSERT INTO LosaGame_log.DBO.log_event_recommend_use (accountIDX, presentType, value1, value2, nowpoint, userIP, regDate) VALUES (@accountIDX, @presentType, @value1, @value2, @mypoint, @userIP, getdate()) GO /****** 개체: StoredProcedure [dbo].[web_event_banner_click_bonus_peso] 스크립트 날짜: 05/04/2012 14:07:40 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[web_event_banner_click_bonus_peso] ( @accountIDX varchar(12) , @bonusCash int , @userIP varchar(16) ) AS UPDATE userInfoDB SET clickDate = getdate() WHERE accountIDX=@accountIDX INSERT INTO userPresentDB (sendIDX, receiveIDX, presentType, value1, value2, msgType, flag, limitDate, regDate) VALUES (1105, @accountIDX, 4, @bonusCash, 0, 4, 1, getdate() + 28, getdate()) INSERT INTO LosaGame_log.DBO.log_cash (accountIDX, userIP, [DBID], applyType, amount, note, regDate) VALUES (@accountIDX, @userIP, 'BNNCLICK', 'B0', @bonusCash, '배너 클릭 보너스 페소', getdate()) GO /****** 개체: StoredProcedure [dbo].[game_present_count] 스크립트 날짜: 05/04/2012 14:07:00 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[game_present_count] ( @nickName varchar(20) ) AS DECLARE @accountIDX int, @cnt int SET @accountIDX = (SELECT accountIDX FROM userMemberDB WHERE nickName=@nickName) SET @cnt = (SELECT count(*) FROM userPresentDB WHERE receiveIDX=@accountIDX and flag not in (2)) IF (@accountIDX is null) BEGIN SELECT accountIDX, accountIDX AS 'cnt' FROM userMemberDB WHERE nickName=@nickName END ELSE BEGIN SELECT @accountIDX AS 'accountIDX', @cnt AS 'cnt' END GO /****** 개체: StoredProcedure [dbo].[game_present_add_idx] 스크립트 날짜: 05/04/2012 14:07:00 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[game_present_add_idx] ( @sendIDX int , @receiveIDX int , @persentType smallint , @value1 int , @value2 int , @value3 int , @value4 int , @msgType smallint , @limitDate datetime , @flag smallint ) AS INSERT INTO userPresentDB (sendIDX, receiveIDX, presentType, value1, value2, value3, value4, msgType, flag, limitDate, regDate) VALUES (@sendIDX, @receiveIDX, @persentType, @value1, @value2, @value3, @value4, @msgType, @flag, @limitDate, getdate()) GO /****** 개체: StoredProcedure [dbo].[web_coupon_give_coupon] 스크립트 날짜: 05/04/2012 14:07:36 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[web_coupon_give_coupon] ( @accountIDX int , @serial varchar(12) , @userIP varchar(15) , @flag tinyint ) AS BEGIN TRAN UPDATE define_serial SET accountIDX = @accountIDX , userIP = @userIP , regDate = getdate() WHERE sn=@serial and couponType=@flag INSERT INTO userPresentDB (sendIDX, receiveIDX, presentType, value1, value2, msgType, flag, limitDate, regDate) VALUES (350095, @accountIDX, 4, 10000, 0, 3, 1, getdate() + 28, getdate()) COMMIT TRAN GO /****** 개체: StoredProcedure [dbo].[web_coupon_use_coupon_and_give_medal] 스크립트 날짜: 05/04/2012 14:07:37 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[web_coupon_use_coupon_and_give_medal] ( @accountIDX int , @serial varchar(12) , @userIP varchar(15) , @flag tinyint , @medalIDX int ) AS BEGIN TRAN UPDATE define_serial SET accountIDX = @accountIDX , userIP = @userIP , regDate = getdate() WHERE sn=@serial and couponType=@flag INSERT INTO userPresentDB (sendIDX, receiveIDX, presentType, value1, value2, msgType, flag, limitDate, regDate) values (1105, @accountIDX, 9, 244, 0, 3, 0, getdate()+90, getdate()) COMMIT TRAN GO /****** 개체: StoredProcedure [dbo].[web_coupon_use_coupon_and_give_peso] 스크립트 날짜: 05/04/2012 14:07:37 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[web_coupon_use_coupon_and_give_peso] ( @accountIDX int , @serial varchar(12) , @userIP varchar(15) , @flag tinyint ) AS BEGIN TRAN UPDATE define_serial SET accountIDX = @accountIDX , userIP = @userIP , regDate = getdate() WHERE sn=@serial and couponType=@flag INSERT INTO userPresentDB (sendIDX, receiveIDX, presentType, value1, value2, msgType, flag, limitDate, regDate) VALUES (350095, @accountIDX, 4, 10000, 0, 3, 1, getdate() + 28, getdate()) COMMIT TRAN GO /****** 개체: StoredProcedure [dbo].[web_coupon_use_coupon_and_give_rndgear] 스크립트 날짜: 05/04/2012 14:07:38 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[web_coupon_use_coupon_and_give_rndgear] ( @accountIDX int , @serial varchar(12) , @userIP varchar(15) , @flag tinyint ) AS BEGIN TRAN UPDATE define_serial SET accountIDX = @accountIDX , userIP = @userIP , regDate = getdate() WHERE sn=@serial and couponType=@flag INSERT INTO userPresentDB (sendIDX, receiveIDX, presentType, value1, value2, msgType, flag, limitDate, regDate) VALUES (350095, @accountIDX, 6, 1, 1960, 3, 1, getdate() + 28, getdate()) COMMIT TRAN GO /****** 개체: StoredProcedure [dbo].[web_coupon_use_coupon_and_give_rndclass] 스크립트 날짜: 05/04/2012 14:07:38 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[web_coupon_use_coupon_and_give_rndclass] ( @accountIDX int , @serial varchar(12) , @userIP varchar(15) , @flag tinyint ) AS BEGIN TRAN UPDATE define_serial SET accountIDX = @accountIDX , userIP = @userIP , regDate = getdate() WHERE sn=@serial and couponType=@flag INSERT INTO userPresentDB (sendIDX, receiveIDX, presentType, value1, value2, msgType, flag, limitDate, regDate) VALUES (350095, @accountIDX, 3, 1000022, 1, 3, 1, getdate() + 28, getdate()) COMMIT TRAN GO /****** 개체: StoredProcedure [dbo].[web_present_add] 스크립트 날짜: 05/04/2012 14:08:37 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[web_present_add] ( @sendIDX int , @receiveIDX int , @persentType smallint , @value1 int , @value2 int , @msgType smallint , @limitDate datetime , @flag smallint ) AS INSERT INTO userPresentDB (sendIDX, receiveIDX, presentType, value1, value2, msgType, flag, limitDate, regDate) VALUES (@sendIDX, @receiveIDX, @persentType, @value1, @value2, @msgType, @flag, @limitDate, getdate()) GO /****** 개체: StoredProcedure [dbo].[game_present_add] 스크립트 날짜: 05/04/2012 14:07:00 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[game_present_add] ( @sendNick varchar(20) , @receiveNick varchar(20) , @persentType smallint , @value1 int , @value2 int , @value3 int , @value4 int , @msgType smallint , @limitDate datetime , @flag smallint ) AS DECLARE @sendIDX int, @receiveIDX int SET @sendIDX = (SELECT accountIDX FROM userMemberDB WHERE nickName=@sendNick) SET @receiveIDX = (SELECT accountIDX FROM userMemberDB WHERE nickName=@receiveNick) INSERT INTO userPresentDB (sendIDX, receiveIDX, presentType, value1, value2, value3, value4, msgType, flag, limitDate, regDate) VALUES (@sendIDX, @receiveIDX, @persentType, @value1, @value2, @value3, @value4, @msgType, @flag, @limitDate, getdate()) GO /****** 개체: StoredProcedure [dbo].[game_present_get_list] 스크립트 날짜: 05/04/2012 14:07:01 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[game_present_get_list] ( @idx int , @receiveIDX int , @topN int ) AS SELECT TOP (@topN) a.idx, a.sendIDX, isNull(b.nickName, '탈퇴 회원'), a.presentType, a.value1, a.value2, a.value3, a.value4, a.msgType, a.flag, a.limitDate FROM userPresentDB a WITH(NOLOCK) Left join userMemberDB b WITH(NOLOCK) ON a.sendIDX = b.accountIDX WHERE a.receiveIDX = @receiveIDX AND a.idx > @idx ORDER BY a.idx ASC GO /****** 개체: StoredProcedure [dbo].[game_config_keyboard_get_data] 스크립트 날짜: 05/04/2012 14:05:57 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[game_config_keyboard_get_data] ( @accountIDX int ) AS SELECT keyvalue FROM userConfigDB WHERE accountIDX=@accountIDX GO /****** 개체: StoredProcedure [dbo].[game_config_keyboard_save] 스크립트 날짜: 05/04/2012 14:05:58 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[game_config_keyboard_save] ( @accountIDX int , @keyvalue varchar(200) ) AS If (Exists(SELECT * FROM userConfigDB WHERE accountIDX=@accountIDX)) BEGIN UPDATE userConfigDB SET keyvalue=@keyvalue WHERE accountIDX=@accountIDX END ELSE BEGIN INSERT INTO userConfigDB (accountIDX, keyvalue, regDate) VALUES (@accountIDX, @keyvalue, getdate()) END GO /****** 개체: StoredProcedure [dbo].[web_minihome_ui_index_get_award_exp] 스크립트 날짜: 05/04/2012 14:08:27 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[web_minihome_ui_index_get_award_exp] ( @userID varchar(12) ) As SELECT ISNULL(SUM(award1_point), 0), ISNULL(SUM(award2_point), 0), ISNULL(SUM(award3_point), 0), ISNULL(SUM(award4_point), 0), ISNULL(SUM(award5_point), 0), ISNULL(SUM(award6_point), 0), ISNULL(SUM(award7_point), 0), ISNULL(SUM(award8_point), 0), ISNULL(SUM(award9_point), 0), ISNULL(SUM(award10_point), 0) FROM userAwardDB WHERE accountIDX = (SELECT accountIDX FROM LosaWeb.DBO.userMemberDB WHERE userID = @userID) GO /****** 개체: StoredProcedure [dbo].[web_minihome_ui_award_data] 스크립트 날짜: 05/04/2012 14:08:26 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[web_minihome_ui_award_data] ( @userID varchar(12) ) As SELECT award1_type, award1_point, award2_type, award2_point, award3_type, award3_point, award4_type, award4_point, award5_type, award5_point, award6_type, award6_point, award7_type, award7_point, award8_type, award8_point, award9_type, award9_point, award10_type, award10_point FROM userAwardDB WHERE accountIDX=(SELECT accountIDX FROM userGameDB WHERE userID=@userID) GO /****** 개체: StoredProcedure [dbo].[game_award_get_self_index] 스크립트 날짜: 05/04/2012 14:05:46 ******/ SET ANSI_NULLS OFF GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[game_award_get_self_index] ( @accountIDX int ) As SELECT MAX(idx) FROM userAwardDB WHERE accountIDX = @accountIDX GO /****** 개체: StoredProcedure [dbo].[web_minihome_userinfo_award_data] 스크립트 날짜: 05/04/2012 14:08:30 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[web_minihome_userinfo_award_data] ( @accountIDX int ) As SELECT award1_type, award1_point, award2_type, award2_point, award3_type, award3_point, award4_type, award4_point, award5_type, award5_point, award6_type, award6_point, award7_type, award7_point, award8_type, award8_point, award9_type, award9_point, award10_type, award10_point FROM userAwardDB WHERE accountIDX=@accountIDX GO /****** 개체: StoredProcedure [dbo].[game_award_save] 스크립트 날짜: 05/04/2012 14:05:48 ******/ SET ANSI_NULLS OFF GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[game_award_save] ( @idx int , @award1_type int , @award1_number int , @award1_point int , @award2_type int , @award2_number int , @award2_point int , @award3_type int , @award3_number int , @award3_point int , @award4_type int , @award4_number int , @award4_point int , @award5_type int , @award5_number int , @award5_point int , @award6_type int , @award6_number int , @award6_point int , @award7_type int , @award7_number int , @award7_point int , @award8_type int , @award8_number int , @award8_point int , @award9_type int , @award9_number int , @award9_point int , @award10_type int , @award10_number int , @award10_point int ) As Update userAwardDB Set award1_type = @award1_type , award1_number = @award1_number , award1_point = @award1_point , award2_type = @award2_type , award2_number = @award2_number , award2_point = @award2_point , award3_type = @award3_type , award3_number = @award3_number , award3_point = @award3_point , award4_type = @award4_type , award4_number = @award4_number , award4_point = @award4_point , award5_type = @award5_type , award5_number = @award5_number , award5_point = @award5_point , award6_type = @award6_type , award6_number = @award6_number , award6_point = @award6_point , award7_type = @award7_type , award7_number = @award7_number , award7_point = @award7_point , award8_type = @award8_type , award8_number = @award8_number , award8_point = @award8_point , award9_type = @award9_type , award9_number = @award9_number , award9_point = @award9_point , award10_type = @award10_type , award10_number = @award10_number , award10_point = @award10_point Where idx=@idx GO /****** 개체: StoredProcedure [dbo].[game_award_add] 스크립트 날짜: 05/04/2012 14:05:46 ******/ SET ANSI_NULLS OFF GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[game_award_add] ( @accountIDX int , @award1_type int , @award1_number int , @award1_point int , @award2_type int , @award2_number int , @award2_point int , @award3_type int , @award3_number int , @award3_point int , @award4_type int , @award4_number int , @award4_point int , @award5_type int , @award5_number int , @award5_point int , @award6_type int , @award6_number int , @award6_point int , @award7_type int , @award7_number int , @award7_point int , @award8_type int , @award8_number int , @award8_point int , @award9_type int , @award9_number int , @award9_point int , @award10_type int , @award10_number int , @award10_point int ) As Insert into userAwardDB (accountIDX, award1_type, award1_number, award1_point, award2_type, award2_number, award2_point, award3_type, award3_number, award3_point, award4_type, award4_number, award4_point, award5_type, award5_number, award5_point, award6_type, award6_number, award6_point, award7_type, award7_number, award7_point, award8_type, award8_number, award8_point, award9_type, award9_number, award9_point, award10_type, award10_number, award10_point, regDate ) values (@accountIDX, @award1_type, @award1_number, @award1_point, @award2_type, @award2_number, @award2_point, @award3_type, @award3_number, @award3_point, @award4_type, @award4_number, @award4_point, @award5_type, @award5_number, @award5_point, @award6_type, @award6_number, @award6_point, @award7_type, @award7_number, @award7_point, @award8_type, @award8_number, @award8_point, @award9_type, @award9_number, @award9_point, @award10_type, @award10_number, @award10_point, getdate() ) GO /****** 개체: StoredProcedure [dbo].[web_ranking_myinfo_award_data] 스크립트 날짜: 05/04/2012 14:08:41 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[web_ranking_myinfo_award_data] ( @accountIDX int ) As SELECT award1_type, award1_point, award2_type, award2_point, award3_type, award3_point, award4_type, award4_point, award5_type, award5_point, award6_type, award6_point, award7_type, award7_point, award8_type, award8_point, award9_type, award9_point, award10_type, award10_point FROM userAwardDB WHERE accountIDX=@accountIDX GO /****** 개체: StoredProcedure [dbo].[game_award_get_list] 스크립트 날짜: 05/04/2012 14:05:46 ******/ SET ANSI_NULLS OFF GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[game_award_get_list] ( @accountIDX int ) As SELECT idx, award1_type, award1_number, award1_point, award2_type, award2_number, award2_point, award3_type, award3_number, award3_point, award4_type, award4_number, award4_point, award5_type, award5_number, award5_point, award6_type, award6_number, award6_point, award7_type, award7_number, award7_point, award8_type, award8_number, award8_point, award9_type, award9_number, award9_point, award10_type, award10_number, award10_point FROM userAwardDB WHERE accountIDX = @accountIDX GO /****** 개체: StoredProcedure [dbo].[game_item_medal_get_list] 스크립트 날짜: 05/04/2012 14:06:50 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[game_item_medal_get_list] ( @accountIDX int ) AS SELECT idx , item1_type, item1_class, item1_limitType, item1_limitDate , item2_type, item2_class, item2_limitType, item2_limitDate , item3_type, item3_class, item3_limitType, item3_limitDate , item4_type, item4_class, item4_limitType, item4_limitDate , item5_type, item5_class, item5_limitType, item5_limitDate , item6_type, item6_class, item6_limitType, item6_limitDate , item7_type, item7_class, item7_limitType, item7_limitDate , item8_type, item8_class, item8_limitType, item8_limitDate , item9_type, item9_class, item9_limitType, item9_limitDate , item10_type, item10_class, item10_limitType, item10_limitDate FROM userItemMedalDB WHERE accountIDX=@accountIDX GO /****** 개체: StoredProcedure [dbo].[game_item_medal_save] 스크립트 날짜: 05/04/2012 14:06:53 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[game_item_medal_save] ( @idx int , @item1_type int , @item1_class int , @item1_limitType int , @item1_limitDate datetime , @item2_type int , @item2_class int , @item2_limitType int , @item2_limitDate datetime , @item3_type int , @item3_class int , @item3_limitType int , @item3_limitDate datetime , @item4_type int , @item4_class int , @item4_limitType int , @item4_limitDate datetime , @item5_type int , @item5_class int , @item5_limitType int , @item5_limitDate datetime , @item6_type int , @item6_class int , @item6_limitType int , @item6_limitDate datetime , @item7_type int , @item7_class int , @item7_limitType int , @item7_limitDate datetime , @item8_type int , @item8_class int , @item8_limitType int , @item8_limitDate datetime , @item9_type int , @item9_class int , @item9_limitType int , @item9_limitDate datetime , @item10_type int , @item10_class int , @item10_limitType int , @item10_limitDate datetime ) AS UPDATE userItemMedalDB SET item1_type = @item1_type , item1_class = @item1_class , item1_limitType = @item1_limitType , item1_limitDate = @item1_limitDate , item2_type = @item2_type , item2_class = @item2_class , item2_limitType = @item2_limitType , item2_limitDate = @item2_limitDate , item3_type = @item3_type , item3_class = @item3_class , item3_limitType = @item3_limitType , item3_limitDate = @item3_limitDate , item4_type = @item4_type , item4_class = @item4_class , item4_limitType = @item4_limitType , item4_limitDate = @item4_limitDate , item5_type = @item5_type , item5_class = @item5_class , item5_limitType = @item5_limitType , item5_limitDate = @item5_limitDate , item6_type = @item6_type , item6_class = @item6_class , item6_limitType = @item6_limitType , item6_limitDate = @item6_limitDate , item7_type = @item7_type , item7_class = @item7_class , item7_limitType = @item7_limitType , item7_limitDate = @item7_limitDate , item8_type = @item8_type , item8_class = @item8_class , item8_limitType = @item8_limitType , item8_limitDate = @item8_limitDate , item9_type = @item9_type , item9_class = @item9_class , item9_limitType = @item9_limitType , item9_limitDate = @item9_limitDate , item10_type = @item10_type , item10_class = @item10_class , item10_limitType = @item10_limitType , item10_limitDate = @item10_limitDate WHERE idx=@idx GO /****** 개체: StoredProcedure [dbo].[game_item_medal_get_self_index] 스크립트 날짜: 05/04/2012 14:06:50 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[game_item_medal_get_self_index] ( @accountIDX int ) AS SELECT TOP 1 idx FROM userItemMedalDB WHERE accountIDX = @accountIDX ORDER BY idx DESC GO /****** 개체: StoredProcedure [dbo].[game_item_medal_add] 스크립트 날짜: 05/04/2012 14:06:46 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[game_item_medal_add] ( @accountIDX int , @item1_type int , @item1_class int , @item1_limitType int , @item1_limitDate datetime , @item2_type int , @item2_class int , @item2_limitType int , @item2_limitDate datetime , @item3_type int , @item3_class int , @item3_limitType int , @item3_limitDate datetime , @item4_type int , @item4_class int , @item4_limitType int , @item4_limitDate datetime , @item5_type int , @item5_class int , @item5_limitType int , @item5_limitDate datetime , @item6_type int , @item6_class int , @item6_limitType int , @item6_limitDate datetime , @item7_type int , @item7_class int , @item7_limitType int , @item7_limitDate datetime , @item8_type int , @item8_class int , @item8_limitType int , @item8_limitDate datetime , @item9_type int , @item9_class int , @item9_limitType int , @item9_limitDate datetime , @item10_type int , @item10_class int , @item10_limitType int , @item10_limitDate datetime ) AS INSERT INTO userItemMedalDB (accountIDX, item1_type, item1_class, item1_limitType, item1_limitDate, item2_type, item2_class, item2_limitType, item2_limitDate, item3_type, item3_class, item3_limitType, item3_limitDate, item4_type, item4_class, item4_limitType, item4_limitDate, item5_type, item5_class, item5_limitType, item5_limitDate, item6_type, item6_class, item6_limitType, item6_limitDate, item7_type, item7_class, item7_limitType, item7_limitDate, item8_type, item8_class, item8_limitType, item8_limitDate, item9_type, item9_class, item9_limitType, item9_limitDate, item10_type, item10_class, item10_limitType, item10_limitDate, regDate) VALUES (@accountIDX, @item1_type, @item1_class, @item1_limitType, @item1_limitDate, @item2_type, @item2_class, @item2_limitType, @item2_limitDate, @item3_type, @item3_class, @item3_limitType, @item3_limitDate, @item4_type, @item4_class, @item4_limitType, @item4_limitDate, @item5_type, @item5_class, @item5_limitType, @item5_limitDate, @item6_type, @item6_class, @item6_limitType, @item6_limitDate, @item7_type, @item7_class, @item7_limitType, @item7_limitDate, @item8_type, @item8_class, @item8_limitType, @item8_limitDate, @item9_type, @item9_class, @item9_limitType, @item9_limitDate, @item10_type, @item10_class, @item10_limitType, @item10_limitDate, getdate()) GO /****** 개체: StoredProcedure [dbo].[game_friend_best_add_self_index] 스크립트 날짜: 05/04/2012 14:06:06 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[game_friend_best_add_self_index] ( @accountIDX int , @friendIDX int ) AS SELECT TOP 1 idx FROM userFriendBestDB WHERE accountIDX=@accountIDX and friendIDX=@friendIDX and flag=1 ORDER BY idx DESC GO /****** 개체: StoredProcedure [dbo].[game_friend_best_add] 스크립트 날짜: 05/04/2012 14:06:06 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[game_friend_best_add] ( @accountIDX int , @friendIDX int ) AS DECLARE @cnt int SET @cnt = (SELECT count(*) FROM userMemberDB WITH(NOLOCK) WHERE accountIDX=@friendIDX) IF (@cnt > 0) BEGIN INSERT INTO userFriendBestDB (accountIDX, friendIDX, flag, flagTime, regDate) VALUES (@accountIDX, @friendIDX, 1, 0, getdate()) END GO /****** 개체: StoredProcedure [dbo].[game_friend_best_delete] 스크립트 날짜: 05/04/2012 14:06:06 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[game_friend_best_delete] ( @idx int ) AS DELETE FROM userFriendBestDB WHERE idx=@idx GO /****** 개체: StoredProcedure [dbo].[game_friend_best_save] 스크립트 날짜: 05/04/2012 14:06:07 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[game_friend_best_save] ( @idx int , @flag int , @flagTime int ) AS UPDATE userFriendBestDB SET flag=@flag , flagTime=@flagTime WHERE idx=@idx GO /****** 개체: StoredProcedure [dbo].[game_friend_best_list] 스크립트 날짜: 05/04/2012 14:06:06 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[game_friend_best_list] ( @accountIDX int ) AS SELECT idx, friendIDX, flag, flagTime FROM userFriendBestDB WHERE accountIDX=@accountIDX and flag > 0 ORDER BY idx ASC GO /****** 개체: StoredProcedure [dbo].[game_character_rentaltime_save] 스크립트 날짜: 05/04/2012 14:05:52 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[game_character_rentaltime_save] ( @idx int , @rentalTime int ) AS UPDATE userCharacterDB SET rentalTime=@rentalTime WHERE idx=@idx GO /****** 개체: StoredProcedure [dbo].[web_minihome_get_leader_class] 스크립트 날짜: 05/04/2012 14:08:24 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[web_minihome_get_leader_class] ( @accountIDX int ) AS SELECT ClassType FROM userCharacterDB WITH(NOLOCK) WHERE accountIDX=@accountIDX and leaderType=1 GO /****** 개체: StoredProcedure [dbo].[game_character_get_self_index] 스크립트 날짜: 05/04/2012 14:05:51 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[game_character_get_self_index] ( @accountIDX int , @getCount int ) As SELECT TOP (@getCount) idx FROM userCharacterDB WHERE accountIDX = @accountIDX ORDER BY idx DESC GO /****** 개체: StoredProcedure [dbo].[game_character_sava] 스크립트 날짜: 05/04/2012 14:05:53 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[game_character_sava] ( @idx int , @ClassType int , @CI_type int , @CI_gender int , @CI_beard int , @CI_face int , @CI_hair int , @CI_skinColor int , @CI_hairColor int , @CI_trinket int , @CI_underwear int , @EI1_type int , @EI2_type int , @EI3_type int , @EI4_type int , @CI_position int , @limitTime int , @limitType int , @leaderType smallint , @rentalType smallint , @rentalTime int ) As UPDATE userCharacterDB SET ClassType = @ClassType , CI_type = @CI_type , CI_gender = @CI_gender , CI_beard = @CI_beard , CI_face = @CI_face , CI_hair = @CI_hair , CI_skinColor = @CI_skinColor , CI_hairColor = @CI_hairColor , CI_trinket = @CI_trinket , CI_position = @CI_position , CI_underwear = @CI_underwear , EI1_type = @EI1_type , EI2_type = @EI2_type , EI3_type = @EI3_type , EI4_type = @EI4_type , limitTime = @limitTime , limitType = @limitType , leaderType = @leaderType , rentalType = @rentalType , rentalTime = @rentalTime WHERE idx = @idx GO /****** 개체: StoredProcedure [dbo].[game_character_get_list] 스크립트 날짜: 05/04/2012 14:05:50 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[game_character_get_list] ( @accountIDX int ) As SELECT idx, ClassType, CI_type, CI_gender, CI_beard, CI_face, CI_hair, CI_skinColor, CI_hairColor, CI_trinket, CI_underwear, EI1_type, EI2_type, EI3_type, EI4_type, CI_position, limitTime, limitType, leaderType, rentalType, rentalTime FROM userCharacterDB WHERE accountIDX = @accountIDX ORDER BY idx asc GO /****** 개체: StoredProcedure [dbo].[game_character_get_data] 스크립트 날짜: 05/04/2012 14:05:50 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[game_character_get_data] ( @idx int ) As SELECT accountIDX, ClassType, CI_type, CI_gender, CI_beard, CI_face, CI_hair, CI_skinColor, CI_hairColor, CI_trinket, CI_underwear, EI1_type, EI2_type, EI3_type, EI4_type, CI_position, limitTime, limitType, leaderType, rentalType, rentalTime FROM userCharacterDB WHERE idx = @idx GO /****** 개체: StoredProcedure [dbo].[game_character_add] 스크립트 날짜: 05/04/2012 14:05:50 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[game_character_add] ( @accountIDX int , @ClassType int , @CI_type int , @CI_gender int , @CI_beard int , @CI_face int , @CI_hair int , @CI_skinColor int , @CI_hairColor int , @CI_trinket int , @CI_underwear int , @EI1_type int , @EI2_type int , @EI3_type int , @EI4_type int , @limitTime int , @limitType int , @leaderType smallint , @rentalType smallint , @rentalTime int ) As Insert into userCharacterDB (accountIDX, ClassType, CI_type, CI_gender, CI_beard, CI_face, CI_hair, CI_skinColor, CI_hairColor, CI_trinket, CI_underwear, EI1_type, EI2_type, EI3_type, EI4_type, limitTime, limitType, leaderType, rentalType, rentalTime) values (@accountIDX, @ClassType, @CI_type, @CI_gender, @CI_beard, @CI_face, @CI_hair, @CI_skinColor, @CI_hairColor, @CI_trinket, @CI_underwear, @EI1_type, @EI2_type, @EI3_type, @EI4_type, @limitTime, @limitType, @leaderType, @rentalType, @rentalTime) GO /****** 개체: StoredProcedure [dbo].[z_nouse_game_emblem_save] 스크립트 날짜: 05/04/2012 14:09:00 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[z_nouse_game_emblem_save] ( @idx int , @emblem11 int , @emblem12 int , @emblem13 int , @emblem14 int , @emblem21 int , @emblem22 int , @emblem23 int , @emblem24 int , @emblem31 int , @emblem32 int , @emblem33 int , @emblem34 int ) As UPDATE userEmblemDB SET emblem1_1 = @emblem11 , emblem1_2 = @emblem12 , emblem1_3 = @emblem13 , emblem1_4 = @emblem14 , emblem2_1 = @emblem21 , emblem2_2 = @emblem22 , emblem2_3 = @emblem23 , emblem2_4 = @emblem24 , emblem3_1 = @emblem31 , emblem3_2 = @emblem32 , emblem3_3 = @emblem33 , emblem3_4 = @emblem34 WHERE accountIDX = @idx GO /****** 개체: StoredProcedure [dbo].[z_nouse_game_emblem_get_list] 스크립트 날짜: 05/04/2012 14:08:59 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[z_nouse_game_emblem_get_list] ( @idx int ) As SELECT emblem1_1,emblem1_2,emblem1_3,emblem1_4,emblem2_1,emblem2_2,emblem2_3,emblem2_4, emblem3_1,emblem3_2,emblem3_3,emblem3_4,emblem4_1,emblem4_2,emblem4_3,emblem4_4, emblem5_1,emblem5_2,emblem5_3,emblem5_4,emblem6_1,emblem6_2,emblem6_3,emblem6_4, emblem7_1,emblem7_2,emblem7_3,emblem7_4,emblem8_1,emblem8_2,emblem8_3,emblem8_4, emblem9_1,emblem9_2,emblem9_3,emblem9_4 FROM userEmblemDB WHERE accountIDX = @idx GO /****** 개체: StoredProcedure [dbo].[game_class_save] 스크립트 날짜: 05/04/2012 14:05:57 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[game_class_save] ( @idx int , @class1_type int , @class1_level int , @class1_expert int , @class2_type int , @class2_level int , @class2_expert int , @class3_type int , @class3_level int , @class3_expert int , @class4_type int , @class4_level int , @class4_expert int , @class5_type int , @class5_level int , @class5_expert int , @class6_type int , @class6_level int , @class6_expert int , @class7_type int , @class7_level int , @class7_expert int , @class8_type int , @class8_level int , @class8_expert int , @class9_type int , @class9_level int , @class9_expert int , @class10_type int , @class10_level int , @class10_expert int ) As UPDATE userClassDB SET class1_type = @class1_type , class1_level = @class1_level , class1_expert = @class1_expert , class2_type = @class2_type , class2_level = @class2_level , class2_expert = @class2_expert , class3_type = @class3_type , class3_level = @class3_level , class3_expert = @class3_expert , class4_type = @class4_type , class4_level = @class4_level , class4_expert = @class4_expert , class5_type = @class5_type , class5_level = @class5_level , class5_expert = @class5_expert , class6_type = @class6_type , class6_level = @class6_level , class6_expert = @class6_expert , class7_type = @class7_type , class7_level = @class7_level , class7_expert = @class7_expert , class8_type = @class8_type , class8_level = @class8_level , class8_expert = @class8_expert , class9_type = @class9_type , class9_level = @class9_level , class9_expert = @class9_expert , class10_type = @class10_type , class10_level = @class10_level , class10_expert = @class10_expert WHERE idx = @idx GO /****** 개체: StoredProcedure [dbo].[game_class_add] 스크립트 날짜: 05/04/2012 14:05:55 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[game_class_add] ( @accountIDX int , @class1_type int , @class1_level int , @class1_expert int , @class2_type int , @class2_level int , @class2_expert int , @class3_type int , @class3_level int , @class3_expert int , @class4_type int , @class4_level int , @class4_expert int , @class5_type int , @class5_level int , @class5_expert int , @class6_type int , @class6_level int , @class6_expert int , @class7_type int , @class7_level int , @class7_expert int , @class8_type int , @class8_level int , @class8_expert int , @class9_type int , @class9_level int , @class9_expert int , @class10_type int , @class10_level int , @class10_expert int ) As INSERT INTO userClassDB (accountIDX, class1_type, class1_level, class1_expert, class2_type, class2_level, class2_expert, class3_type, class3_level, class3_expert, class4_type, class4_level, class4_expert, class5_type, class5_level, class5_expert, class6_type, class6_level, class6_expert, class7_type, class7_level, class7_expert, class8_type, class8_level, class8_expert, class9_type, class9_level, class9_expert, class10_type, class10_level, class10_expert) VALUES (@accountIDX, @class1_type, @class1_level, @class1_expert, @class2_type, @class2_level, @class2_expert, @class3_type, @class3_level, @class3_expert, @class4_type, @class4_level, @class4_expert, @class5_type, @class5_level, @class5_expert, @class6_type, @class6_level, @class6_expert, @class7_type, @class7_level, @class7_expert, @class8_type, @class8_level, @class8_expert, @class9_type, @class9_level, @class9_expert, @class10_type, @class10_level, @class10_expert) GO /****** 개체: StoredProcedure [dbo].[web_minihome_userinfo_class_group_class_data] 스크립트 날짜: 05/04/2012 14:08:31 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[web_minihome_userinfo_class_group_class_data] ( @accountIDX int ) As SELECT class1_type, class1_level, class1_expert, class2_type, class2_level, class2_expert, class3_type, class3_level, class3_expert, class4_type, class4_level, class4_expert, class5_type, class5_level, class5_expert, class6_type, class6_level, class6_expert, class7_type, class7_level, class7_expert, class8_type, class8_level, class8_expert, class9_type, class9_level, class9_expert, class10_type, class10_level, class10_expert FROM userClassDB WHERE accountIDX = @accountIDX GO /****** 개체: StoredProcedure [dbo].[web_ranking_myinfo_class_data] 스크립트 날짜: 05/04/2012 14:08:42 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[web_ranking_myinfo_class_data] ( @accountIDX int ) AS SELECT class1_type, class1_level, class1_expert, class2_type, class2_level, class2_expert, class3_type, class3_level, class3_expert, class4_type, class4_level, class4_expert, class5_type, class5_level, class5_expert, class6_type, class6_level, class6_expert, class7_type, class7_level, class7_expert, class8_type, class8_level, class8_expert, class9_type, class9_level, class9_expert, class10_type, class10_level, class10_expert FROM userClassDB WHERE accountIDX = @accountIDX GO /****** 개체: StoredProcedure [dbo].[web_user_login_enkey_get_data] 스크립트 날짜: 05/04/2012 14:08:58 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[web_user_login_enkey_get_data] ( @accountIDX int ) As SELECT encodeKey, gameServerID, userIP, connDate FROM userLoginDB WHERE accountIDX = @accountIDX GO /****** 개체: StoredProcedure [dbo].[web_minihome_connection_game] 스크립트 날짜: 05/04/2012 14:08:23 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[web_minihome_connection_game] ( @accountIDX int ) As SELECT gameServerID FROM userLoginDB WHERE accountIDX = @accountIDX GO /****** 개체: StoredProcedure [dbo].[web_minihome_enkey_get_data] 스크립트 날짜: 05/04/2012 14:08:23 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[web_minihome_enkey_get_data] ( @accountIDX int ) As SELECT encodeKey FROM userLoginDB WITH(NOLOCK) WHERE accountIDX = @accountIDX GO /****** 개체: StoredProcedure [dbo].[web_play_enkey_get_data] 스크립트 날짜: 05/04/2012 14:08:34 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[web_play_enkey_get_data] ( @accountIDX int ) As SELECT encodeKey, gameServerID, userIP, connDate FROM userLoginDB WHERE accountIDX = @accountIDX GO /****** 개체: StoredProcedure [dbo].[web_minihome_get_gameserverid] 스크립트 날짜: 05/04/2012 14:08:24 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[web_minihome_get_gameserverid] ( @accountIDX int ) AS SELECT gameServerID FROM userLoginDB WITH(NOLOCK) WHERE accountIDX=@accountIDX GO /****** 개체: StoredProcedure [dbo].[web_play_enkey_save] 스크립트 날짜: 05/04/2012 14:08:35 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[web_play_enkey_save] ( @accountIDX int , @encodeKey char(15) , @userIP varchar(15) ) As UPDATE userLoginDB SET encodeKey = @encodeKey , userIP = @userIP , connDate = getdate() WHERE accountIDX = @accountIDX GO /****** 개체: StoredProcedure [dbo].[web_play_login_data_get_count] 스크립트 날짜: 05/04/2012 14:08:36 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[web_play_login_data_get_count] ( @accountIDX int ) As SELECT count(*) FROM userLoginDB WHERE accountIDX = @accountIDX GO /****** 개체: StoredProcedure [dbo].[web_minihome_get_play_type] 스크립트 날짜: 05/04/2012 14:08:25 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[web_minihome_get_play_type] ( @accountIDX int ) AS SELECT gameServerID FROM userLoginDB WITH(NOLOCK) WHERE accountIDX = @accountIDX GO /****** 개체: StoredProcedure [dbo].[web_user_login_enkey_update] 스크립트 날짜: 05/04/2012 14:08:58 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[web_user_login_enkey_update] ( @userID varchar(12) , @encodeKey char(15) , @userIP varchar(15) ) As DECLARE @accountIDX int SET @accountIDX = (SELECT accountIDX FROM userMemberDB WHERE userID = @userID) UPDATE userLoginDB SET encodeKey = @encodeKey , userIP = @userIP , connDate = getdate() WHERE accountIDX = @accountIDX GO /****** 개체: StoredProcedure [dbo].[web_minihome_userinfo_default_url] 스크립트 날짜: 05/04/2012 14:08:31 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[web_minihome_userinfo_default_url] ( @accountIDX int ) As SELECT gameServerID FROM userLoginDB WHERE accountIDX = @accountIDX GO /****** 개체: StoredProcedure [dbo].[web_user_login_count] 스크립트 날짜: 05/04/2012 14:08:58 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[web_user_login_count] ( @userID varchar(12) ) As DECLARE @accountIDX int SET @accountIDX = (SELECT accountIDX FROM userMemberDB WHERE userID = @userID) SELECT count(*) FROM userLoginDB WHERE accountIDX = @accountIDX GO /****** 개체: StoredProcedure [dbo].[game_login_serverid_save] 스크립트 날짜: 05/04/2012 14:06:57 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[game_login_serverid_save] ( @accountIDX int , @gameServerID bigint ) As UPDATE userLoginDB SET gameServerID = @gameServerID WHERE accountIDX = @accountIDX GO /****** 개체: StoredProcedure [dbo].[web_guild_get_play_type] 스크립트 날짜: 05/04/2012 14:07:57 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[web_guild_get_play_type] ( @accountIDX int ) AS SELECT gameServerID FROM userLoginDB WHERE accountIDX = @accountIDX GO /****** 개체: StoredProcedure [dbo].[web_connection_game_user_count] 스크립트 날짜: 05/04/2012 14:07:34 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[web_connection_game_user_count] As SELECT count(*) FROM userLoginDB WHERE gameServerID > 0 GO /****** 개체: StoredProcedure [dbo].[game_login_get_data] 스크립트 날짜: 05/04/2012 14:06:56 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[game_login_get_data] ( @userID varchar(12) ) As SELECT b.userID, a.encodeKey, a.gameServerID, a.connDate FROM userLoginDB a INNER JOIN userMemberDB b ON a.accountIDX = b.accountIDX WHERE b.userID=@userID GO /****** 개체: StoredProcedure [dbo].[game_login_save] 스크립트 날짜: 05/04/2012 14:06:56 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[game_login_save] ( @userID varchar(12) , @gameServerID bigint ) As Begin Tran SELECT b.userID, a.gameServerID FROM userLoginDB a INNER JOIN userMemberDB b ON a.accountIDX = b.accountIDX WHERE b.userID = @userID UPDATE userLoginDB SET gameServerID = @gameServerID, connDate = getdate() WHERE accountIDX = (SELECT accountIDX FROM userMemberDB WHERE userID=@userID) Commit Tran GO /****** 개체: StoredProcedure [dbo].[game_login_init_user] 스크립트 날짜: 05/04/2012 14:06:56 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[game_login_init_user] ( @userID varchar(12) , @encodeKey varchar(15) ) As UPDATE userLoginDB SET gameServerID=0, encodeKey=@encodeKey WHERE accountIDX = (SELECT accountIDX FROM userMemberDB WHERE userID=@userID) GO /****** 개체: StoredProcedure [dbo].[web_get_is_play] 스크립트 날짜: 05/04/2012 14:07:53 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[web_get_is_play] ( @accountIDX int ) AS SELECT gameServerID FROM userLoginDB WITH(NOLOCK) WHERE accountIDX = @accountIDX GO /****** 개체: StoredProcedure [dbo].[web_ranking_myinfo_all_medal_data] 스크립트 날짜: 05/04/2012 14:08:41 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[web_ranking_myinfo_all_medal_data] ( @accountIDX int ) As SELECT medal1_type, medal2_type, medal3_type, medal4_type, medal5_type, medal6_type, medal7_type, medal8_type, medal9_type, medal10_type FROM userMedalDB WHERE accountIDX = @accountIDX ORDER BY idx ASC GO /****** 개체: StoredProcedure [dbo].[web_medal_receive_data_top1] 스크립트 날짜: 05/04/2012 14:08:10 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[web_medal_receive_data_top1] ( @accountIDX int ) As SELECT TOP 1 idx, medal1_type, medal2_type, medal3_type, medal4_type, medal5_type, medal6_type, medal7_type, medal8_type, medal9_type, medal10_type FROM userMedalDB WHERE accountIDX=@accountIDX ORDER BY idx DESC GO /****** 개체: StoredProcedure [dbo].[game_medal_get_list] 스크립트 날짜: 05/04/2012 14:06:57 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[game_medal_get_list] ( @accountIDX int ) As SELECT idx, medal1_type, medal2_type, medal3_type, medal4_type, medal5_type, medal6_type, medal7_type, medal8_type, medal9_type, medal10_type FROM userMedalDB WHERE accountIDX = @accountIDX GO /****** 개체: StoredProcedure [dbo].[web_medal_add1] 스크립트 날짜: 05/04/2012 14:08:08 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[web_medal_add1] ( @accountIDX int , @medalType int ) AS INSERT INTO userMedalDB (accountIDX, medal1_type) VALUES (@accountIDX, @medalType) GO /****** 개체: StoredProcedure [dbo].[web_medal_get_data] 스크립트 날짜: 05/04/2012 14:08:09 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[web_medal_get_data] ( @accountIDX int ) As SELECT medal1_type, medal2_type, medal3_type, medal4_type, medal5_type, medal6_type, medal7_type, medal8_type, medal9_type, medal10_type FROM userMedalDB WHERE accountIDX = @accountIDX GO /****** 개체: StoredProcedure [dbo].[web_medal_add2] 스크립트 날짜: 05/04/2012 14:08:08 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[web_medal_add2] ( @idx int , @medalType1 int , @medalType2 int , @medalType3 int , @medalType4 int , @medalType5 int , @medalType6 int , @medalType7 int , @medalType8 int , @medalType9 int , @medalType10 int ) AS UPDATE userMedalDB SET medal1_type = @medalType1 , medal2_type = @medalType2 , medal3_type = @medalType3 , medal4_type = @medalType4 , medal5_type = @medalType5 , medal6_type = @medalType6 , medal7_type = @medalType7 , medal8_type = @medalType8 , medal9_type = @medalType9 , medal10_type = @medalType10 WHERE idx=@idx GO /****** 개체: StoredProcedure [dbo].[game_medal_get_top1] 스크립트 날짜: 05/04/2012 14:06:57 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[game_medal_get_top1] ( @accountIDX int ) AS SELECT TOP 1 medal1_type, medal2_type, medal3_type, medal4_type, medal5_type, medal6_type, medal7_type, medal8_type, medal9_type, medal10_type FROM userMedalDB WHERE accountIDX=@accountIDX ORDER BY idx DESC GO /****** 개체: StoredProcedure [dbo].[web_minihome_userinfo_all_medal_data] 스크립트 날짜: 05/04/2012 14:08:29 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[web_minihome_userinfo_all_medal_data] ( @accountIDX int ) As SELECT medal1_type, medal2_type, medal3_type, medal4_type, medal5_type, medal6_type, medal7_type, medal8_type, medal9_type, medal10_type FROM userMedalDB WHERE accountIDX = @accountIDX GO /****** 개체: StoredProcedure [dbo].[web_minihome_medal_all_medal_data] 스크립트 날짜: 05/04/2012 14:08:25 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[web_minihome_medal_all_medal_data] ( @accountIDX int ) As SELECT medal1_type, medal2_type, medal3_type, medal4_type, medal5_type, medal6_type, medal7_type, medal8_type, medal9_type, medal10_type FROM userMedalDB WHERE accountIDX = @accountIDX ORDER BY idx ASC GO /****** 개체: StoredProcedure [dbo].[game_event_get_data] 스크립트 날짜: 05/04/2012 14:05:59 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[game_event_get_data] ( @accountIDX int ) AS SELECT idx, eventType, value1, value2 FROM userEventDB WHERE accountIDX=@accountIDX GO /****** 개체: StoredProcedure [dbo].[game_event_get_createIDX] 스크립트 날짜: 05/04/2012 14:05:59 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[game_event_get_createIDX] ( @accountIDX int , @eventType int ) AS SELECT Max(idx) FROM userEventDB WHERE accountIDX=@accountIDX and eventType=@eventType GO /****** 개체: StoredProcedure [dbo].[web_event_save] 스크립트 날짜: 05/04/2012 14:07:44 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[web_event_save] ( @accountIDX int ) AS if (exists(SELECT * FROM userEventDB WHERE accountIDX=@accountIDX)) BEGIN UPDATE userEventDB SET value1 = value1 + 1 WHERE accountIDX=@accountIDX END ELSE BEGIN INSERT INTO userEventDB (accountIDX, value1, value2, eventType, regDate) VALUES (@accountIDX, 1, 0, 1, getdate()) END GO /****** 개체: StoredProcedure [dbo].[web_member_recommend_join_friend_add_point] 스크립트 날짜: 05/04/2012 14:08:19 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[web_member_recommend_join_friend_add_point] ( @accountIDX int , @recommIDX int , @bonusCash varchar(12) , @userIP varchar(15) , @note varchar(500) ) As UPDATE userCashDB SET amtCash = amtCash + @bonusCash , amtBonus = amtBonus + @bonusCash , chgDate = getdate() WHERE accountIDX = @recommIDX INSERT INTO LosaGame_log.DBO.log_cash (accountIDX, userIP, DBID, applyType, amount, note, regDate) VALUES (@recommIDX, @userIP, 'RECOMMENDJOIN', 'B0', @bonusCash, '추천유저가입 보너스', getdate()) if (exists(SELECT * FROM userEventDB WHERE accountIDX=@recommIDX)) BEGIN UPDATE userEventDB SET value1 = value1 + 10 WHERE accountIDX=@recommIDX END ELSE BEGIN INSERT INTO userEventDB (accountIDX, value1, value2, eventType, regDate) VALUES (@recommIDX, 10, 0, 1, getdate()) END UPDATE userInfoDB SET rec_index = rec_index + 10 WHERE accountIDX = @recommIDX INSERT INTO userFriendDB (userAccIDX, friendAccIDX, regDate) VALUES (@accountIDX, @recommIDX, getdate()) UPDATE LosaGame_log.DBO.log_recommend_join SET flag=1 WHERE rinkIP = @userIP GO /****** 개체: StoredProcedure [dbo].[game_event_add] 스크립트 날짜: 05/04/2012 14:05:58 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[game_event_add] ( @accountIDX int , @value1 int , @value2 int , @eventType int ) AS INSERT INTO userEventDB (accountIDX, value1, value2, eventType, regDate) VALUES (@accountIDX, @value1, @value2, @eventType, getdate()) GO /****** 개체: StoredProcedure [dbo].[game_event_save] 스크립트 날짜: 05/04/2012 14:06:00 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[game_event_save] ( @idx int , @value1 int , @value2 int ) AS UPDATE userEventDB SET value1 = @value1 , value2 = @value2 WHERE idx = @idx GO /****** 개체: StoredProcedure [dbo].[game_quest_get_list] 스크립트 날짜: 05/04/2012 14:07:07 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[game_quest_get_list] ( @accountIDX int ) AS SELECT idx, quest1_type, quest1_value1, quest1_value2, quest1_time, quest2_type, quest2_value1, quest2_value2, quest2_time, quest3_type, quest3_value1, quest3_value2, quest3_time, quest4_type, quest4_value1, quest4_value2, quest4_time, quest5_type, quest5_value1, quest5_value2, quest5_time, quest6_type, quest6_value1, quest6_value2, quest6_time, quest7_type, quest7_value1, quest7_value2, quest7_time, quest8_type, quest8_value1, quest8_value2, quest8_time, quest9_type, quest9_value1, quest9_value2, quest9_time, quest10_type, quest10_value1, quest10_value2, quest10_time, quest11_type, quest11_value1, quest11_value2, quest11_time, quest12_type, quest12_value1, quest12_value2, quest12_time, quest13_type, quest13_value1, quest13_value2, quest13_time, quest14_type, quest14_value1, quest14_value2, quest14_time, quest15_type, quest15_value1, quest15_value2, quest15_time, quest16_type, quest16_value1, quest16_value2, quest16_time, quest17_type, quest17_value1, quest17_value2, quest17_time, quest18_type, quest18_value1, quest18_value2, quest18_time, quest19_type, quest19_value1, quest19_value2, quest19_time, quest20_type, quest20_value1, quest20_value2, quest20_time FROM userQuestDB WHERE accountIDX = @accountIDX GO /****** 개체: StoredProcedure [dbo].[game_quest_delete] 스크립트 날짜: 05/04/2012 14:07:07 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[game_quest_delete] ( @idx int ) AS DELETE FROM userQuestDB WHERE idx = @idx GO /****** 개체: StoredProcedure [dbo].[game_quest_add] 스크립트 날짜: 05/04/2012 14:07:06 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[game_quest_add] ( @accountIDX int , @quest1_type int , @quest1_value1 int , @quest1_value2 int , @quest1_time int , @quest2_type int , @quest2_value1 int , @quest2_value2 int , @quest2_time int , @quest3_type int , @quest3_value1 int , @quest3_value2 int , @quest3_time int , @quest4_type int , @quest4_value1 int , @quest4_value2 int , @quest4_time int , @quest5_type int , @quest5_value1 int , @quest5_value2 int , @quest5_time int , @quest6_type int , @quest6_value1 int , @quest6_value2 int , @quest6_time int , @quest7_type int , @quest7_value1 int , @quest7_value2 int , @quest7_time int , @quest8_type int , @quest8_value1 int , @quest8_value2 int , @quest8_time int , @quest9_type int , @quest9_value1 int , @quest9_value2 int , @quest9_time int , @quest10_type int , @quest10_value1 int , @quest10_value2 int , @quest10_time int , @quest11_type int , @quest11_value1 int , @quest11_value2 int , @quest11_time int , @quest12_type int , @quest12_value1 int , @quest12_value2 int , @quest12_time int , @quest13_type int , @quest13_value1 int , @quest13_value2 int , @quest13_time int , @quest14_type int , @quest14_value1 int , @quest14_value2 int , @quest14_time int , @quest15_type int , @quest15_value1 int , @quest15_value2 int , @quest15_time int , @quest16_type int , @quest16_value1 int , @quest16_value2 int , @quest16_time int , @quest17_type int , @quest17_value1 int , @quest17_value2 int , @quest17_time int , @quest18_type int , @quest18_value1 int , @quest18_value2 int , @quest18_time int , @quest19_type int , @quest19_value1 int , @quest19_value2 int , @quest19_time int , @quest20_type int , @quest20_value1 int , @quest20_value2 int , @quest20_time int ) AS INSERT INTO userQuestDB (accountIDX, quest1_type, quest1_value1, quest1_value2, quest1_time, quest2_type, quest2_value1, quest2_value2, quest2_time, quest3_type, quest3_value1, quest3_value2, quest3_time, quest4_type, quest4_value1, quest4_value2, quest4_time, quest5_type, quest5_value1, quest5_value2, quest5_time, quest6_type, quest6_value1, quest6_value2, quest6_time, quest7_type, quest7_value1, quest7_value2, quest7_time, quest8_type, quest8_value1, quest8_value2, quest8_time, quest9_type, quest9_value1, quest9_value2, quest9_time, quest10_type, quest10_value1, quest10_value2, quest10_time, quest11_type, quest11_value1, quest11_value2, quest11_time, quest12_type, quest12_value1, quest12_value2, quest12_time, quest13_type, quest13_value1, quest13_value2, quest13_time, quest14_type, quest14_value1, quest14_value2, quest14_time, quest15_type, quest15_value1, quest15_value2, quest15_time, quest16_type, quest16_value1, quest16_value2, quest16_time, quest17_type, quest17_value1, quest17_value2, quest17_time, quest18_type, quest18_value1, quest18_value2, quest18_time, quest19_type, quest19_value1, quest19_value2, quest19_time, quest20_type, quest20_value1, quest20_value2, quest20_time) VALUES (@accountIDX, @quest1_type, @quest1_value1, @quest1_value2, @quest1_time, @quest2_type, @quest2_value1, @quest2_value2, @quest2_time, @quest3_type, @quest3_value1, @quest3_value2, @quest3_time, @quest4_type, @quest4_value1, @quest4_value2, @quest4_time, @quest5_type, @quest5_value1, @quest5_value2, @quest5_time, @quest6_type, @quest6_value1, @quest6_value2, @quest6_time, @quest7_type, @quest7_value1, @quest7_value2, @quest7_time, @quest8_type, @quest8_value1, @quest8_value2, @quest8_time, @quest9_type, @quest9_value1, @quest9_value2, @quest9_time, @quest10_type, @quest10_value1, @quest10_value2, @quest10_time, @quest11_type, @quest11_value1, @quest11_value2, @quest11_time, @quest12_type, @quest12_value1, @quest12_value2, @quest12_time, @quest13_type, @quest13_value1, @quest13_value2, @quest13_time, @quest14_type, @quest14_value1, @quest14_value2, @quest14_time, @quest15_type, @quest15_value1, @quest15_value2, @quest15_time, @quest16_type, @quest16_value1, @quest16_value2, @quest16_time, @quest17_type, @quest17_value1, @quest17_value2, @quest17_time, @quest18_type, @quest18_value1, @quest18_value2, @quest18_time, @quest19_type, @quest19_value1, @quest19_value2, @quest19_time, @quest20_type, @quest20_value1, @quest20_value2, @quest20_time) GO /****** 개체: StoredProcedure [dbo].[game_quest_save] 스크립트 날짜: 05/04/2012 14:07:12 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[game_quest_save] ( @idx int , @quest1_type int , @quest1_value1 int , @quest1_value2 int , @quest1_time int , @quest2_type int , @quest2_value1 int , @quest2_value2 int , @quest2_time int , @quest3_type int , @quest3_value1 int , @quest3_value2 int , @quest3_time int , @quest4_type int , @quest4_value1 int , @quest4_value2 int , @quest4_time int , @quest5_type int , @quest5_value1 int , @quest5_value2 int , @quest5_time int , @quest6_type int , @quest6_value1 int , @quest6_value2 int , @quest6_time int , @quest7_type int , @quest7_value1 int , @quest7_value2 int , @quest7_time int , @quest8_type int , @quest8_value1 int , @quest8_value2 int , @quest8_time int , @quest9_type int , @quest9_value1 int , @quest9_value2 int , @quest9_time int , @quest10_type int , @quest10_value1 int , @quest10_value2 int , @quest10_time int , @quest11_type int , @quest11_value1 int , @quest11_value2 int , @quest11_time int , @quest12_type int , @quest12_value1 int , @quest12_value2 int , @quest12_time int , @quest13_type int , @quest13_value1 int , @quest13_value2 int , @quest13_time int , @quest14_type int , @quest14_value1 int , @quest14_value2 int , @quest14_time int , @quest15_type int , @quest15_value1 int , @quest15_value2 int , @quest15_time int , @quest16_type int , @quest16_value1 int , @quest16_value2 int , @quest16_time int , @quest17_type int , @quest17_value1 int , @quest17_value2 int , @quest17_time int , @quest18_type int , @quest18_value1 int , @quest18_value2 int , @quest18_time int , @quest19_type int , @quest19_value1 int , @quest19_value2 int , @quest19_time int , @quest20_type int , @quest20_value1 int , @quest20_value2 int , @quest20_time int ) AS UPDATE userQuestDB SET quest1_type = @quest1_type , quest1_value1 = @quest1_value1 , quest1_value2 = @quest1_value2 , quest1_time = @quest1_time , quest2_type = @quest2_type , quest2_value1 = @quest2_value1 , quest2_value2 = @quest2_value2 , quest2_time = @quest2_time , quest3_type = @quest3_type , quest3_value1 = @quest3_value1 , quest3_value2 = @quest3_value2 , quest3_time = @quest3_time , quest4_type = @quest4_type , quest4_value1 = @quest4_value1 , quest4_value2 = @quest4_value2 , quest4_time = @quest4_time , quest5_type = @quest5_type , quest5_value1 = @quest5_value1 , quest5_value2 = @quest5_value2 , quest5_time = @quest5_time , quest6_type = @quest6_type , quest6_value1 = @quest6_value1 , quest6_value2 = @quest6_value2 , quest6_time = @quest6_time , quest7_type = @quest7_type , quest7_value1 = @quest7_value1 , quest7_value2 = @quest7_value2 , quest7_time = @quest7_time , quest8_type = @quest8_type , quest8_value1 = @quest8_value1 , quest8_value2 = @quest8_value2 , quest8_time = @quest8_time , quest9_type = @quest9_type , quest9_value1 = @quest9_value1 , quest9_value2 = @quest9_value2 , quest9_time = @quest9_time , quest10_type = @quest10_type , quest10_value1 = @quest10_value1 , quest10_value2 = @quest10_value2 , quest10_time = @quest10_time , quest11_type = @quest11_type , quest11_value1 = @quest11_value1 , quest11_value2 = @quest11_value2 , quest11_time = @quest11_time , quest12_type = @quest12_type , quest12_value1 = @quest12_value1 , quest12_value2 = @quest12_value2 , quest12_time = @quest12_time , quest13_type = @quest13_type , quest13_value1 = @quest13_value1 , quest13_value2 = @quest13_value2 , quest13_time = @quest13_time , quest14_type = @quest14_type , quest14_value1 = @quest14_value1 , quest14_value2 = @quest14_value2 , quest14_time = @quest14_time , quest15_type = @quest15_type , quest15_value1 = @quest15_value1 , quest15_value2 = @quest15_value2 , quest15_time = @quest15_time , quest16_type = @quest16_type , quest16_value1 = @quest16_value1 , quest16_value2 = @quest16_value2 , quest16_time = @quest16_time , quest17_type = @quest17_type , quest17_value1 = @quest17_value1 , quest17_value2 = @quest17_value2 , quest17_time = @quest17_time , quest18_type = @quest18_type , quest18_value1 = @quest18_value1 , quest18_value2 = @quest18_value2 , quest18_time = @quest18_time , quest19_type = @quest19_type , quest19_value1 = @quest19_value1 , quest19_value2 = @quest19_value2 , quest19_time = @quest19_time , quest20_type = @quest20_type , quest20_value1 = @quest20_value1 , quest20_value2 = @quest20_value2 , quest20_time = @quest20_time WHERE idx = @idx GO /****** 개체: StoredProcedure [dbo].[game_quest_get_self_index] 스크립트 날짜: 05/04/2012 14:07:07 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[game_quest_get_self_index] ( @accountIDX int ) AS SELECT Max(idx) FROM userQuestDB WHERE accountIDX = @accountIDX GO /****** 개체: StoredProcedure [dbo].[game_hq_get_count] 스크립트 날짜: 05/04/2012 14:06:22 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[game_hq_get_count] ( @accountIDX int ) AS SELECT COUNT(*) FROM userHqDB WHERE accountIDX=@accountIDX GO /****** 개체: StoredProcedure [dbo].[game_hq_add] 스크립트 날짜: 05/04/2012 14:06:22 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[game_hq_add] ( @accountIDX int ) AS INSERT INTO userHqDB (accountIDX, class1_type, class1_posx, class1_posy, class2_type, class2_posx, class2_posy, class3_type, class3_posx, class3_posy, class4_type, class4_posx, class4_posy, class5_type, class5_posx, class5_posy, class6_type, class6_posx, class6_posy, class7_type, class7_posx, class7_posy, class8_type, class8_posx, class8_posy, class9_type, class9_posx, class9_posy, class10_type, class10_posx, class10_posy, lockType, regDate ) VALUES (@accountIDX, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, getdate() ) GO /****** 개체: StoredProcedure [dbo].[game_hq_save] 스크립트 날짜: 05/04/2012 14:06:24 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[game_hq_save] ( @accountIDX int , @class1_type int , @class1_posx int , @class1_posy int , @class2_type int , @class2_posx int , @class2_posy int , @class3_type int , @class3_posx int , @class3_posy int , @class4_type int , @class4_posx int , @class4_posy int , @class5_type int , @class5_posx int , @class5_posy int , @class6_type int , @class6_posx int , @class6_posy int , @class7_type int , @class7_posx int , @class7_posy int , @class8_type int , @class8_posx int , @class8_posy int , @class9_type int , @class9_posx int , @class9_posy int , @class10_type int , @class10_posx int , @class10_posy int , @lockType smallint ) AS UPDATE userHqDB SET class1_type = @class1_type , class1_posx = @class1_posx , class1_posy = @class1_posy , class2_type = @class2_type , class2_posx = @class2_posx , class2_posy = @class2_posy , class3_type = @class3_type , class3_posx = @class3_posx , class3_posy = @class3_posy , class4_type = @class4_type , class4_posx = @class4_posx , class4_posy = @class4_posy , class5_type = @class5_type , class5_posx = @class5_posx , class5_posy = @class5_posy , class6_type = @class6_type , class6_posx = @class6_posx , class6_posy = @class6_posy , class7_type = @class7_type , class7_posx = @class7_posx , class7_posy = @class7_posy , class8_type = @class8_type , class8_posx = @class8_posx , class8_posy = @class8_posy , class9_type = @class9_type , class9_posx = @class9_posx , class9_posy = @class9_posy , class10_type = @class10_type , class10_posx = @class10_posx , class10_posy = @class10_posy , lockType = @lockType WHERE accountIDX=@accountIDX GO /****** 개체: StoredProcedure [dbo].[game_hq_get_data] 스크립트 날짜: 05/04/2012 14:06:22 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[game_hq_get_data] ( @accountIDX int ) AS SELECT class1_type, class1_posx, class1_posy, class2_type, class2_posx, class2_posy, class3_type, class3_posx, class3_posy, class4_type, class4_posx, class4_posy, class5_type, class5_posx, class5_posy, class6_type, class6_posx, class6_posy, class7_type, class7_posx, class7_posy, class8_type, class8_posx, class8_posy, class9_type, class9_posx, class9_posy, class10_type, class10_posx, class10_posy, lockType FROM userHqDB WHERE accountIDX = @accountIDX GO /****** 개체: StoredProcedure [dbo].[web_guild_get_numberth] 스크립트 날짜: 05/04/2012 14:07:57 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[web_guild_get_numberth] AS SELECT MAX(season) + 1 AS 'numth' FROM userRegionDB_history GO /****** 개체: StoredProcedure [dbo].[web_ranking_myinfo_all_award_expert] 스크립트 날짜: 05/04/2012 14:08:40 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[web_ranking_myinfo_all_award_expert] ( @accountIDX int ) As SELECT awardLevel, expert FROM userRankingDB_award WHERE accountIDX = @accountIDX GO /****** 개체: StoredProcedure [dbo].[web_ranking_myinfo_award_ranking_data] 스크립트 날짜: 05/04/2012 14:08:41 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[web_ranking_myinfo_award_ranking_data] ( @accountIDX int ) AS SELECT award1_now, award2_now, award3_now, award4_now, award5_now, award6_now, award7_now, award8_now, award9_now, award10_now, award11_now, award12_now, award13_now, award14_now, award15_now, award16_now, award17_now, award18_now, award19_now, award20_now, award21_now, award22_now, award23_now, award24_now, award25_now, award26_now, award27_now FROM userRankingDB_award WHERE accountIDX=@accountIDX GO /****** 개체: StoredProcedure [dbo].[web_minihome_userinfo_award_rank_data] 스크립트 날짜: 05/04/2012 14:08:30 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[web_minihome_userinfo_award_rank_data] ( @accountIDX int ) As SELECT award1_now, award2_now, award3_now, award4_now, award5_now, award6_now, award7_now, award8_now, award9_now, award10_now, award11_now, award12_now, award13_now, award14_now, award15_now, award16_now, award17_now, award18_now, award19_now, award20_now, award21_now, award22_now, award23_now, award24_now, award25_now, award26_now, award27_now FROM userRankingDB_award WHERE accountIDX=@accountIDX GO /****** 개체: StoredProcedure [dbo].[game_price_class_get_data] 스크립트 날짜: 05/04/2012 14:07:02 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[game_price_class_get_data] AS SELECT TOP 1 class1_price, class2_price, class3_price, class4_price, class5_price, class6_price, class7_price, class8_price, class9_price, class10_price, class11_price, class12_price, class13_price, class14_price, class15_price, class16_price, class17_price, class18_price, class19_price, class20_price, class21_price, class22_price, class23_price, class24_price, class25_price, class26_price, class27_price, class28_price, class29_price, class30_price, class31_price, class32_price, class33_price, class34_price, class35_price, class36_price, class37_price, class38_price, class39_price, class40_price, class41_price, class42_price, class43_price, class44_price, class45_price, class46_price, class47_price, class48_price, class49_price, class50_price, class51_price, class52_price, class53_price, class54_price, class55_price, class56_price, class57_price, class58_price, class59_price, class60_price, class61_price, class62_price, class63_price, class64_price, class65_price, class66_price, class67_price, class68_price, class69_price, class70_price, class71_price, class72_price, class73_price, class74_price, class75_price, class76_price, class77_price, class78_price, class79_price, class80_price, class81_price, class82_price, class83_price, class84_price, class85_price, class86_price, class87_price, class88_price, class89_price, class90_price, class91_price, class92_price, class93_price, class94_price, class95_price, class96_price, class97_price, class98_price, class99_price, class100_price FROM define_class_price ORDER BY idx DESC GO /****** 개체: StoredProcedure [dbo].[web_member_io_count] 스크립트 날짜: 05/04/2012 14:08:17 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[web_member_io_count] ( @userID varchar(12) ) As Select count(*) From manage_memberDB where userID = @userID GO /****** 개체: StoredProcedure [dbo].[game_member_change_userNickname] 스크립트 날짜: 05/04/2012 14:06:58 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[game_member_change_userNickname] ( @accountIDX int , @nickname varchar(20) , @chageNickname varchar(20) , @itemType int , @itemCode int , @itemRowIDX varchar(12) , @itemColIDX varchar(12) , @userIP varchar(15) ) AS DECLARE @cnt1 int, @cnt2 int, @cnt3 int, @cnt4 int DECLARE @sql varchar(500), @note varchar(100) SET @cnt1 = (SELECT count(*) FROM userMemberDB WHERE userID=@chageNickname) SET @cnt2 = (SELECT count(*) FROM userMemberDB WHERE nickName=@chageNickname) SET @cnt3 = (SELECT count(*) FROM manage_memberDB WHERE userID=@chageNickname) SET @cnt4 = @cnt1 + @cnt2 + @cnt3 If (@cnt4 = 0) BEGIN SET @note = @nickname + ' -> ' + @chageNickname BEGIN TRAN UPDATE userMemberDB SET nickName=@chageNickname WHERE accountIDX=@accountIDX SET @sql = 'UPDATE userItemEtcDB SET item' + @itemColIDX + '_type=0, item' + @itemColIDX + '_value1=0, item' + @itemColIDX + '_value2=0 WHERE idx=' + @itemRowIDX EXECUTE (@sql) COMMIT TRAN EXEC Log_Data_office.DBO.game_log_use_item @accountIDX, @nickname, @itemType, @itemCode, @itemRowIDX, @itemColIDX, @userIP, @note END GO /****** 개체: StoredProcedure [dbo].[game_member_get_userNickname_count] 스크립트 날짜: 05/04/2012 14:06:58 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[game_member_get_userNickname_count] ( @userID varchar(20) ) AS DECLARE @cnt1 int, @cnt2 int, @cnt3 int SET @cnt1 = (SELECT count(*) FROM userMemberDB WHERE userID=@userID) SET @cnt2 = (SELECT count(*) FROM userMemberDB WHERE nickName=@userID) SET @cnt3 = (SELECT count(*) FROM manage_memberDB WHERE userID=@userID) SELECT @cnt1 + @cnt2 + @cnt3 AS 'recordCnt' GO /****** 개체: StoredProcedure [dbo].[game_guild_member_get_masters] 스크립트 날짜: 05/04/2012 14:06:19 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[game_guild_member_get_masters] ( @guildIDX int ) AS SELECT accountIDX FROM userGuildInfoDB WHERE guildIDX=@guildIDX and guildPosition in ('길드장', '부길드장') GO /****** 개체: StoredProcedure [dbo].[game_guild_change_max_capacity] 스크립트 날짜: 05/04/2012 14:06:13 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[game_guild_change_max_capacity] ( @guildIDX int , @n int ) AS DECLARE @membercount int, @maxcount int, @guildLevel int SET @membercount = (SELECT count(*) FROM userGuildInfoDB WHERE guildIDX=@guildIDX and guildJoinType=1) SET @guildLevel = (SELECT guildLevel FROM userGuildDB WHERE idx=@guildIDX) IF (@membercount > @n) BEGIN SET @n = @membercount END SET @maxcount = @guildLevel * 8 IF (@maxcount = 0) SET @maxcount = 8 ELSE IF (@maxcount > 32) SET @maxcount = 32 IF (@maxcount < @n) BEGIN SET @n = @maxcount END SELECT @n AS 'returnVal' UPDATE userGuildDB SET membercount=@membercount, maxcount=@n WHERE idx=@guildIDX GO /****** 개체: StoredProcedure [dbo].[web_get_guildIDX] 스크립트 날짜: 05/04/2012 14:07:53 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[web_get_guildIDX] ( @accountIDX int ) AS SELECT guildIDX FROM userGuildInfoDB WITH(NOLOCK) WHERE accountIDX=@accountIDX and guildJoinType=1 GO /****** 개체: StoredProcedure [dbo].[game_guild_user_nick_get_data] 스크립트 날짜: 05/04/2012 14:06:21 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[game_guild_user_nick_get_data] ( @nickname varchar(20) ) AS SELECT guildIDX FROM userGuildInfoDB WHERE accountIDX=(SELECT accountIDX FROM userMemberDB WHERE nickName=@nickname) and guildJoinType=1 GO /****** 개체: StoredProcedure [dbo].[game_friend_join_in] 스크립트 날짜: 05/04/2012 14:06:08 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[game_friend_join_in] ( @accountIDX int , @friendNick varchar(20) ) AS DECLARE @cnt int, @errcount int, @friendIDX int, @guildIDX int SET @cnt = 0 SET @errcount = 0 SET @friendIDX = isNull((SELECT accountIDX FROM userMemberDB where nickName=@friendNick), -1) if (@friendIDX < 0) BEGIN SET @errcount = 2 SELECT @errcount AS 'returnVal' RETURN END SET @cnt = (SELECT count(*) FROM userFriendDB WHERE userAccIDX=@accountIDX and friendAccIDX=@friendIDX and flag=0) if (@cnt > 0) BEGIN SET @errcount = 3 SELECT @errcount AS 'returnVal' RETURN END SET @cnt = (SELECT count(*) FROM userFriendDB WHERE userAccIDX=@accountIDX and friendAccIDX=@friendIDX and flag=1) if (@cnt > 0) BEGIN SET @errcount = 4 SELECT @errcount AS 'returnVal' RETURN END SET @cnt = (SELECT count(*) FROM userFriendDB WHERE userAccIDX=@friendIDX and friendAccIDX=@accountIDX and flag=0) if (@cnt > 0) BEGIN SET @errcount = 5 SELECT @errcount AS 'returnVal' RETURN END SET @cnt = 0 SET @guildIDX = ISNULL((SELECT guildIDX FROM userGuildInfoDB WHERE accountIDX=@accountIDX and guildJoinType=1), -1) if (@guildIDX > 0) BEGIN SET @cnt = (SELECT count(*) FROM userGuildInfoDB WHERE guildIDX=@guildIDX and accountIDX=@friendIDX and guildJoinType=1) END if (@cnt > 0) BEGIN SET @errcount = 6 SELECT @errcount AS 'returnVal' RETURN END if (@errcount > 0) BEGIN SELECT @errcount AS 'returnVal' END else BEGIN SELECT 1 AS 'returnVal' INSERT INTO userFriendDB (userAccIDX, friendAccIDX, flag, regDate) VALUES (@friendIDX, @accountIDX, 0, getdate()) END GO /****** 개체: StoredProcedure [dbo].[game_guild_join_self_init] 스크립트 날짜: 05/04/2012 14:06:16 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[game_guild_join_self_init] ( @accountIDX int ) AS DELETE FROM userGuildInfoDB WHERE accountIDX=@accountIDX and guildJoinType=0 GO /****** 개체: StoredProcedure [dbo].[game_friend_join_app] 스크립트 날짜: 05/04/2012 14:06:08 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[game_friend_join_app] ( @accountIDX int , @friendIDX int ) AS SET XACT_ABORT ON DECLARE @default int, @cnt int, @errcount int, @guildIDX int, @myextend int, @youextend int SET @default = 100 --디폴트 친구 제한 수 SET @cnt = 0 SET @errcount = 0 SET @cnt = (SELECT count(*) FROM userMemberDB where accountIDX=@friendIDX) if (@cnt = 0) BEGIN SET @errcount = 2 SELECT @errcount AS 'returnVal' RETURN END SET @myextend = (SELECT isNull(sum(case item1_type when 4000002 then item1_value1 else 0 end), 0) + isNull(sum(case item2_type when 4000002 then item2_value1 else 0 end), 0) + isNull(sum(case item3_type when 4000002 then item3_value1 else 0 end), 0) + isNull(sum(case item4_type when 4000002 then item4_value1 else 0 end), 0) + isNull(sum(case item5_type when 4000002 then item5_value1 else 0 end), 0) + isNull(sum(case item6_type when 4000002 then item6_value1 else 0 end), 0) + isNull(sum(case item7_type when 4000002 then item7_value1 else 0 end), 0) + isNull(sum(case item8_type when 4000002 then item8_value1 else 0 end), 0) + isNull(sum(case item9_type when 4000002 then item9_value1 else 0 end), 0) + isNull(sum(case item10_type when 4000002 then item10_value1 else 0 end), 0) + isNull(sum(case item11_type when 4000002 then item11_value1 else 0 end), 0) + isNull(sum(case item12_type when 4000002 then item12_value1 else 0 end), 0) + isNull(sum(case item13_type when 4000002 then item13_value1 else 0 end), 0) + isNull(sum(case item14_type when 4000002 then item14_value1 else 0 end), 0) + isNull(sum(case item15_type when 4000002 then item15_value1 else 0 end), 0) + isNull(sum(case item16_type when 4000002 then item16_value1 else 0 end), 0) + isNull(sum(case item17_type when 4000002 then item17_value1 else 0 end), 0) + isNull(sum(case item18_type when 4000002 then item18_value1 else 0 end), 0) + isNull(sum(case item19_type when 4000002 then item19_value1 else 0 end), 0) + isNull(sum(case item20_type when 4000002 then item20_value1 else 0 end), 0) FROM userItemEtcDB WHERE accountIDX=@accountIDX) SET @cnt = (SELECT count(*) FROM userFriendDB where userAccIDX=@accountIDX and flag=1 and friendAccIDX not in (SELECT accountIDX FROM userMemberDB WHERE userType < 10)) if (@cnt >= (@myextend + @default)) BEGIN SET @errcount = 3 SELECT @errcount AS 'returnVal' RETURN END SET @youextend = (SELECT isNull(sum(case item1_type when 4000002 then item1_value1 else 0 end), 0) + isNull(sum(case item2_type when 4000002 then item2_value1 else 0 end), 0) + isNull(sum(case item3_type when 4000002 then item3_value1 else 0 end), 0) + isNull(sum(case item4_type when 4000002 then item4_value1 else 0 end), 0) + isNull(sum(case item5_type when 4000002 then item5_value1 else 0 end), 0) + isNull(sum(case item6_type when 4000002 then item6_value1 else 0 end), 0) + isNull(sum(case item7_type when 4000002 then item7_value1 else 0 end), 0) + isNull(sum(case item8_type when 4000002 then item8_value1 else 0 end), 0) + isNull(sum(case item9_type when 4000002 then item9_value1 else 0 end), 0) + isNull(sum(case item10_type when 4000002 then item10_value1 else 0 end), 0) + isNull(sum(case item11_type when 4000002 then item11_value1 else 0 end), 0) + isNull(sum(case item12_type when 4000002 then item12_value1 else 0 end), 0) + isNull(sum(case item13_type when 4000002 then item13_value1 else 0 end), 0) + isNull(sum(case item14_type when 4000002 then item14_value1 else 0 end), 0) + isNull(sum(case item15_type when 4000002 then item15_value1 else 0 end), 0) + isNull(sum(case item16_type when 4000002 then item16_value1 else 0 end), 0) + isNull(sum(case item17_type when 4000002 then item17_value1 else 0 end), 0) + isNull(sum(case item18_type when 4000002 then item18_value1 else 0 end), 0) + isNull(sum(case item19_type when 4000002 then item19_value1 else 0 end), 0) + isNull(sum(case item20_type when 4000002 then item20_value1 else 0 end), 0) FROM userItemEtcDB WHERE accountIDX=@friendIDX) SET @cnt = (SELECT count(*) FROM userFriendDB where userAccIDX=@friendIDX and flag=1 and friendAccIDX not in (SELECT accountIDX FROM userMemberDB WHERE userType < 10)) if (@cnt >= (@youextend + @default)) BEGIN SET @errcount = 4 SELECT @errcount AS 'returnVal' RETURN END SET @cnt = (SELECT count(*) FROM userFriendDB where userAccIDX=@accountIDX and friendAccIDX=@friendIDX and flag=1) if (@cnt > 0) BEGIN SET @errcount = 5 SELECT @errcount AS 'returnVal' RETURN END SET @cnt = 0 SET @guildIDX = ISNULL((SELECT guildIDX FROM userGuildInfoDB WHERE accountIDX=@accountIDX and guildJoinType=1), -1) if (@guildIDX > 0) BEGIN SET @cnt = (SELECT count(*) FROM userGuildInfoDB WHERE guildIDX=@guildIDX and accountIDX=@friendIDX and guildJoinType=1) END if (@cnt > 0) BEGIN SET @errcount = 6 SELECT @errcount AS 'returnVal' RETURN END BEGIN TRAN if (@errcount = 0) BEGIN SELECT 1 AS 'returnVal' DELETE FROM userFriendDB WHERE userAccIDX=@accountIDX and friendAccIDX=@friendIDX and flag=0 INSERT INTO userFriendDB (userAccIDX, friendAccIDX, flag, regDate) VALUES (@accountIDX, @friendIDX, 1, getdate()) INSERT INTO userFriendDB (userAccIDX, friendAccIDX, flag, regDate) VALUES (@friendIDX, @accountIDX, 1, getdate()) END COMMIT TRAN GO /****** 개체: StoredProcedure [dbo].[game_guild_join_in] 스크립트 날짜: 05/04/2012 14:06:16 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[game_guild_join_in] ( @accountIDX int , @guildIDX int ) AS DECLARE @cnt int, @errcount int, @maxcount int SET @cnt = 0 SET @errcount = 0 SET @cnt = (SELECT count(*) FROM userGuildInfoDB WHERE accountIDX=@accountIDX and guildJoinType > 0) if (@cnt > 0) BEGIN SET @errcount = 2 SELECT @errcount AS 'returnVal' RETURN END SET @cnt = (SELECT count(*) FROM userGuildInfoDB WHERE guildIDX=@guildIDX and guildJoinType = 0) if (@cnt >= 16) BEGIN SET @errcount = 3 SELECT @errcount AS 'returnVal' RETURN END SET @maxcount = isNull((SELECT maxcount FROM userGuildDB WHERE idx=@guildIDX), 0) SET @cnt = (SELECT count(*) FROM userGuildInfoDB WHERE guildIDX=@guildIDX and guildJoinType = 1) if (@maxcount <= @cnt) BEGIN SET @errcount = 4 SELECT @errcount AS 'returnVal' RETURN END if (@errcount = 0) BEGIN SELECT 1 AS 'returnVal' INSERT INTO userGuildInfoDB (accountIDX, guildIDX, guildPosition, guildJoinType, regDate) VALUES (@accountIDX, @guildIDX, '길드원', 0, getdate()) END GO /****** 개체: StoredProcedure [dbo].[game_guild_join_app] 스크립트 날짜: 05/04/2012 14:06:15 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[game_guild_join_app] ( @accountIDX int , @guildIDX int ) AS SET XACT_ABORT ON DECLARE @cnt int SET @cnt = 0 SET @cnt = (SELECT count(*) FROM userGuildInfoDB WHERE guildIDX=@guildIDX and accountIDX=@accountIDX and guildJoinType = 0) BEGIN TRAN if (@cnt = 0) BEGIN SELECT 2 AS 'returnVal' END else BEGIN SELECT 1 AS 'returnVal' UPDATE userGuildInfoDB SET guildJoinType=1, msg=1 WHERE guildIDX=@guildIDX and accountIDX=@accountIDX UPDATE userGuildDB SET membercount = membercount + 1 WHERE idx=@guildIDX DELETE FROM userGuildInfoDB WHERE guildIDX <> @guildIDX and accountIDX=@accountIDX and guildJoinType = 0 DELETE FROM userFriendDB WHERE userAccIDX=@accountIDX and friendAccIDX in (SELECT accountIDX FROM userGuildInfoDB WHERE guildIDX=@guildIDX and guildJoinType=1) DELETE FROM userFriendDB WHERE userAccIDX in (SELECT accountIDX FROM userGuildInfoDB WHERE guildIDX=@guildIDX and guildJoinType=1) and friendAccIDX=@accountIDX END COMMIT TRAN GO /****** 개체: StoredProcedure [dbo].[web_memberout_get_guild_info] 스크립트 날짜: 05/04/2012 14:08:20 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[web_memberout_get_guild_info] ( @accountIDX int ) AS SELECT guildIDX, guildPosition FROM userGuildInfoDB WHERE accountIDX=@accountIDX GO /****** 개체: StoredProcedure [dbo].[game_guild_login_get_data] 스크립트 날짜: 05/04/2012 14:06:17 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[game_guild_login_get_data] ( @accountIDX int ) AS SELECT b.idx, b.guildName, b.guildmark, a.guildPosition, a.msg, b.regionType FROM userGuildInfoDB a INNER JOIN userGuildDB b ON a.guildIDX = b.idx WHERE a.accountIDX = @accountIDX and a.guildJoinType in (-1, 1) GO /****** 개체: StoredProcedure [dbo].[game_guild_user_get_data] 스크립트 날짜: 05/04/2012 14:06:21 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[game_guild_user_get_data] ( @accountIDX int ) AS SELECT idx, guildName, guildmark FROM userGuildDB WHERE idx=(SELECT guildIDX FROM userGuildInfoDB WHERE @accountIDX=accountIDX and guildJoinType=1) GO /****** 개체: StoredProcedure [dbo].[web_minihome_guild_member_count] 스크립트 날짜: 05/04/2012 14:08:25 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[web_minihome_guild_member_count] ( @guildIDX int ) AS SELECT count(*) FROM userGuildInfoDB WITH(NOLOCK) WHERE guildIDX=@guildIDX and guildJoinType=1 GO /****** 개체: StoredProcedure [dbo].[web_friend_guild_member_count] 스크립트 날짜: 05/04/2012 14:07:46 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[web_friend_guild_member_count] ( @accountIDX int , @guildIDX int ) AS SELECT count(*) FROM userGuildInfoDB WITH(NOLOCK) WHERE guildIDX=@guildIDX and accountIDX <> @accountIDX and guildJoinType=1 GO /****** 개체: StoredProcedure [dbo].[web_friend_guild_member_list] 스크립트 날짜: 05/04/2012 14:07:46 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[web_friend_guild_member_list] ( @guildIDX int , @accountIDX int ) AS SELECT accountIDX FROM userGuildInfoDB WITH(NOLOCK) WHERE guildIDX = @guildIDX and guildJoinType=1 GO /****** 개체: StoredProcedure [dbo].[web_memberout_guild_join_count] 스크립트 날짜: 05/04/2012 14:08:21 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[web_memberout_guild_join_count] ( @guildIDX int ) AS SELECT count(*) FROM userGuildInfoDB WHERE guildIDX=@guildIDX and guildJoinType=1 GO /****** 개체: StoredProcedure [dbo].[game_guild_member_get_list2] 스크립트 날짜: 05/04/2012 14:06:18 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[game_guild_member_get_list2] ( @guildIDX int ) AS SELECT a.idx, a.accountIDX, b.userLevel, c.nickName, a.guildPosition FROM userGuildInfoDB a INNER JOIN userGameDB b ON a.accountIDX = b.accountIDX INNER JOIN userMemberDB c ON a.accountIDX = c.accountIDX WHERE guildIDX = @guildIDX and guildJoinType=1 ORDER BY a.idx ASC GO /****** 개체: StoredProcedure [dbo].[web_guild_hp_get_guildIDX] 스크립트 날짜: 05/04/2012 14:07:58 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[web_guild_hp_get_guildIDX] ( @accountIDX int ) AS SELECT guildIDX FROM userGuildInfoDB WITH(NOLOCK) WHERE accountIDX=@accountIDX and guildJoinType=1 GO /****** 개체: StoredProcedure [dbo].[web_guild_hp_get_submaster_nkckname] 스크립트 날짜: 05/04/2012 14:07:59 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[web_guild_hp_get_submaster_nkckname] ( @guildIDX int ) AS SELECT accountIDX, nickname FROM userMemberDB WITH(NOLOCK) WHERE accountIDX=(SELECT accountIDX FROM userGuildInfoDB WITH(NOLOCK) WHERE guildIDX=@guildIDX and guildjoinType=1 and guildPosition='부길드장') GO /****** 개체: StoredProcedure [dbo].[web_guild_hp_get_master_nkckname] 스크립트 날짜: 05/04/2012 14:07:58 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[web_guild_hp_get_master_nkckname] ( @guildIDX int ) AS SELECT accountIDX, nickname FROM userMemberDB WITH(NOLOCK) WHERE accountIDX=(SELECT accountIDX FROM userGuildInfoDB WHERE guildIDX=@guildIDX and guildjoinType=1 and guildPosition='길드장') GO /****** 개체: StoredProcedure [dbo].[web_guild_member_list_is] 스크립트 날짜: 05/04/2012 14:08:00 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[web_guild_member_list_is] ( @guildIDX int , @accountIDX int ) AS SELECT count(*) FROM userGuildInfoDB WHERE guildIDX = @guildIDX and accountIDX = @accountIDX and guildJoinType=1 GO /****** 개체: StoredProcedure [dbo].[web_guild_hp_member_count] 스크립트 날짜: 05/04/2012 14:07:59 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[web_guild_hp_member_count] ( @guildIDX int ) AS SELECT count(*) FROM userGuildInfoDB WITH(NOLOCK) WHERE guildIDX=@guildIDX and guildJoinType=1 GO /****** 개체: StoredProcedure [dbo].[game_guild_member_get_list3] 스크립트 날짜: 05/04/2012 14:06:18 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[game_guild_member_get_list3] ( @guildIDX int ) AS SELECT accountIDX FROM userGuildInfoDB WHERE guildIDX = @guildIDX and guildJoinType=1 ORDER BY idx ASC GO /****** 개체: StoredProcedure [dbo].[web_guild_get_position] 스크립트 날짜: 05/04/2012 14:07:57 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[web_guild_get_position] ( @accountIDX int , @guildIDX int ) AS SELECT guildPosition FROM userGuildInfoDB WITH(NOLOCK) WHERE guildIDX = @guildIDX and accountIDX = @accountIDX and guildJoinType=1 GO /****** 개체: StoredProcedure [dbo].[game_item_etc_add] 스크립트 날짜: 05/04/2012 14:06:30 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[game_item_etc_add] ( @accountIDX int , @item1_type int , @item1_value1 int , @item1_value2 int , @item2_type int , @item2_value1 int , @item2_value2 int , @item3_type int , @item3_value1 int , @item3_value2 int , @item4_type int , @item4_value1 int , @item4_value2 int , @item5_type int , @item5_value1 int , @item5_value2 int , @item6_type int , @item6_value1 int , @item6_value2 int , @item7_type int , @item7_value1 int , @item7_value2 int , @item8_type int , @item8_value1 int , @item8_value2 int , @item9_type int , @item9_value1 int , @item9_value2 int , @item10_type int , @item10_value1 int , @item10_value2 int , @item11_type int , @item11_value1 int , @item11_value2 int , @item12_type int , @item12_value1 int , @item12_value2 int , @item13_type int , @item13_value1 int , @item13_value2 int , @item14_type int , @item14_value1 int , @item14_value2 int , @item15_type int , @item15_value1 int , @item15_value2 int , @item16_type int , @item16_value1 int , @item16_value2 int , @item17_type int , @item17_value1 int , @item17_value2 int , @item18_type int , @item18_value1 int , @item18_value2 int , @item19_type int , @item19_value1 int , @item19_value2 int , @item20_type int , @item20_value1 int , @item20_value2 int ) As Insert into userItemEtcDB (accountIDX, item1_type, item1_value1, item1_value2, item2_type, item2_value1, item2_value2, item3_type, item3_value1, item3_value2, item4_type, item4_value1, item4_value2, item5_type, item5_value1, item5_value2, item6_type, item6_value1, item6_value2, item7_type, item7_value1, item7_value2, item8_type, item8_value1, item8_value2, item9_type, item9_value1, item9_value2, item10_type, item10_value1, item10_value2, item11_type, item11_value1, item11_value2, item12_type, item12_value1, item12_value2, item13_type, item13_value1, item13_value2, item14_type, item14_value1, item14_value2, item15_type, item15_value1, item15_value2, item16_type, item16_value1, item16_value2, item17_type, item17_value1, item17_value2, item18_type, item18_value1, item18_value2, item19_type, item19_value1, item19_value2, item20_type, item20_value1, item20_value2) values (@accountIDX, @item1_type, @item1_value1, @item1_value2, @item2_type, @item2_value1, @item2_value2, @item3_type, @item3_value1, @item3_value2, @item4_type, @item4_value1, @item4_value2, @item5_type, @item5_value1, @item5_value2, @item6_type, @item6_value1, @item6_value2, @item7_type, @item7_value1, @item7_value2, @item8_type, @item8_value1, @item8_value2, @item9_type, @item9_value1, @item9_value2, @item10_type, @item10_value1, @item10_value2, @item11_type, @item11_value1, @item11_value2, @item12_type, @item12_value1, @item12_value2, @item13_type, @item13_value1, @item13_value2, @item14_type, @item14_value1, @item14_value2, @item15_type, @item15_value1, @item15_value2, @item16_type, @item16_value1, @item16_value2, @item17_type, @item17_value1, @item17_value2, @item18_type, @item18_value1, @item18_value2, @item19_type, @item19_value1, @item19_value2, @item20_type, @item20_value1, @item20_value2) GO /****** 개체: StoredProcedure [dbo].[game_item_etc_get_data_list] 스크립트 날짜: 05/04/2012 14:06:30 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[game_item_etc_get_data_list] ( @accountIDX int ) As SELECT idx, item1_type, item1_value1, item1_value2, item2_type, item2_value1, item2_value2, item3_type, item3_value1, item3_value2, item4_type, item4_value1, item4_value2, item5_type, item5_value1, item5_value2, item6_type, item6_value1, item6_value2, item7_type, item7_value1, item7_value2, item8_type, item8_value1, item8_value2, item9_type, item9_value1, item9_value2, item10_type, item10_value1, item10_value2, item11_type, item11_value1, item11_value2, item12_type, item12_value1, item12_value2, item13_type, item13_value1, item13_value2, item14_type, item14_value1, item14_value2, item15_type, item15_value1, item15_value2, item16_type, item16_value1, item16_value2, item17_type, item17_value1, item17_value2, item18_type, item18_value1, item18_value2, item19_type, item19_value1, item19_value2, item20_type, item20_value1, item20_value2 FROM userItemEtcDB WHERE accountIDX = @accountIDX GO /****** 개체: StoredProcedure [dbo].[game_item_etc_save] 스크립트 날짜: 05/04/2012 14:06:33 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[game_item_etc_save] ( @idx int , @item1_type int , @item1_value1 int , @item1_value2 int , @item2_type int , @item2_value1 int , @item2_value2 int , @item3_type int , @item3_value1 int , @item3_value2 int , @item4_type int , @item4_value1 int , @item4_value2 int , @item5_type int , @item5_value1 int , @item5_value2 int , @item6_type int , @item6_value1 int , @item6_value2 int , @item7_type int , @item7_value1 int , @item7_value2 int , @item8_type int , @item8_value1 int , @item8_value2 int , @item9_type int , @item9_value1 int , @item9_value2 int , @item10_type int , @item10_value1 int , @item10_value2 int , @item11_type int , @item11_value1 int , @item11_value2 int , @item12_type int , @item12_value1 int , @item12_value2 int , @item13_type int , @item13_value1 int , @item13_value2 int , @item14_type int , @item14_value1 int , @item14_value2 int , @item15_type int , @item15_value1 int , @item15_value2 int , @item16_type int , @item16_value1 int , @item16_value2 int , @item17_type int , @item17_value1 int , @item17_value2 int , @item18_type int , @item18_value1 int , @item18_value2 int , @item19_type int , @item19_value1 int , @item19_value2 int , @item20_type int , @item20_value1 int , @item20_value2 int ) As UPDATE userItemEtcDB SET item1_type = @item1_type , item1_value1 = @item1_value1 , item1_value2 = @item1_value2 , item2_type = @item2_type , item2_value1 = @item2_value1 , item2_value2 = @item2_value2 , item3_type = @item3_type , item3_value1 = @item3_value1 , item3_value2 = @item3_value2 , item4_type = @item4_type , item4_value1 = @item4_value1 , item4_value2 = @item4_value2 , item5_type = @item5_type , item5_value1 = @item5_value1 , item5_value2 = @item5_value2 , item6_type = @item6_type , item6_value1 = @item6_value1 , item6_value2 = @item6_value2 , item7_type = @item7_type , item7_value1 = @item7_value1 , item7_value2 = @item7_value2 , item8_type = @item8_type , item8_value1 = @item8_value1 , item8_value2 = @item8_value2 , item9_type = @item9_type , item9_value1 = @item9_value1 , item9_value2 = @item9_value2 , item10_type = @item10_type , item10_value1 = @item10_value1 , item10_value2 = @item10_value2 , item11_type = @item11_type , item11_value1 = @item11_value1 , item11_value2 = @item11_value2 , item12_type = @item12_type , item12_value1 = @item12_value1 , item12_value2 = @item12_value2 , item13_type = @item13_type , item13_value1 = @item13_value1 , item13_value2 = @item13_value2 , item14_type = @item14_type , item14_value1 = @item14_value1 , item14_value2 = @item14_value2 , item15_type = @item15_type , item15_value1 = @item15_value1 , item15_value2 = @item15_value2 , item16_type = @item16_type , item16_value1 = @item16_value1 , item16_value2 = @item16_value2 , item17_type = @item17_type , item17_value1 = @item17_value1 , item17_value2 = @item17_value2 , item18_type = @item18_type , item18_value1 = @item18_value1 , item18_value2 = @item18_value2 , item19_type = @item19_type , item19_value1 = @item19_value1 , item19_value2 = @item19_value2 , item20_type = @item20_type , item20_value1 = @item20_value1 , item20_value2 = @item20_value2 WHERE idx = @idx GO /****** 개체: StoredProcedure [dbo].[web_friend_count_extend] 스크립트 날짜: 05/04/2012 14:07:45 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[web_friend_count_extend] ( @accountIDX int ) AS SELECT isNull(sum(case item1_type when 4000002 then item1_value1 else 0 end), 0) + isNull(sum(case item2_type when 4000002 then item2_value1 else 0 end), 0) + isNull(sum(case item3_type when 4000002 then item3_value1 else 0 end), 0) + isNull(sum(case item4_type when 4000002 then item4_value1 else 0 end), 0) + isNull(sum(case item5_type when 4000002 then item5_value1 else 0 end), 0) + isNull(sum(case item6_type when 4000002 then item6_value1 else 0 end), 0) + isNull(sum(case item7_type when 4000002 then item7_value1 else 0 end), 0) + isNull(sum(case item8_type when 4000002 then item8_value1 else 0 end), 0) + isNull(sum(case item9_type when 4000002 then item9_value1 else 0 end), 0) + isNull(sum(case item10_type when 4000002 then item10_value1 else 0 end), 0) + isNull(sum(case item11_type when 4000002 then item11_value1 else 0 end), 0) + isNull(sum(case item12_type when 4000002 then item12_value1 else 0 end), 0) + isNull(sum(case item13_type when 4000002 then item13_value1 else 0 end), 0) + isNull(sum(case item14_type when 4000002 then item14_value1 else 0 end), 0) + isNull(sum(case item15_type when 4000002 then item15_value1 else 0 end), 0) + isNull(sum(case item16_type when 4000002 then item16_value1 else 0 end), 0) + isNull(sum(case item17_type when 4000002 then item17_value1 else 0 end), 0) + isNull(sum(case item18_type when 4000002 then item18_value1 else 0 end), 0) + isNull(sum(case item19_type when 4000002 then item19_value1 else 0 end), 0) + isNull(sum(case item20_type when 4000002 then item20_value1 else 0 end), 0) AS 'extendcnt' FROM userItemEtcDB WITH(NOLOCK) WHERE accountIDX=@accountIDX GO /****** 개체: StoredProcedure [dbo].[game_item_etc_get_self_index] 스크립트 날짜: 05/04/2012 14:06:30 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[game_item_etc_get_self_index] ( @accountIDX int ) AS SELECT TOP 1 idx FROM userItemEtcDB WHERE accountIDX = @accountIDX ORDER BY idx DESC GO /****** 개체: StoredProcedure [dbo].[game_region_get_point] 스크립트 날짜: 05/04/2012 14:07:20 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[game_region_get_point] AS SELECT rt1point, rt1point_today, rt1point_bonus, rt2point, rt2point_today, rt2point_bonus FROM userRegionDB GO /****** 개체: StoredProcedure [dbo].[web_guild_get_region_point] 스크립트 날짜: 05/04/2012 14:07:57 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[web_guild_get_region_point] AS SELECT rt1point, rt2point FROM userRegionDB WITH(NOLOCK) GO /****** 개체: StoredProcedure [dbo].[game_region_save] 스크립트 날짜: 05/04/2012 14:07:20 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[game_region_save] ( @rt1point int , @rt1point_today int , @rt1point_bonus int , @rt2point int , @rt2point_today int , @rt2point_bonus int ) AS UPDATE userRegionDB SET rt1point = @rt1point , rt1point_today = @rt1point_today , rt1point_bonus = @rt1point_bonus , rt2point = @rt2point , rt2point_today = @rt2point_today , rt2point_bonus = @rt2point_bonus GO /****** 개체: StoredProcedure [dbo].[game_item_extra_get_customidx] 스크립트 날짜: 05/04/2012 14:06:38 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[game_item_extra_get_customidx] ( @accountIDX int ) AS BEGIN TRAN SELECT MAX(idx) FROM define_gear_customidx INSERT INTO define_gear_customidx (accountIDX) values (@accountIDX) COMMIT TRAN GO /****** 개체: StoredProcedure [dbo].[game_item_extra_add] 스크립트 날짜: 05/04/2012 14:06:38 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[game_item_extra_add] ( @accountIDX int , @item1_type int , @item1_reinforce int , @item1_slotindex int , @item1_tradeType int , @item1_limitType int , @item1_mcustom int , @item1_fcustom int , @item1_limitDate datetime , @item2_type int , @item2_reinforce int , @item2_slotindex int , @item2_tradeType int , @item2_limitType int , @item2_mcustom int , @item2_fcustom int , @item2_limitDate datetime , @item3_type int , @item3_reinforce int , @item3_slotindex int , @item3_tradeType int , @item3_limitType int , @item3_mcustom int , @item3_fcustom int , @item3_limitDate datetime , @item4_type int , @item4_reinforce int , @item4_slotindex int , @item4_tradeType int , @item4_limitType int , @item4_mcustom int , @item4_fcustom int , @item4_limitDate datetime , @item5_type int , @item5_reinforce int , @item5_slotindex int , @item5_tradeType int , @item5_limitType int , @item5_mcustom int , @item5_fcustom int , @item5_limitDate datetime , @item6_type int , @item6_reinforce int , @item6_slotindex int , @item6_tradeType int , @item6_limitType int , @item6_mcustom int , @item6_fcustom int , @item6_limitDate datetime , @item7_type int , @item7_reinforce int , @item7_slotindex int , @item7_tradeType int , @item7_limitType int , @item7_mcustom int , @item7_fcustom int , @item7_limitDate datetime , @item8_type int , @item8_reinforce int , @item8_slotindex int , @item8_tradeType int , @item8_limitType int , @item8_mcustom int , @item8_fcustom int , @item8_limitDate datetime , @item9_type int , @item9_reinforce int , @item9_slotindex int , @item9_tradeType int , @item9_limitType int , @item9_mcustom int , @item9_fcustom int , @item9_limitDate datetime , @item10_type int , @item10_reinforce int , @item10_slotindex int , @item10_tradeType int , @item10_limitType int , @item10_mcustom int , @item10_fcustom int , @item10_limitDate datetime ) AS INSERT INTO userItemExtraDB (accountIDX, item1_type, item1_reinforce, item1_slotindex, item1_tradetype, item1_mcustom, item1_fcustom, item1_limitType, item1_limitDate, item2_type, item2_reinforce, item2_slotindex, item2_tradetype, item2_mcustom, item2_fcustom, item2_limitType, item2_limitDate, item3_type, item3_reinforce, item3_slotindex, item3_tradetype, item3_mcustom, item3_fcustom, item3_limitType, item3_limitDate, item4_type, item4_reinforce, item4_slotindex, item4_tradetype, item4_mcustom, item4_fcustom, item4_limitType, item4_limitDate, item5_type, item5_reinforce, item5_slotindex, item5_tradetype, item5_mcustom, item5_fcustom, item5_limitType, item5_limitDate, item6_type, item6_reinforce, item6_slotindex, item6_tradetype, item6_mcustom, item6_fcustom, item6_limitType, item6_limitDate, item7_type, item7_reinforce, item7_slotindex, item7_tradetype, item7_mcustom, item7_fcustom, item7_limitType, item7_limitDate, item8_type, item8_reinforce, item8_slotindex, item8_tradetype, item8_mcustom, item8_fcustom, item8_limitType, item8_limitDate, item9_type, item9_reinforce, item9_slotindex, item9_tradetype, item9_mcustom, item9_fcustom, item9_limitType, item9_limitDate, item10_type, item10_reinforce, item10_slotindex, item10_tradetype, item10_mcustom, item10_fcustom, item10_limitType, item10_limitDate, regDate ) VALUES (@accountIDX, @item1_type, @item1_reinforce, @item1_slotindex, @item1_tradetype, @item1_mcustom, @item1_fcustom, @item1_limitType, @item1_limitDate, @item2_type, @item2_reinforce, @item2_slotindex, @item2_tradetype, @item2_mcustom, @item2_fcustom, @item2_limitType, @item2_limitDate, @item3_type, @item3_reinforce, @item3_slotindex, @item3_tradetype, @item3_mcustom, @item3_fcustom, @item3_limitType, @item3_limitDate, @item4_type, @item4_reinforce, @item4_slotindex, @item4_tradetype, @item4_mcustom, @item4_fcustom, @item4_limitType, @item4_limitDate, @item5_type, @item5_reinforce, @item5_slotindex, @item5_tradetype, @item5_mcustom, @item5_fcustom, @item5_limitType, @item5_limitDate, @item6_type, @item6_reinforce, @item6_slotindex, @item6_tradetype, @item6_mcustom, @item6_fcustom, @item6_limitType, @item6_limitDate, @item7_type, @item7_reinforce, @item7_slotindex, @item7_tradetype, @item7_mcustom, @item7_fcustom, @item7_limitType, @item7_limitDate, @item8_type, @item8_reinforce, @item8_slotindex, @item8_tradetype, @item8_mcustom, @item8_fcustom, @item8_limitType, @item8_limitDate, @item9_type, @item9_reinforce, @item9_slotindex, @item9_tradetype, @item9_mcustom, @item9_fcustom, @item9_limitType, @item9_limitDate, @item10_type, @item10_reinforce, @item10_slotindex, @item10_tradetype, @item10_mcustom, @item10_fcustom, @item10_limitType, @item10_limitDate, getdate() ) GO /****** 개체: StoredProcedure [dbo].[game_item_extra_save] 스크립트 날짜: 05/04/2012 14:06:43 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[game_item_extra_save] ( @idx int , @item1_type int , @item1_reinforce int , @item1_slotindex int , @item1_tradeType int , @item1_limitType int , @item1_mcustom int , @item1_fcustom int , @item1_limitDate datetime , @item2_type int , @item2_reinforce int , @item2_slotindex int , @item2_tradeType int , @item2_limitType int , @item2_mcustom int , @item2_fcustom int , @item2_limitDate datetime , @item3_type int , @item3_reinforce int , @item3_slotindex int , @item3_tradeType int , @item3_limitType int , @item3_mcustom int , @item3_fcustom int , @item3_limitDate datetime , @item4_type int , @item4_reinforce int , @item4_slotindex int , @item4_tradeType int , @item4_limitType int , @item4_mcustom int , @item4_fcustom int , @item4_limitDate datetime , @item5_type int , @item5_reinforce int , @item5_slotindex int , @item5_tradeType int , @item5_limitType int , @item5_mcustom int , @item5_fcustom int , @item5_limitDate datetime , @item6_type int , @item6_reinforce int , @item6_slotindex int , @item6_tradeType int , @item6_limitType int , @item6_mcustom int , @item6_fcustom int , @item6_limitDate datetime , @item7_type int , @item7_reinforce int , @item7_slotindex int , @item7_tradeType int , @item7_limitType int , @item7_mcustom int , @item7_fcustom int , @item7_limitDate datetime , @item8_type int , @item8_reinforce int , @item8_slotindex int , @item8_tradeType int , @item8_limitType int , @item8_mcustom int , @item8_fcustom int , @item8_limitDate datetime , @item9_type int , @item9_reinforce int , @item9_slotindex int , @item9_tradeType int , @item9_limitType int , @item9_mcustom int , @item9_fcustom int , @item9_limitDate datetime , @item10_type int , @item10_reinforce int , @item10_slotindex int , @item10_tradeType int , @item10_limitType int , @item10_mcustom int , @item10_fcustom int , @item10_limitDate datetime ) AS UPDATE userItemExtraDB SET item1_type = @item1_type , item1_reinforce = @item1_reinforce , item1_slotindex = @item1_slotindex , item1_tradetype = @item1_tradeType , item1_mcustom = @item1_mcustom , item1_fcustom = @item1_fcustom , item1_limitType = @item1_limitType , item1_limitDate = @item1_limitDate , item2_type = @item2_type , item2_reinforce = @item2_reinforce , item2_slotindex = @item2_slotindex , item2_tradetype = @item2_tradeType , item2_mcustom = @item2_mcustom , item2_fcustom = @item2_fcustom , item2_limitType = @item2_limitType , item2_limitDate = @item2_limitDate , item3_type = @item3_type , item3_reinforce = @item3_reinforce , item3_slotindex = @item3_slotindex , item3_tradetype = @item3_tradeType , item3_mcustom = @item3_mcustom , item3_fcustom = @item3_fcustom , item3_limitType = @item3_limitType , item3_limitDate = @item3_limitDate , item4_type = @item4_type , item4_reinforce = @item4_reinforce , item4_slotindex = @item4_slotindex , item4_tradetype = @item4_tradeType , item4_mcustom = @item4_mcustom , item4_fcustom = @item4_fcustom , item4_limitType = @item4_limitType , item4_limitDate = @item4_limitDate , item5_type = @item5_type , item5_reinforce = @item5_reinforce , item5_slotindex = @item5_slotindex , item5_tradetype = @item5_tradeType , item5_mcustom = @item5_mcustom , item5_fcustom = @item5_fcustom , item5_limitType = @item5_limitType , item5_limitDate = @item5_limitDate , item6_type = @item6_type , item6_reinforce = @item6_reinforce , item6_slotindex = @item6_slotindex , item6_tradetype = @item6_tradeType , item6_mcustom = @item6_mcustom , item6_fcustom = @item6_fcustom , item6_limitType = @item6_limitType , item6_limitDate = @item6_limitDate , item7_type = @item7_type , item7_reinforce = @item7_reinforce , item7_slotindex = @item7_slotindex , item7_tradetype = @item7_tradeType , item7_mcustom = @item7_mcustom , item7_fcustom = @item7_fcustom , item7_limitType = @item7_limitType , item7_limitDate = @item7_limitDate , item8_type = @item8_type , item8_reinforce = @item8_reinforce , item8_slotindex = @item8_slotindex , item8_tradetype = @item8_tradeType , item8_mcustom = @item8_mcustom , item8_fcustom = @item8_fcustom , item8_limitType = @item8_limitType , item8_limitDate = @item8_limitDate , item9_type = @item9_type , item9_reinforce = @item9_reinforce , item9_slotindex = @item9_slotindex , item9_tradetype = @item9_tradeType , item9_mcustom = @item9_mcustom , item9_fcustom = @item9_fcustom , item9_limitType = @item9_limitType , item9_limitDate = @item9_limitDate , item10_type = @item10_type , item10_reinforce = @item10_reinforce , item10_slotindex = @item10_slotindex , item10_tradetype = @item10_tradeType , item10_mcustom = @item10_mcustom , item10_fcustom = @item10_fcustom , item10_limitType = @item10_limitType , item10_limitDate = @item10_limitDate WHERE idx=@idx GO /****** 개체: StoredProcedure [dbo].[game_item_extra_get_list] 스크립트 날짜: 05/04/2012 14:06:38 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[game_item_extra_get_list] ( @accountIDX int ) AS SELECT idx , item1_type, item1_reinforce, item1_slotindex, item1_tradetype, item1_limitType, item1_mcustom, item1_fcustom, item1_limitDate , item2_type, item2_reinforce, item2_slotindex, item2_tradetype, item2_limitType, item2_mcustom, item2_fcustom, item2_limitDate , item3_type, item3_reinforce, item3_slotindex, item3_tradetype, item3_limitType, item3_mcustom, item3_fcustom, item3_limitDate , item4_type, item4_reinforce, item4_slotindex, item4_tradetype, item4_limitType, item4_mcustom, item4_fcustom, item4_limitDate , item5_type, item5_reinforce, item5_slotindex, item5_tradetype, item5_limitType, item5_mcustom, item5_fcustom, item5_limitDate , item6_type, item6_reinforce, item6_slotindex, item6_tradetype, item6_limitType, item6_mcustom, item6_fcustom, item6_limitDate , item7_type, item7_reinforce, item7_slotindex, item7_tradetype, item7_limitType, item7_mcustom, item7_fcustom, item7_limitDate , item8_type, item8_reinforce, item8_slotindex, item8_tradetype, item8_limitType, item8_mcustom, item8_fcustom, item8_limitDate , item9_type, item9_reinforce, item9_slotindex, item9_tradetype, item9_limitType, item9_mcustom, item9_fcustom, item9_limitDate , item10_type, item10_reinforce, item10_slotindex, item10_tradetype, item10_limitType, item10_mcustom, item10_fcustom, item10_limitDate FROM userItemExtraDB WHERE accountIDX=@accountIDX GO /****** 개체: StoredProcedure [dbo].[game_friend_dev_add] 스크립트 날짜: 05/04/2012 14:06:07 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[game_friend_dev_add] ( @accountIDX int , @friendNick varchar(20) ) AS DECLARE @cnt int, @errcount int, @friendIDX int SET @cnt = 0 SET @errcount = 0 SET @friendIDX = isNull((SELECT accountIDX FROM userMemberDB where nickName=@friendNick), -1) if (@friendIDX < 0) BEGIN SET @errcount = 2 SELECT @errcount AS 'returnVal' RETURN END SET @cnt = (SELECT count(*) FROM userFriendDB WHERE userAccIDX=@accountIDX and friendAccIDX=@friendIDX and flag=1) if (@cnt > 0) BEGIN SET @errcount = 4 SELECT @errcount AS 'returnVal' RETURN END if (@errcount > 0) BEGIN SELECT @errcount AS 'returnVal' END else BEGIN SELECT 1 AS 'returnVal' INSERT INTO userFriendDB (userAccIDX, friendAccIDX, flag, regDate) VALUES (@friendIDX, @accountIDX, 1, getdate()) INSERT INTO userFriendDB (userAccIDX, friendAccIDX, flag, regDate) VALUES (@accountIDX, @friendIDX, 1, getdate()) END GO /****** 개체: StoredProcedure [dbo].[game_friend_join_delete] 스크립트 날짜: 05/04/2012 14:06:08 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[game_friend_join_delete] ( @idx int ) AS DELETE FROM userFriendDB WHERE idx=@idx and flag=0 GO /****** 개체: StoredProcedure [dbo].[game_friend_list_asc] 스크립트 날짜: 05/04/2012 14:06:09 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[game_friend_list_asc] ( @idx int , @accountIDX int , @topNo int ) AS SET NOCOUNT ON SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED SELECT TOP (@topNo) a.idx, a.friendAccIDX, b.nickName, a.regDate FROM userFriendDB a WITH (INDEX (idx_userAccIDX)) INNER LOOP JOIN userMemberDB b WITH (INDEX (idx_accountIDX)) ON a.friendAccIDX = b.accountIDX WHERE a.userAccIDX = @accountIDX AND a.flag=1 AND a.idx > @idx ORDER BY a.idx ASC GO /****** 개체: StoredProcedure [dbo].[game_friend_save] 스크립트 날짜: 05/04/2012 14:06:09 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[game_friend_save] ( @userAccIDX int , @friendNickName varchar(20) ) As DECLARE @cnt int, @friendAccIDX int SET @friendAccIDX = (SELECT accountIDX FROM userMemberDB WHERE nickname=@friendNickName) SET @cnt = (SELECT COUNT(*) FROM userFriendDB WHERE userAccIDX=@userAccIDX and friendAccIDX=@friendAccIDX) IF (@cnt = 0 and @friendAccIDX is not null) BEGIN INSERT INTO userFriendDB (userAccIDX,friendAccIDX,regDate) VALUES (@userAccIDX,@friendAccIDX,GETDATE()) END GO /****** 개체: StoredProcedure [dbo].[game_friend_delete] 스크립트 날짜: 05/04/2012 14:06:07 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[game_friend_delete] ( @accountIDX int , @friendNick varchar(20) ) AS SET XACT_ABORT ON DECLARE @friendIDX int SET @friendIDX = isNull((SELECT accountIDX FROM userMemberDB WHERE nickName=@friendNick), -1) BEGIN TRAN if (@friendIDX > 0) BEGIN DELETE FROM userFriendDB WHERE userAccIDX=@accountIDX and friendAccIDX=@friendIDX DELETE FROM userFriendDB WHERE friendAccIDX=@accountIDX and userAccIDX=@friendIDX END COMMIT TRAN GO /****** 개체: StoredProcedure [dbo].[web_friend_count_dev] 스크립트 날짜: 05/04/2012 14:07:45 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[web_friend_count_dev] ( @accountIDX int ) AS SELECT count(*) FROM userFriendDB WITH(NOLOCK) WHERE userAccIDX=@accountIDX and flag=1 GO /****** 개체: StoredProcedure [dbo].[web_friend_count] 스크립트 날짜: 05/04/2012 14:07:45 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[web_friend_count] ( @accountIDX int ) AS SELECT count(*) FROM userFriendDB WITH(NOLOCK) WHERE userAccIDX=@accountIDX and flag=1 and friendAccIDX not in (209274,322139,209270,209272,209273,1105,1106,209271,380032,1107,209264,209268,1108,209267,209276,281811,209269,2304,485241,380044,591852,711450,505421,380045,382884,380042,380043,361290,1414836,1871572,1871573,1871574,1896968) GO /****** 개체: StoredProcedure [dbo].[web_minihome_friend_del] 스크립트 날짜: 05/04/2012 14:08:23 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[web_minihome_friend_del] ( @userAccIDX int , @friendAccIDX int ) AS DELETE userFriendDB WHERE userAccIDX = @userAccIDX and friendAccIDX = @friendAccIDX GO /****** 개체: StoredProcedure [dbo].[web_minihome_friend_is] 스크립트 날짜: 05/04/2012 14:08:24 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[web_minihome_friend_is] ( @userAccIDX int , @friendAccIDX int ) As SELECT count(*) FROM userFriendDB WHERE userAccIDX = @userAccIDX and friendAccIDX = @friendAccIDX GO /****** 개체: StoredProcedure [dbo].[web_friend_is] 스크립트 날짜: 05/04/2012 14:07:46 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[web_friend_is] ( @userAccIDX int , @friendAccIDX int ) As SELECT count(*) FROM userFriendDB WITH(NOLOCK) WHERE userAccIDX = @userAccIDX and friendAccIDX = @friendAccIDX and flag=1 GO /****** 개체: StoredProcedure [dbo].[web_friend_delete] 스크립트 날짜: 05/04/2012 14:07:45 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[web_friend_delete] ( @accountIDX int , @friendIDX int ) AS SET XACT_ABORT ON BEGIN TRAN DELETE FROM userFriendDB WHERE userAccIDX=@accountIDX and friendAccIDX=@friendIDX DELETE FROM userFriendDB WHERE friendAccIDX=@accountIDX and userAccIDX=@friendIDX COMMIT TRAN GO /****** 개체: StoredProcedure [dbo].[web_minihome_friend_add] 스크립트 날짜: 05/04/2012 14:08:23 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[web_minihome_friend_add] ( @userAccIDX int , @friendAccIDX int ) As INSERT INTO userFriendDB (userAccIDX, friendAccIDX, regDate) VALUES (@userAccIDX, @friendAccIDX, getdate()) GO /****** 개체: StoredProcedure [dbo].[web_minihome_friend_count] 스크립트 날짜: 05/04/2012 14:08:23 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[web_minihome_friend_count] ( @accountIDX int ) AS SELECT count(*) FROM userFriendDB WHERE userAccIDX=@accountIDX GO /****** 개체: StoredProcedure [dbo].[web_friend_join_in_count] 스크립트 날짜: 05/04/2012 14:07:48 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[web_friend_join_in_count] ( @accountIDX int ) AS SELECT count(*) FROM userFriendDB WITH(NOLOCK) WHERE userAccIDX=@accountIDX and flag=0 GO /****** 개체: StoredProcedure [dbo].[web_friend_join_app] 스크립트 날짜: 05/04/2012 14:07:48 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[web_friend_join_app] ( @accountIDX int , @friendIDX int ) AS SET XACT_ABORT ON BEGIN TRAN DECLARE @cnt tinyint SET @cnt = (SELECT count(*) FROM userFriendDB WITH(NOLOCK) WHERE userAccIDX=@accountIDX and friendAccIDX=@friendIDX and flag=1) IF (@cnt = 0) BEGIN INSERT INTO userFriendDB (userAccIDX, friendAccIDX, flag, regDate) VALUES (@accountIDX, @friendIDX, 1, getdate()) INSERT INTO userFriendDB (userAccIDX, friendAccIDX, flag, regDate) VALUES (@friendIDX, @accountIDX, 1, getdate()) END COMMIT TRAN GO /****** 개체: StoredProcedure [dbo].[web_friend_join] 스크립트 날짜: 05/04/2012 14:07:47 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[web_friend_join] ( @accountIDX int , @friendIDX int ) AS INSERT INTO userFriendDB (userAccIDX, friendAccIDX, flag, regDate) VALUES (@friendIDX, @accountIDX, 0, getdate()) GO /****** 개체: StoredProcedure [dbo].[web_friend_is_join2] 스크립트 날짜: 05/04/2012 14:07:47 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[web_friend_is_join2] ( @userAccIDX int , @friendAccIDX int ) As SELECT count(*) FROM userFriendDB WITH(NOLOCK) WHERE userAccIDX = @userAccIDX and friendAccIDX = @friendAccIDX and flag=0 GO /****** 개체: StoredProcedure [dbo].[web_friend_is_join1] 스크립트 날짜: 05/04/2012 14:07:47 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[web_friend_is_join1] ( @userAccIDX int , @friendAccIDX int ) As SELECT count(*) FROM userFriendDB WITH(NOLOCK) WHERE userAccIDX = @friendAccIDX and friendAccIDX = @userAccIDX and flag=0 GO /****** 개체: StoredProcedure [dbo].[web_friend_is_friend] 스크립트 날짜: 05/04/2012 14:07:47 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[web_friend_is_friend] ( @userAccIDX int , @friendAccIDX int ) As SELECT count(*) FROM userFriendDB WITH(NOLOCK) WHERE userAccIDX = @userAccIDX and friendAccIDX = @friendAccIDX GO /****** 개체: StoredProcedure [dbo].[web_minihome_reg_friend_count] 스크립트 날짜: 05/04/2012 14:08:26 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[web_minihome_reg_friend_count] ( @accountIDX int ) AS SELECT count(*) FROM userFriendDB WITH(NOLOCK) WHERE friendAccIDX=@accountIDX GO /****** 개체: StoredProcedure [dbo].[z_nouse_game_friend_delete] 스크립트 날짜: 05/04/2012 14:09:01 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[z_nouse_game_friend_delete] ( @accountIDX int , @friendNickName varchar(12) ) AS DECLARE @friendAccIDX int SET @friendAccIDX = (SELECT accountIDX FROM userMemberDB WHERE nickname=@friendNickName) DELETE FROM userFriendDB WHERE userAccIDX = @accountIDX and friendAccIDX = @friendAccIDX GO /****** 개체: StoredProcedure [dbo].[game_friend_join_list] 스크립트 날짜: 05/04/2012 14:06:08 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[game_friend_join_list] ( @idx int , @accountIDX int , @topNo int ) AS SET NOCOUNT ON SELECT TOP (@topNo) a.idx, a.friendAccIDX, b.nickName FROM userFriendDB a WITH(NOLOCK) JOIN userMemberDB b WITH(NOLOCK) ON a.friendAccIDX = b.accountIDX WHERE a.userAccIDX = @accountIDX AND flag=0 AND a.idx < @idx ORDER BY a.idx DESC GO /****** 개체: StoredProcedure [dbo].[z_nouse_game_region_season_end_server_close] 스크립트 날짜: 05/04/2012 14:09:04 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[z_nouse_game_region_season_end_server_close] AS BEGIN TRAN DECLARE @inregionpoint int, @inmembercount int, @regionType int, @totalpoint int, @season int DECLARE @masterIDX1 int, @masterIDX2 int DECLARE @const int, @limitRenpoint int, @limitPrepoint int SET @regionType = 1 SET @const = DBO.DEFINE_REGION_LIMIT_CONST() SET @limitRenpoint = DBO.DEFINE_REGION_LIMIT_RENSPOINT() SET @limitPrepoint = DBO.DEFINE_REGION_LIMIT_SE_RENSPOINT() SET @season = isNull((SELECT max(season) FROM userRegionDB), 0) + 1 While (@regionType <= 2) BEGIN SET @inregionpoint = (SELECT SUM(renspoint) FROM userGameDB WHERE regionType=@regionType) SET @totalpoint = (SELECT SUM(renspoint) FROM userGameDB WHERE regionType in (1,2)) SET @inmembercount = (SELECT count(*) FROM userGameDB WHERE regionType=@regionType and renspoint > @limitRenpoint) If (@totalpoint > 0) BEGIN INSERT INTO userPresentDB (sendIDX, receiveIDX, presentType, packet, regDate) SELECT 141 AS 'sendIDX', accountIDX, 4 AS 'presentType', (convert(int, (convert(float, @const) * renspoint * @inmembercount) / convert(float, @totalpoint))) AS 'packet', getdate() AS 'regDate' FROM userGameDB WHERE regionType=@regionType and renspoint > @limitPrepoint -- SELECT 141 AS 'sendIDX', accountIDX, 4 AS 'presentType', (convert(float, @inregionpoint) / @totalpoint) * 10000 * (convert(float, renspoint) / (convert(float, @inregionpoint)/@inmembercount)) AS 'packet', getdate() AS 'regDate' FROM userGameDB WHERE regionType=@regionType and renspoint > @limitPrepoint END SET @regionType = @regionType + 1 INSERT INTO userRegionDB (point, membercount, regionType, season, regDate) VALUES (@inregionpoint, @inmembercount, @regionType, @season, getdate()) END EXEC game_region_init_renspoint COMMIT TRAN GO /****** 개체: StoredProcedure [dbo].[game_region_get_compen] 스크립트 날짜: 05/04/2012 14:07:19 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[game_region_get_compen] ( @accountIDX int ) AS SELECT TOP 1 idx, rt1point, rt1point_bonus, rt1count, rt2point, rt2point_bonus, rt2count, regionType, renspoint, regionRanking FROM userRegionDB_compen WHERE accountIDX=@accountIDX ORDER BY idx DESC GO /****** 개체: StoredProcedure [dbo].[web_get_nickname] 스크립트 날짜: 05/04/2012 14:07:54 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[web_get_nickname] ( @accountIDX int ) As SELECT nickName FROM userMemberDB WITH(NOLOCK) WHERE accountIDX = @accountIDX GO /****** 개체: StoredProcedure [dbo].[web_get_nickname_to_userID] 스크립트 날짜: 05/04/2012 14:07:54 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[web_get_nickname_to_userID] ( @userID varchar(12) ) As SELECT nickName FROM userMemberDB WITH(NOLOCK) WHERE userID = @userID GO /****** 개체: StoredProcedure [dbo].[web_get_cpType] 스크립트 날짜: 05/04/2012 14:07:52 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[web_get_cpType] ( @accountIDX int ) AS SELECT cpType FROM userMemberDB WITH(NOLOCK) WHERE accountIDX=@accountIDX GO /****** 개체: StoredProcedure [dbo].[web_get_joinType] 스크립트 날짜: 05/04/2012 14:07:54 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[web_get_joinType] ( @accountIDX int ) AS SELECT joinType FROM userMemberDB WITH(NOLOCK) WHERE accountIDX=@accountIDX GO /****** 개체: StoredProcedure [dbo].[web_get_userID] 스크립트 날짜: 05/04/2012 14:07:55 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[web_get_userID] ( @accountIDX int ) As SELECT userID FROM userMemberDB WITH(NOLOCK) WHERE accountIDX = @accountIDX GO /****** 개체: StoredProcedure [dbo].[web_get_userEmail] 스크립트 날짜: 05/04/2012 14:07:55 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[web_get_userEmail] ( @accountIDX int ) As SELECT EMail FROM userMemberDB WITH(NOLOCK) WHERE accountIDX = @accountIDX GO /****** 개체: StoredProcedure [dbo].[web_get_regdate] 스크립트 날짜: 05/04/2012 14:07:55 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[web_get_regdate] ( @accountIDX int ) AS SELECT regDate FROM userMemberDB WITH(NOLOCK) WHERE accountIDX = @accountIDX GO /****** 개체: StoredProcedure [dbo].[web_get_accountIDX_to_nickname] 스크립트 날짜: 05/04/2012 14:07:52 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[web_get_accountIDX_to_nickname] ( @nickName varchar(20) ) As SELECT accountIDX FROM userMemberDB WHERE nickName = @nickName GO /****** 개체: StoredProcedure [dbo].[web_get_accountIDX] 스크립트 날짜: 05/04/2012 14:07:51 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[web_get_accountIDX] ( @userID varchar(12) ) As SELECT accountIDX FROM userMemberDB WITH(NOLOCK) WHERE userID = @userID GO /****** 개체: StoredProcedure [dbo].[web_friend_userType] 스크립트 날짜: 05/04/2012 14:07:50 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[web_friend_userType] ( @accountIDX int ) As SELECT userType, eventType FROM userMemberDB WITH(NOLOCK) WHERE accountIDX=@accountIDX GO /****** 개체: StoredProcedure [dbo].[web_member_user_count] 스크립트 날짜: 05/04/2012 14:08:19 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[web_member_user_count] ( @userID varchar(12) ) As Select count(*) From userMemberDB where userID = @userID GO /****** 개체: StoredProcedure [dbo].[web_member_nickname_count] 스크립트 날짜: 05/04/2012 14:08:18 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[web_member_nickname_count] ( @nickname varchar(20) ) As Select count(*) From userMemberDB where nickName = @nickname GO /****** 개체: StoredProcedure [dbo].[web_fishingfilter_get_user_info] 스크립트 날짜: 05/04/2012 14:07:44 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[web_fishingfilter_get_user_info] ( @userID varchar(12) ) As SELECT accountIDX, nickname FROM userMemberDB WHERE userID = @userID GO /****** 개체: StoredProcedure [dbo].[web_memberout_get_user_info] 스크립트 날짜: 05/04/2012 14:08:21 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[web_memberout_get_user_info] ( @accountIDX int ) AS SELECT userID, nickName, userPWD, EMail, joinType, regDate FROM userMemberDB WHERE accountIDX = @accountIDX GO /****** 개체: StoredProcedure [dbo].[web_freefill_get_userinfo] 스크립트 날짜: 05/04/2012 14:07:44 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[web_freefill_get_userinfo] ( @accountIDX int ) AS SELECT userID, joinType FROM userMemberDB WHERE accountIDX=@accountIDX GO /****** 개체: StoredProcedure [dbo].[web_member_count] 스크립트 날짜: 05/04/2012 14:08:16 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[web_member_count] ( @accountIDX int ) AS SELECT count(*) FROM userMemberDB WHERE accountIDX=@accountIDX GO /****** 개체: StoredProcedure [dbo].[web_member_get_jointype] 스크립트 날짜: 05/04/2012 14:08:17 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[web_member_get_jointype] ( @accountIDX int ) AS SELECT joinType FROM userMemberDB WHERE accountIDX=@accountIDX GO /****** 개체: StoredProcedure [dbo].[web_member_get_writetype] 스크립트 날짜: 05/04/2012 14:08:17 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[web_member_get_writetype] ( @accountIDX int ) AS SELECT joinType, limitType, limitDate FROM userMemberDB WHERE accountIDX=@accountIDX GO /****** 개체: StoredProcedure [dbo].[web_realmember_agree_save] 스크립트 날짜: 05/04/2012 14:08:44 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[web_realmember_agree_save] ( @idx int , @accountIDX int , @agreeSDate datetime , @agreeEDate datetime , @permitIP varchar(15) ) AS BEGIN TRAN UPDATE userParentDB SET agreeSDate = @agreeSDate , agreeEDate = @agreeEDate , agreeType = 1 , logIDX = @idx WHERE accountIDX=@accountIDX UPDATE userMemberDB SET joinType=10 WHERE accountIDX=@accountIDX UPDATE LosaGame_log.DBO.log_agree SET permitDate = getdate() , permitIP = @permitIP , permitType = 1 WHERE idx=@idx COMMIT TRAN GO /****** 개체: StoredProcedure [dbo].[web_get_userType] 스크립트 날짜: 05/04/2012 14:07:56 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[web_get_userType] ( @accountIDX int ) As SELECT userType FROM userMemberDB WITH(NOLOCK) WHERE accountIDX = @accountIDX GO /****** 개체: StoredProcedure [dbo].[web_realmember_get_userIDP] 스크립트 날짜: 05/04/2012 14:08:46 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[web_realmember_get_userIDP] ( @accountIDX int ) As SELECT userID, userPWD, joinType FROM userMemberDB WHERE accountIDX = @accountIDX GO /****** 개체: StoredProcedure [dbo].[web_realmember_get_userid_nickname] 스크립트 날짜: 05/04/2012 14:08:46 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[web_realmember_get_userid_nickname] ( @accountIDX int ) AS SELECT userID, nickname FROM userMemberDB WHERE accountIDX=@accountIDX GO /****** 개체: StoredProcedure [dbo].[web_realmember_info_insert] 스크립트 날짜: 05/04/2012 14:08:48 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[web_realmember_info_insert] ( @accountIDX int , @email varchar(50) , @mailling tinyint , @tel varchar(16) , @mobile varchar(16) , @zipcode varchar(8) , @address1 varchar(150) , @address2 varchar(50) , @joinType tinyint ) AS UPDATE userMemberDB SET email = @email , mailling = @mailling , joinType = @joinType WHERE accountIDX=@accountIDX INSERT INTO userInfoBDB (accountIDX, tel, mobile, zipcode, address1, address2, regDate) VALUES (@accountIDX, @tel, @mobile, @zipcode, @address1, @address2, getdate()) GO /****** 개체: StoredProcedure [dbo].[web_realmember_get_userinfo] 스크립트 날짜: 05/04/2012 14:08:47 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[web_realmember_get_userinfo] ( @accountIDX int ) AS SELECT userID, nickName, email, mailling FROM userMemberDB WHERE accountIDX = @accountIDX GO /****** 개체: StoredProcedure [dbo].[web_realmember_get_type] 스크립트 날짜: 05/04/2012 14:08:46 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[web_realmember_get_type] ( @accountIDX int ) AS SELECT joinType, cpType FROM userMemberDB WHERE accountIDX = @accountIDX GO /****** 개체: StoredProcedure [dbo].[web_join_edit_save] 스크립트 날짜: 05/04/2012 14:08:02 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[web_join_edit_save] ( @accountIDX int , @userPWD varchar(24) , @EMail varchar(50) , @mailling int , @returnVal int output ) As UPDATE userMemberDB SET userPWD = @userPWD , EMail = @EMail , mailling = @mailling WHERE accountIDX = @accountIDX SET @returnVal = @@error GO /****** 개체: StoredProcedure [dbo].[web_join_edit_save_channeling] 스크립트 날짜: 05/04/2012 14:08:02 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[web_join_edit_save_channeling] ( @accountIDX int , @EMail varchar(50) , @mailling int , @returnVal int output ) As UPDATE userMemberDB SET EMail = @EMail , mailling = @mailling WHERE accountIDX = @accountIDX SET @returnVal = @@error GO /****** 개체: StoredProcedure [dbo].[game_fame_give_point] 스크립트 날짜: 05/04/2012 14:06:00 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[game_fame_give_point] ( @playType int , @modeType int , @sub1Type int , @sub2Type int , @reportIDX int , @reportNick varchar(20) , @reportpubIP varchar(15) , @reportpriIP varchar(15) , @receiveNick varchar(20) , @receivepubIP varchar(15) , @roomInfo varchar(3000) , @chatInfo varchar(2000) , @note varchar(200) ) As DECLARE @receiveIDX int SET @receiveIDX = (SELECT accountIDX FROM userMemberDB WHERE nickName=@receiveNick) INSERT INTO LosaGame_log.DBO.log_mannerpoint (playType, modeType, sub1Type, sub2Type, reportIDX, reportNick, reportpubIP, reportpriIP, receiveIDX, receiveNick, receivepubIP, roomInfo, chatInfo, note, regDate) VALUES (@playType, @modeType, @sub1Type, @sub2Type, @reportIDX, @reportNick, @reportpubIP, @reportpriIP, @receiveIDX, @receiveNick, @receivepubIP, @roomInfo, @chatInfo, @note, getdate()) GO /****** 개체: StoredProcedure [dbo].[web_agreend_youth] 스크립트 날짜: 05/04/2012 14:07:30 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[web_agreend_youth] ( @accountIDX int ) AS BEGIN TRAN INSERT INTO LosaGame_log.DBO.backup_agrend_parent (accountIDX, parentName, parentBirth, parentJumin1, parentJumin2, parentEncode, parentNumber, email, agreeSDate, agreeEDate, agreeType, logIDX, regDate, initDate) SELECT accountIDX, parentName, parentBirth, parentJumin1, parentJumin2, parentEncode, parentNumber, email, agreeSDate, agreeEDate, agreeType, logIDX, regDate, getdate() FROM userParentDB WHERE accountIDX=@accountIDX UPDATE userParentDB SET agreeSDate=NULL, agreeEDate=NULL, agreeType=0, logIDX=0 WHERE accountIDX=@accountIDX UPDATE userMemberDB SET joinType=5 WHERE accountIDX=@accountIDX COMMIT TRAN GO /****** 개체: StoredProcedure [dbo].[web_search_userPWD_simple_get_data] 스크립트 날짜: 05/04/2012 14:08:56 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[web_search_userPWD_simple_get_data] ( @userID varchar(12) , @email varchar(50) ) AS SELECT userID, userPWD, EMail FROM userMemberDB WHERE userID = @userID and EMail = @email GO /****** 개체: StoredProcedure [dbo].[web_channeling_play_get_member_data] 스크립트 날짜: 05/04/2012 14:07:33 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[web_channeling_play_get_member_data] ( @userID varchar(12) ) AS SELECT accountIDX, userID, nickName, cpType, limitType, limitDate FROM userMemberDB WHERE userID=@userID GO /****** 개체: StoredProcedure [dbo].[web_main_get_limit] 스크립트 날짜: 05/04/2012 14:08:06 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[web_main_get_limit] ( @accountIDX int ) AS SELECT limitType, limitDate FROM userMemberDB WITH(NOLOCK) WHERE accountIDX=@accountIDX GO /****** 개체: StoredProcedure [dbo].[web_minihome_userinfo_all_ranking_data] 스크립트 날짜: 05/04/2012 14:08:29 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[web_minihome_userinfo_all_ranking_data] ( @accountIDX int ) As SELECT class, battle, training, award, medal, tester FROM userRankingDB WHERE accountIDX=@accountIDX GO /****** 개체: StoredProcedure [dbo].[web_ranking_myinfo_all_ranking_data] 스크립트 날짜: 05/04/2012 14:08:41 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[web_ranking_myinfo_all_ranking_data] ( @accountIDX int ) As SELECT class, battle, training, award, medal, tester FROM userRankingDB WHERE accountIDX=@accountIDX GO /****** 개체: StoredProcedure [dbo].[game_ability_add] 스크립트 날짜: 05/04/2012 14:05:40 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[game_ability_add] ( @accountIDX int , @class1_type int , @class1_basic01 tinyint , @class1_basic02 tinyint , @class1_basic03 tinyint , @class1_basic04 tinyint , @class1_skill1_sd tinyint , @class1_skill1_asd tinyint , @class1_skill1_ad tinyint , @class1_skill1_as tinyint , @class1_timeslot int , @class1_limitdate datetime , @class2_type int , @class2_basic01 tinyint , @class2_basic02 tinyint , @class2_basic03 tinyint , @class2_basic04 tinyint , @class2_skill1_sd tinyint , @class2_skill1_asd tinyint , @class2_skill1_ad tinyint , @class2_skill1_as tinyint , @class2_timeslot int , @class2_limitdate datetime , @class3_type int , @class3_basic01 tinyint , @class3_basic02 tinyint , @class3_basic03 tinyint , @class3_basic04 tinyint , @class3_skill1_sd tinyint , @class3_skill1_asd tinyint , @class3_skill1_ad tinyint , @class3_skill1_as tinyint , @class3_timeslot int , @class3_limitdate datetime , @class4_type int , @class4_basic01 tinyint , @class4_basic02 tinyint , @class4_basic03 tinyint , @class4_basic04 tinyint , @class4_skill1_sd tinyint , @class4_skill1_asd tinyint , @class4_skill1_ad tinyint , @class4_skill1_as tinyint , @class4_timeslot int , @class4_limitdate datetime , @class5_type int , @class5_basic01 tinyint , @class5_basic02 tinyint , @class5_basic03 tinyint , @class5_basic04 tinyint , @class5_skill1_sd tinyint , @class5_skill1_asd tinyint , @class5_skill1_ad tinyint , @class5_skill1_as tinyint , @class5_timeslot int , @class5_limitdate datetime ) AS INSERT INTO userAbilityDB (accountIDX, class1_type, class1_basic01, class1_basic02, class1_basic03, class1_basic04, class1_skill1_sd, class1_skill1_asd, class1_skill1_ad, class1_skill1_as, class1_timeslot, class1_limitdate, class2_type, class2_basic01, class2_basic02, class2_basic03, class2_basic04, class2_skill1_sd, class2_skill1_asd, class2_skill1_ad, class2_skill1_as, class2_timeslot, class2_limitdate, class3_type, class3_basic01, class3_basic02, class3_basic03, class3_basic04, class3_skill1_sd, class3_skill1_asd, class3_skill1_ad, class3_skill1_as, class3_timeslot, class3_limitdate, class4_type, class4_basic01, class4_basic02, class4_basic03, class4_basic04, class4_skill1_sd, class4_skill1_asd, class4_skill1_ad, class4_skill1_as, class4_timeslot, class4_limitdate, class5_type, class5_basic01, class5_basic02, class5_basic03, class5_basic04, class5_skill1_sd, class5_skill1_asd, class5_skill1_ad, class5_skill1_as, class5_timeslot, class5_limitdate, regDate) VALUES (@accountIDX, @class1_type, @class1_basic01, @class1_basic02, @class1_basic03, @class1_basic04, @class1_skill1_sd, @class1_skill1_asd, @class1_skill1_ad, @class1_skill1_as, @class1_timeslot, @class1_limitdate, @class2_type, @class2_basic01, @class2_basic02, @class2_basic03, @class2_basic04, @class2_skill1_sd, @class2_skill1_asd, @class2_skill1_ad, @class2_skill1_as, @class2_timeslot, @class2_limitdate, @class3_type, @class3_basic01, @class3_basic02, @class3_basic03, @class3_basic04, @class3_skill1_sd, @class3_skill1_asd, @class3_skill1_ad, @class3_skill1_as, @class3_timeslot, @class3_limitdate, @class4_type, @class4_basic01, @class4_basic02, @class4_basic03, @class4_basic04, @class4_skill1_sd, @class4_skill1_asd, @class4_skill1_ad, @class4_skill1_as, @class4_timeslot, @class4_limitdate, @class5_type, @class5_basic01, @class5_basic02, @class5_basic03, @class5_basic04, @class5_skill1_sd, @class5_skill1_asd, @class5_skill1_ad, @class5_skill1_as, @class5_timeslot, @class5_limitdate, getdate()) GO /****** 개체: StoredProcedure [dbo].[game_ability_get_list] 스크립트 날짜: 05/04/2012 14:05:40 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[game_ability_get_list] ( @accountIDX int ) AS SELECT idx , class1_type, class1_basic01, class1_basic02, class1_basic03, class1_basic04, class1_skill1_sd, class1_skill1_asd, class1_skill1_ad, class1_skill1_as, class1_timeslot, class1_limitdate , class2_type, class2_basic01, class2_basic02, class2_basic03, class2_basic04, class2_skill1_sd, class2_skill1_asd, class2_skill1_ad, class2_skill1_as, class2_timeslot, class2_limitdate , class3_type, class3_basic01, class3_basic02, class3_basic03, class3_basic04, class3_skill1_sd, class3_skill1_asd, class3_skill1_ad, class3_skill1_as, class3_timeslot, class3_limitdate , class4_type, class4_basic01, class4_basic02, class4_basic03, class4_basic04, class4_skill1_sd, class4_skill1_asd, class4_skill1_ad, class4_skill1_as, class4_timeslot, class4_limitdate , class5_type, class5_basic01, class5_basic02, class5_basic03, class5_basic04, class5_skill1_sd, class5_skill1_asd, class5_skill1_ad, class5_skill1_as, class5_timeslot, class5_limitdate FROM userAbilityDB WHERE accountIDX=@accountIDX GO /****** 개체: StoredProcedure [dbo].[game_ability_save] 스크립트 날짜: 05/04/2012 14:05:44 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[game_ability_save] ( @idx int , @class1_type int , @class1_basic01 tinyint , @class1_basic02 tinyint , @class1_basic03 tinyint , @class1_basic04 tinyint , @class1_skill1_sd tinyint , @class1_skill1_asd tinyint , @class1_skill1_ad tinyint , @class1_skill1_as tinyint , @class1_timeslot int , @class1_limitdate datetime , @class2_type int , @class2_basic01 tinyint , @class2_basic02 tinyint , @class2_basic03 tinyint , @class2_basic04 tinyint , @class2_skill1_sd tinyint , @class2_skill1_asd tinyint , @class2_skill1_ad tinyint , @class2_skill1_as tinyint , @class2_timeslot int , @class2_limitdate datetime , @class3_type int , @class3_basic01 tinyint , @class3_basic02 tinyint , @class3_basic03 tinyint , @class3_basic04 tinyint , @class3_skill1_sd tinyint , @class3_skill1_asd tinyint , @class3_skill1_ad tinyint , @class3_skill1_as tinyint , @class3_timeslot int , @class3_limitdate datetime , @class4_type int , @class4_basic01 tinyint , @class4_basic02 tinyint , @class4_basic03 tinyint , @class4_basic04 tinyint , @class4_skill1_sd tinyint , @class4_skill1_asd tinyint , @class4_skill1_ad tinyint , @class4_skill1_as tinyint , @class4_timeslot int , @class4_limitdate datetime , @class5_type int , @class5_basic01 tinyint , @class5_basic02 tinyint , @class5_basic03 tinyint , @class5_basic04 tinyint , @class5_skill1_sd tinyint , @class5_skill1_asd tinyint , @class5_skill1_ad tinyint , @class5_skill1_as tinyint , @class5_timeslot int , @class5_limitdate datetime ) AS UPDATE userAbilityDB SET class1_type = @class1_type , class1_basic01 = @class1_basic01 , class1_basic02 = @class1_basic02 , class1_basic03 = @class1_basic03 , class1_basic04 = @class1_basic04 , class1_skill1_sd = @class1_skill1_sd , class1_skill1_asd = @class1_skill1_asd , class1_skill1_ad = @class1_skill1_ad , class1_skill1_as = @class1_skill1_as , class1_timeslot = @class1_timeslot , class1_limitdate = @class1_limitdate , class2_type = @class2_type , class2_basic01 = @class2_basic01 , class2_basic02 = @class2_basic02 , class2_basic03 = @class2_basic03 , class2_basic04 = @class2_basic04 , class2_skill1_sd = @class2_skill1_sd , class2_skill1_asd = @class2_skill1_asd , class2_skill1_ad = @class2_skill1_ad , class2_skill1_as = @class2_skill1_as , class2_timeslot = @class2_timeslot , class2_limitdate = @class2_limitdate , class3_type = @class3_type , class3_basic01 = @class3_basic01 , class3_basic02 = @class3_basic02 , class3_basic03 = @class3_basic03 , class3_basic04 = @class3_basic04 , class3_skill1_sd = @class3_skill1_sd , class3_skill1_asd = @class3_skill1_asd , class3_skill1_ad = @class3_skill1_ad , class3_skill1_as = @class3_skill1_as , class3_timeslot = @class3_timeslot , class3_limitdate = @class3_limitdate , class4_type = @class4_type , class4_basic01 = @class4_basic01 , class4_basic02 = @class4_basic02 , class4_basic03 = @class4_basic03 , class4_basic04 = @class4_basic04 , class4_skill1_sd = @class4_skill1_sd , class4_skill1_asd = @class4_skill1_asd , class4_skill1_ad = @class4_skill1_ad , class4_skill1_as = @class4_skill1_as , class4_timeslot = @class4_timeslot , class4_limitdate = @class4_limitdate , class5_type = @class5_type , class5_basic01 = @class5_basic01 , class5_basic02 = @class5_basic02 , class5_basic03 = @class5_basic03 , class5_basic04 = @class5_basic04 , class5_skill1_sd = @class5_skill1_sd , class5_skill1_asd = @class5_skill1_asd , class5_skill1_ad = @class5_skill1_ad , class5_skill1_as = @class5_skill1_as , class5_timeslot = @class5_timeslot , class5_limitdate = @class5_limitdate WHERE idx=@idx GO