06-03-2017, 07:21 AM
|
#14
|
|
• الانـتـسـاب » Dec 2015
|
• رقـم العـضـويـة » 128556
|
• المشـــاركـات » 1,336
|
• الـدولـة » 3mrany
|
• الـهـوايـة » Design-MySQL-C#-HTML-CSS3-WinServer-More
|
• اسـم الـسـيـرفـر » Aquarius
|
• الـجـنـس » Male
|
• نقـاط التقييم » 47
|
|
|
رد: Problem With Academy
او اعمل دى و شوف ...
كود PHP:
USE [SRO_VT_SHARD] GO /****** Object: StoredProcedure [dbo].[_TRAINING_CAMP_CREATE] Script Date: 3/6/2017 7:20:20 AM ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO
ALTER PROCEDURE [dbo].[_TRAINING_CAMP_CREATE] @CreaterID INT AS SET NOCOUNT ON
IF EXISTS (SELECT CharID FROM _TrainingCampMember WHERE CharID = @CreaterID) BEGIN RETURN -1001 END
DECLARE @CampID INT DECLARE @FoundationDate SMALLDATETIME SET @FoundationDate = GETDATE()
BEGIN TRANSACTION
DECLARE @HonorPoint INT SET @HonorPoint = 0 SELECT @HonorPoint = HonorPoint FROM _TrainingCampSubMentorHonorPoint WHERE CharID = @CreaterID IF @HonorPoint <> 0 BEGIN DELETE FROM _TrainingCampSubMentorHonorPoint WHERE CharID = @CreaterID IF (@@ERROR <> 0 OR @@ROWCOUNT = 0) BEGIN ROLLBACK TRANSACTION RETURN -6 END END
INSERT INTO _TrainingCamp (CreationDate, Rank, GraduateCount, EvaluationPoint, LatestEvaluationDate, CommentTitle, Comment ) VALUES ( @FoundationDate, 5, 0, 0, @FoundationDate, '', '')
SET @CampID = @@IDENTITY
IF (@@ERROR <> 0 OR @@ROWCOUNT = 0 OR @CampID = 0) BEGIN ROLLBACK TRANSACTION RETURN -7 END
DECLARE @Ret INT EXEC @Ret = _TrainingCamp_FnAddMember @CampID, @CreaterID, @HonorPoint IF (@@ERROR <> 0 OR @Ret <= 0) BEGIN ROLLBACK TRANSACTION RETURN @Ret END
COMMIT TRANSACTION
SET NOCOUNT OFF
RETURN @CampID
|
|
|