When php calls the mssql stored procedure, it cannot execute the problematic stored procedure. The result require (".. /inc/hbmconn. php "); // input vip & nbsp; name $ name = iconv (" UTF-8 "," gb2312 ", php cannot execute the mssql stored procedure call
The stored procedure cannot be executed or the result cannot be returned.
Require ("../inc/hbmconn. php ");
// Input the vip name
$ Name = iconv ("UTF-8", "gb2312", $ _ REQUEST ['name']);
$ StartTime = "2012-04-01 ";
$ EndTime = "2012-04-03 ";
$ Procedure = mssql_init ("procGetVIPConsumeDetail", $ conn );
Mssql_bind ($ procedure, "@ vipConsumerFilter", $ name, SQLVARCHAR );
Mssql_bind ($ procedure, "@ startDate", $ startTime, SQLDATETIME );
Mssql_bind ($ procedure, "@ endDate", $ endTime, SQLDATETIME );
$ Resource = mssql_execute ($ procedure );
Mssql_free_statement ($ procedure );
Unable to execute the command. I don't know what the situation is.
------ Solution --------------------
The constant SQLDATETIME edited by xuzuning at 14:52:51 on is not defined.
Check whether your writing is correct.
You can also print_r (get_defined_constants ());
Check whether similar constants exist.
The meaning of the last error message is unclear. maybe the date format is incorrect.