|
You last visited: Today at 20:48
Advertisement
Hello any Can Help by a Problem with a Procedure ???
Discussion on Hello any Can Help by a Problem with a Procedure ??? within the SRO Private Server forum part of the Silkroad Online category.
05/17/2015, 21:35
|
#1
|
elite*gold: 0
Join Date: Feb 2015
Posts: 166
Received Thanks: 42
|
Hello any Can Help by a Problem with a Procedure ???
i test to add this
i have test to add this first i change to my DB
PHP Code:
DECLARE @TarID int = (Select CharID from _Char where CharName16 = @TargetCharName) DECLARE @SendID int = (Select CharID from _Char where CharName16 = @SenderCharName) DECLARE @Maxliks int = (select COUNT(Likes) from Cry_Or_Fuck_You.dbo._Facebook where CharID = @TarID and AniChariD = @SendID and Likes = 'Like') DECLARE @MaxDis int = (select COUNT(DisLike) from Cry_Or_Fuck_You.dbo._Facebook where CharID = @TarID and AniChariD = @SendID and DisLike = 'Dislike') DECLARE @Maxcom int = (select COUNT(Comment) from Cry_Or_Fuck_You.dbo._Facebook where CharID = @TarID and AniChariD = @SendID and Comment like '%Comment%') IF @message like 'Like' BEGIN IF @SenderCharName != @TargetCharName BEGIN IF ( @Maxliks < '1') BEGIN INSERT INTO Cry_Or_Fuck_You.dbo._Facebook (CharID,AniChariD,Comment,Likes,DisLike,CharName,AniCharname) VALUES (@TarID @SendID,'None','Like','None' @TargetCharName @SenderCharName) END END END IF @message like 'DisLike' BEGIN IF @SenderCharName != @TargetCharName BEGIN IF ( @MaxDis < '1') BEGIN INSERT INTO Cry_Or_Fuck_You.dbo._Facebook (CharID,AniChariD,Comment,Likes,DisLike,CharName,AniCharname) VALUES (@TarID @SendID,'None','None','Dislike' @TargetCharName @SenderCharName) END END END IF @message like '%Comment%' BEGIN IF @SenderCharName != @TargetCharName BEGIN IF ( @Maxcom < '1') BEGIN INSERT INTO Cry_Or_Fuck_You.dbo._Facebook (CharID,AniChariD,Comment,Likes,DisLike,CharName,AniCharname) VALUES (@TarID @SendID @message,'None','None' @TargetCharName @SenderCharName) END END END
and Get this Error
PHP Code:
Msg 102, Level 15, State 1, Procedure _Memo_Add, Line 70 Incorrect syntax near '@SendID'. Msg 102, Level 15, State 1, Procedure _Memo_Add, Line 80 Incorrect syntax near '@SendID'. Msg 102, Level 15, State 1, Procedure _Memo_Add, Line 90 Incorrect syntax near '@SendID'.
Orginal
PHP Code:
DECLARE @TarID int = (Select CharID from _Char where CharName16 = @TargetCharName) , @SendID int = (Select CharID from _Char where CharName16 = @SenderCharName) DECLARE @Maxliks int = (select COUNT(Likes) from SRO_VT_ORTAI_S.dbo._Facebook where CharID = @TarID and AniChariD = @SendID and Likes = 'Like') @MaxDis int = (select COUNT(DisLike) from SRO_VT_ORTAI_S.dbo._Facebook where CharID = @TarID and AniChariD = @SendID and DisLike = 'Dislike') @Maxcom int = (select COUNT(Comment) from SRO_VT_ORTAI_S.dbo._Facebook where CharID = @TarID and AniChariD = @SendID and Comment like '%Comment%') IF @message like 'Like' BEGIN IF @SenderCharName != @TargetCharName BEGIN IF ( @Maxliks < '1') BEGIN INSERT INTO SRO_VT_ORTAI_S.dbo._Facebook (CharID,AniChariD,Comment,Likes,DisLike,CharName,AniCharname) VALUES (@TarID @SendID,'None','Like','None' @TargetCharName @SenderCharName) END END END IF @message like 'DisLike' BEGIN IF @SenderCharName != @TargetCharName BEGIN IF ( @MaxDis < '1') BEGIN INSERT INTO SRO_VT_ORTAI_S.dbo._Facebook (CharID,AniChariD,Comment,Likes,DisLike,CharName,AniCharname) VALUES (@TarID @SendID,'None','None','Dislike' @TargetCharName @SenderCharName) END END END IF @message like '%Comment%' BEGIN IF @SenderCharName != @TargetCharName BEGIN IF ( @Maxcom < '1') BEGIN INSERT INTO SRO_VT_ORTAI_S.dbo._Facebook (CharID,AniChariD,Comment,Likes,DisLike,CharName,AniCharname) VALUES (@TarID @SendID @message,'None','None' @TargetCharName @SenderCharName) END END END
Orginal prosedure error
PHP Code:
Msg 137, Level 15, State 2, Line 1 Must declare the scalar variable "@TargetCharName". Msg 137, Level 15, State 2, Line 2 Must declare the scalar variable "@SenderCharName". Msg 137, Level 15, State 2, Line 3 Must declare the scalar variable "@TarID". Msg 137, Level 15, State 2, Line 4 Must declare the scalar variable "@TarID". Msg 137, Level 15, State 2, Line 5 Must declare the scalar variable "@TarID". Msg 137, Level 15, State 2, Line 6 Must declare the scalar variable "@message". Msg 137, Level 15, State 2, Line 8 Must declare the scalar variable "@SenderCharName". Msg 137, Level 15, State 2, Line 10 Must declare the scalar variable "@Maxliks". Msg 137, Level 15, State 2, Line 12 Must declare the scalar variable "@TarID". Msg 137, Level 15, State 2, Line 16 Must declare the scalar variable "@message". Msg 137, Level 15, State 2, Line 18 Must declare the scalar variable "@SenderCharName". Msg 137, Level 15, State 2, Line 20 Must declare the scalar variable "@MaxDis". Msg 137, Level 15, State 2, Line 22 Must declare the scalar variable "@TarID". Msg 137, Level 15, State 2, Line 26 Must declare the scalar variable "@message". Msg 137, Level 15, State 2, Line 28 Must declare the scalar variable "@SenderCharName". Msg 137, Level 15, State 2, Line 30 Must declare the scalar variable "@Maxcom". Msg 137, Level 15, State 2, Line 32 Must declare the scalar variable "@TarID".
|
|
|
05/18/2015, 02:23
|
#2
|
elite*gold: 87
Join Date: Apr 2015
Posts: 318
Received Thanks: 535
|
put it in a php tag.
PHP Code:
your procedure here.
|
|
|
05/18/2015, 07:49
|
#3
|
elite*gold: 33
Join Date: Mar 2014
Posts: 472
Received Thanks: 862
|
gimme team viewer
|
|
|
05/18/2015, 17:21
|
#4
|
elite*gold: 0
Join Date: Feb 2015
Posts: 166
Received Thanks: 42
|
Quote:
Originally Posted by Xutan*
put it in a php tag.
PHP Code:
your procedure here.
|
done
|
|
|
05/19/2015, 06:46
|
#5
|
elite*gold: 0
Join Date: Oct 2012
Posts: 145
Received Thanks: 31
|
you forgot to put a "," between @TarID and @SendID. and @...
check it!
Your: VALUES (@TarID @SendID.....
Fix: VALUES (@TarID, @SendID...., @..., @....
|
|
|
05/19/2015, 09:42
|
#6
|
elite*gold: 87
Join Date: Apr 2015
Posts: 318
Received Thanks: 535
|
well, use it.
PHP Code:
DECLARE @TarID int = (Select CharID from _Char where CharName16 = @TargetCharName) DECLARE @SendID int = (Select CharID from _Char where CharName16 = @SenderCharName) DECLARE @Maxliks int = (select COUNT(Likes) from Cry_Or_Fuck_You.dbo._Facebook where CharID = @TarID and AniChariD = @SendID and Likes = 'Like') DECLARE @MaxDis int = (select COUNT(DisLike) from Cry_Or_Fuck_You.dbo._Facebook where CharID = @TarID and AniChariD = @SendID and DisLike = 'Dislike') DECLARE @Maxcom int = (select COUNT(Comment) from Cry_Or_Fuck_You.dbo._Facebook where CharID = @TarID and AniChariD = @SendID and Comment like '%Comment%') IF @message like 'Like' BEGIN IF @SenderCharName != @TargetCharName BEGIN IF ( @Maxliks < '1') BEGIN INSERT INTO Cry_Or_Fuck_You.dbo._Facebook (CharID,AniChariD,Comment,Likes,DisLike,CharName,AniCharname) VALUES (@TarID, @SendID,'None','Like','None' @TargetCharName @SenderCharName) END END END IF @message like 'DisLike' BEGIN IF @SenderCharName != @TargetCharName BEGIN IF ( @MaxDis < '1') BEGIN INSERT INTO Cry_Or_Fuck_You.dbo._Facebook (CharID,AniChariD,Comment,Likes,DisLike,CharName,AniCharname) VALUES (@TarID, @SendID,'None','None','Dislike' @TargetCharName @SenderCharName) END END END IF @message like '%Comment%' BEGIN IF @SenderCharName != @TargetCharName BEGIN IF ( @Maxcom < '1') BEGIN INSERT INTO Cry_Or_Fuck_You.dbo._Facebook (CharID,AniChariD,Comment,Likes,DisLike,CharName,AniCharname) VALUES (@TarID, @SendID, @message,'None','None' @TargetCharName @SenderCharName) END END END
|
|
|
05/19/2015, 14:13
|
#7
|
elite*gold: 0
Join Date: Feb 2015
Posts: 166
Received Thanks: 42
|
Quote:
Originally Posted by Xutan*
well, use it.
PHP Code:
DECLARE @TarID int = (Select CharID from _Char where CharName16 = @TargetCharName)
DECLARE @SendID int = (Select CharID from _Char where CharName16 = @SenderCharName)
DECLARE @Maxliks int = (select COUNT(Likes) from Cry_Or_Fuck_You.dbo._Facebook where CharID = @TarID and AniChariD = @SendID and Likes = 'Like')
DECLARE @MaxDis int = (select COUNT(DisLike) from Cry_Or_Fuck_You.dbo._Facebook where CharID = @TarID and AniChariD = @SendID and DisLike = 'Dislike')
DECLARE @Maxcom int = (select COUNT(Comment) from Cry_Or_Fuck_You.dbo._Facebook where CharID = @TarID and AniChariD = @SendID and Comment like '%Comment%')
IF @message like 'Like'
BEGIN
IF @SenderCharName != @TargetCharName
BEGIN
IF ( @Maxliks < '1')
BEGIN
INSERT INTO Cry_Or_Fuck_You.dbo._Facebook (CharID,AniChariD,Comment,Likes,DisLike,CharName,AniCharname) VALUES (@TarID, @SendID,'None','Like','None' @TargetCharName @SenderCharName)
END
END
END
IF @message like 'DisLike'
BEGIN
IF @SenderCharName != @TargetCharName
BEGIN
IF ( @MaxDis < '1')
BEGIN
INSERT INTO Cry_Or_Fuck_You.dbo._Facebook (CharID,AniChariD,Comment,Likes,DisLike,CharName,AniCharname) VALUES (@TarID, @SendID,'None','None','Dislike' @TargetCharName @SenderCharName)
END
END
END
IF @message like '%Comment%'
BEGIN
IF @SenderCharName != @TargetCharName
BEGIN
IF ( @Maxcom < '1')
BEGIN
INSERT INTO Cry_Or_Fuck_You.dbo._Facebook (CharID,AniChariD,Comment,Likes,DisLike,CharName,AniCharname) VALUES (@TarID, @SendID, @message,'None','None' @TargetCharName @SenderCharName)
END
END
END
|
hmm i get this Error
PHP Code:
Msg 102, Level 15, State 1, Procedure _Memo_Add, Line 70
Incorrect syntax near '@TargetCharName'.
Msg 102, Level 15, State 1, Procedure _Memo_Add, Line 80
Incorrect syntax near '@TargetCharName'.
Msg 102, Level 15, State 1, Procedure _Memo_Add, Line 90
Incorrect syntax near '@TargetCharName'.
Quote:
Originally Posted by chipno0p
you forgot to put a "," between @TarID and @SendID. and @...
check it!
Your: VALUES (@TarID @SendID.....
Fix: VALUES (@TarID, @SendID...., @..., @....
|
Thx problem found
so adding
Old
PHP Code:
(@TarID, @SendID,'None','None','Dislike' @TargetCharName @SenderCharName)
new
PHP Code:
(@TarID, @SendID, @message,'None','None', @TargetCharName, @SenderCharName)
Work Fine no Error thx for Help
|
|
|
 |
Similar Threads
|
Procedure
12/08/2014 - SRO Private Server - 2 Replies
resert skills > status > remove premium ?
any one got right Procedure? ?
|
Hello, I have a problem with a stored procedure when you log into the game.
08/13/2012 - Rappelz Private Server - 5 Replies
Posts Forum on this thread did not help me! Any thoughts about this problem, screen :handsdown: http://s017.radikal.ru/i437/1208/20/992648841219.j pg
|
Dshop SQL procedure?
07/25/2009 - Dekaron Private Server - 6 Replies
Ok i want to use the Dshop but it asks for a password and then gives an error because i need to make a procedure in the DB. I have some knowledge of SQL but i need a help in hand if anyone could help?
|
Screening Procedure
06/09/2009 - Grand Chase Philippines - 90 Replies
Procedure:
Ibigay ang IGN sa IGN keeper (tangkaron)Magpascreen sa 5 juryIbigay ang IGN at name sa forum sa jury na kaharapKailangan ng 4 out of 5 approvals ng juryI-ppm ako ng jury pag "OK" kayo sa kanilaPag 4 na ang approval i-pm ako at isesend ko ang new engine w/ tut
5 Jury
qwertybugoyangielic2626cute_sakurakirtbrixKamenRi derDelta
|
All times are GMT +1. The time now is 20:49.
|
|