搜索
 找回密码
 加入

神之祝福的存储,可以参考参考

ctgwglzc 2009-1-11 23:19:47 1064
Premium satmak ve premiumsuzları kontrol etmek
  1. CREATE PROCEDURE [dbo].[ACCOUNT_LOGIN]

  2. @AccountID varchar(21),
  3. @Password varchar(13),
  4. @nRet smallintOUTPUT

  5. AS

  6. DECLARE @Nation tinyint, @CharNum smallint, @PremyName varchar(21)

  7. -----------------------------------Process Login----------------------------------------
  8. SET @Nation = 0
  9. SET @CharNum = 0
  10. DECLARE @pwd varchar(13)
  11. SET @pwd =null
  12. SELECT @pwd = strPasswd FROM TB_USER WHERE strAccountID = @AccountID and idays>0
  13. IF @pwd ISnull
  14. BEGIN

  15. --SET @nRet = 0
  16. SET @nRet = 4
  17. RETURN
  18. END
  19. ELSEIF @pwd <> @Password
  20. BEGIN
  21. --SET @nRet = 0
  22. SET @nRet = 3
  23. RETURN
  24. END
  25. ----------------------------Premium Check-----------------------------------------------
  26. select @PremyName = strAccountID from PremiumCheck where strAccountID = @AccountID
  27. IF @PremyName = @AccountID -- Define Premium Account Name Check
  28. BEGIN
  29. SET @nRet = 12 -- Give notice, edit in texts.tbl
  30. RETURN
  31. END

  32. ------------------------------Successfull Transaction-----------------------------------
  33. SELECT @Nation = bNation, @CharNum = bCharNum FROM ACCOUNT_CHAR WHERE strAccountID = @AccountID
  34. IF@@ROWCOUNT= 0
  35. BEGIN
  36. SET @nRet = 1
  37. RETURN
  38. END
  39. IF @CharNum = 0
  40. BEGIN
  41. SET @nRet = 1
  42. RETURN
  43. END
  44. ELSE
  45. BEGIN
  46. SET @nRet = 1
  47. RETURN
  48. END
复制代码

2 回复

ctgwglzc
2008-12-24 01:03:37
楼主
点击查看详情
  1. USE [KN_online]
  2. GO
  3. /****** Object:  Table [dbo].[PremiumCheck]    Script Date: 09/26/2008 11:07:28 ******/
  4. SET ANSI_NULLS ON
  5. GO
  6. SET QUOTED_IDENTIFIER ON
  7. GO
  8. SET ANSI_PADDING ON
  9. GO
  10. CREATE TABLE [dbo].[PremiumCheck](
  11. [strAccountID] [varchar](21) COLLATE Latin1_General_CI_AI NOT NULL
  12. ) ON [PRIMARY]
  13. GO
  14. SET ANSI_PADDING OFF
复制代码
ctgwglzc
2009-1-11 23:19:47
楼主
旧版内移过去的。需要的自取
高级模式
游客