I wrote a stored procedure in MSSQL2008R2, defined a temporary table in the process body, stored the data generated through the business logic into the temporary table, and finally passed the query statement (Select * Fromxxxx) return the data in the temporary table. The problem is: in the SQL query analyzer, the stored procedure with parameters is executed separately, and the result set has data. However, the data cannot be displayed on the PHP front-end. why? The method for executing the stored procedure is as follows: $ paramsarray (array ($ sDate, SQLSRV_PARAM_IN), array ($ eDate, SQLSRV_PA... phpms SQL
I wrote a stored procedure in MS SQL2008R2. a temporary table is defined in the process body and generated through the business logic.
And then return the data in the temporary table through the query statement (Select * From xxxx.
The problem is: in the SQL query analyzer, the stored procedure with parameters is executed separately, and the result set has data.
However, the data cannot be displayed on the PHP front-end. why? The method for executing a stored procedure is as follows:
$ Params = array (
Array ($ sDate, SQLSRV_PARAM_IN ),
Array ($ eDate, SQLSRV_PARAM_IN ),
Array ($ empID, SQLSRV_PARAM_IN ),
Array ($ empName, SQLSRV_PARAM_IN)
);
// Echo"
";print_r($params);echo "
";
// Echo "Exec HR_MonthlyReport '$ sdate',' $ edate', '$ empID', '$ empname '";
$tsql_callSP = "{call HR_MonthlyReport ?,?,?,?}"; $Result = sqlsrv_query( $lik, $tsql_callSP, $params);
If ($ Result = false ){
Echo "Error in executing statement 3. \ n ";
Die (print_r (sqlsrv_errors (), true ));
}