When php calls the mssql stored procedure, it cannot execute the problematic stored procedure. The result require (.. inchbmconn. php); incoming vip & nbsp; name $ nameiconv (UTF-8, gb2312, $ _ REQUEST [name]); $ startTime2012-04-01; $ endTime php call mssql stored procedure cannot execute problems
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 );
It cannot be executed. I don't know what the situation is. let's take a look.
Storage php
------ Solution --------------------
This post was last edited by xuzuning at 14:52:51
The constant SQLDATETIME 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.