php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #34410 Empty string converted to null using bind function
Submitted: 2005-09-07 18:13 UTC Modified: 2005-09-07 23:43 UTC
From: daigo75 at wooow dot it Assigned:
Status: Not a bug Package: MSSQL related
PHP Version: 5.0.5 OS: Windows 2000 Professional/Server
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: daigo75 at wooow dot it
New email:
PHP Version: OS:

 

 [2005-09-07 18:13 UTC] daigo75 at wooow dot it
Description:
------------
Hello!
I call a stored procedure as follows:

$sp=mssql_init("spTest");

$VarTemp='';
mssql_bind($sp,"@Param1",$VarTemp,SQLVARCHAR,0,false,100);
$ResultSet = mssql_execute($sp);

When param "@Param1" is passed to stored procedure, it
gets null instead of an empty string. Note that "Is_Null" parameter is set to false.

Reproduce code:
---------------
$sp=mssql_init("spTest");

$VarTemp='';
mssql_bind($sp,"@Param1",$VarTemp,SQLVARCHAR,0,false,100);
$ResultSet = mssql_execute($sp);


Expected result:
----------------
Stored procedure should receive an empty string as value of "@Param1" parameter.

Actual result:
--------------
Stored procedure receives NULL as value of "@Param1" parameter.

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-09-07 23:43 UTC] sniper@php.net
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to report
a bug at http://bugs.php.net/how-to-report.php


 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Tue Mar 11 06:01:29 2025 UTC