Parsing :php calls the MsSQL stored procedure using the built in RETVAL to get the return value in the procedure
- 2020-07-21 07:08:29
- OfStack
[PHP code]
[Stored Procedure]
$stmt = mssql_init('P__Global_Test', $conn) or die("initialize stored procedure failure");
mssql_bind($stmt, "RETVAL", $returnValue, SQLINT4, true);
mssql_execute($stmt, false);
if( $returnValue == 0 ){
echo 'ABCD';
}
else{ <PRE class=php name="code"> echo 'EFGH';</PRE> }
[Stored Procedure]
CREATE PROCEDURE dbo.P__User_JudgeResume(
)
set nocount on
set @Message = ''
if not exists( select * from _Test )
begin
return 0
end
else
begin
return 1
end
set nocount off
GO