Bug #43110 [Fbk->NoF]: MSSQL_BIND won't work with datetime parameter
| From: | php-bugs at lists dot php dot net | Date: | Tue, 15 Oct 2013 11:54:25 +0000 |
| Subject: | Bug #43110 [Fbk->NoF]: MSSQL_BIND won't work with datetime parameter | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-182162@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=43110&edit=1
ID: 43110
Updated by: php-bugs@lists.php.net
Reported by: lhelmer at suezenergyna dot com
Summary: MSSQL_BIND won't work with datetime parameter
-Status: Feedback
+Status: No Feedback
Type: Bug
Package: MSSQL related
Operating System: Win2003
PHP Version: 5.2.4
Private report: N
New Comment:
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Re-Opened". Thank you.
Previous Comments:
------------------------------------------------------------------------
[2013-08-02 00:35:36] yohgaki@php.net
Please try using this snapshot:
http://snaps.php.net/php5.4-latest.tar.gz
For Windows:
http://windows.php.net/snapshots/
------------------------------------------------------------------------
[2008-01-21 22:36:00] leo dot avatar at hoptmail dot com
execute stored procedure of mssql server with php5 using parameters type datetime
------------------------------------------------------------------------
[2007-10-26 20:05:10] lhelmer at suezenergyna dot com
Description:
------------
I'm trying to execute a MSSQL stored procedure from PHP and I need to pass a datetime
parameter... when I do this the sp fails.
My bind statement is as follows
mssql_bind($proc,"@RequestDate",$RecDate,SQLVARCHAR,false,false,10);
In a different situation I pass an integer parameter and that sp works. That bind statement is as
follows
mssql_bind($proc,"@Load",$MWLoad,SQLVARCHAR);
I know my stored procedure "CalculateDailyTotals" works because I use them everday in a
scheduled job. It seems the problem is related to passing a datetime value to the stored procedure.
Reproduce code:
---------------
$RecDate=$_POST['RecalcDate']; // RecalcDate = 2007-10-25
$db = mssql_connect("***","sa","***") or die("Unable to connect
to server");
mssql_select_db("Reporting");
$proc = mssql_init("CalculateDailyTotals", $db);
mssql_bind($proc,"@RequestDate",$RecDate,SQLVARCHAR,false,false,10);
$Result = mssql_execute($proc);
if ($Result == 1){
echo "Succes";
} ELSE {
echo "Failure";
}
Expected result:
----------------
Success
Actual result:
--------------
Failure
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=43110&edit=1