Special;113818 schrieb:
wo kann ich denn bei dieser Prozedur ID und pw ändern ??
Alles anzeigenQuellcode
- USE [ACCOUNT_DBF]
- GO
- /****** Objekt: StoredProcedure [dbo].[usp_CreateNewAccount] Skriptdatum: 04/25/2010 21:27:58 ******/
- SET ANSI_NULLS ON
- GO
- SET QUOTED_IDENTIFIER ON
- GO
- ALTER proc [dbo].[usp_CreateNewAccount]
- @account varchar(32),
- @pw varchar(32),
- @cash int = 0,
- @email varchar(100) = ''
- as
- set nocount on
- set xact_abort on
- if not exists (select * from ACCOUNT_TBL where account = @account)
- begin
- begin tran
- INSERT ACCOUNT_TBL(account,password,isuse,member,id_no1,id_no2,realname, cash)
- VALUES(@account, @pw, 'T', 'A', '', '@pw', 'T', @cash)
- INSERT ACCOUNT_TBL_DETAIL(account,gamecode,tester,m_chLoginAuthority,regdate,BlockTime,EndTime,WebTime,isuse,secession, email)
- VALUES(@account,'A000','2','F',GETDATE(),CONVERT(CHAR(8),GETDATE()-1,112),CONVERT(CHAR(8),DATEADD(year,10,GETDATE()),112),CONVERT(CHAR(8),GETDATE()-1,112),'T',NULL, @email)
- insert AccountPlay (Account, PlayDate)
- select @account, convert(int, convert(char(8), getdate(), 112))
- if @@error <> 0
- begin
- rollback tran
- select -1
- end
- else
- begin
- commit tran
- select 1
- end
- end
- else
- begin
- select 0
- end
Wie meinst du das? Diese prozedur erstellt einen Account und ändert nichts.
mfg
Till