Php cannot execute the mssql stored procedure.

Source: Internet
Author: User
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; $ endTime2012-0 php calls 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.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.