note 49556 deleted from function.mssql-query by cmb
| From: | cmb@php.net | Date: | Sun, 23 Jun 2019 14:24:45 +0000 |
| Subject: | note 49556 deleted from function.mssql-query by cmb | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-211376@lists.php.net to get a copy of this message | ||
Note Submitter: Ben Mullins
----
Although mssql_query does not support datetime paramaters with stored procedures, there is a simple
way of getting around it.
Bind the parameter as a string i.e. SQLVARCHAR or SQLCHAR
mssql_bind($stmt, "@JoinDate", value, SQLVARCHAR, false,null,19);
and then use the sql server function CONVERT() in your stored procedure to convert the parameter to
a datetime variable before using it.
SELECT @JD = convert(datetime,@JoinDate,103)