php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #21178 Empty string converted to null using bind function
Submitted: 2002-12-25 04:14 UTC Modified: 2003-02-20 08:00 UTC
Votes:1
Avg. Score:5.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:0 (0.0%)
Same OS:0 (0.0%)
From: pvy at novosoft dot ru Assigned:
Status: No Feedback Package: MSSQL related
PHP Version: 4.2.3 OS: windows 2000/sp3
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2002-12-25 04:14 UTC] pvy at novosoft dot ru
Hello!
I use next way for call sp:
$sp=mssql_init("sp");
mssql_bind($sp,"stringdata",'',SQL_VARCHAR);
mssql_execute...

when param 'stringdata' passed to stored procedure, we
got null instead empty string.
I don't specify is_null paramether for mssql_bind function.
by default this paramether is false.


vladimir
Novosibirsk

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2003-02-20 08:00 UTC] sniper@php.net
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 "Open". Thank you.


 [2007-06-21 10:08 UTC] smargroth at hotmail dot com
This bug is still present in PHP5.1 and in WinXP.

All empty strings are always converted to NULL by "mssql_bind", although $is_null argument is set to false.

This bug is very annoying, as empty string is normal and valid value, and is different from NULL value. I have non-NULL-able columns, and I cannot insert empty strings because of this stupid bug.
 
PHP Copyright © 2001-2022 The PHP Group
All rights reserved.
Last updated: Fri Dec 02 13:05:53 2022 UTC