#21178 [Com]: Empty string converted to null using bind function

From: Date: Thu, 21 Jun 2007 10:08:54 +0000
Subject: #21178 [Com]: Empty string converted to null using bind function
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-113987@lists.php.net to get a copy of this message
ID: 21178 Comment by: smargroth at hotmail dot com Reported By: pvy at novosoft dot ru Status: No Feedback Bug Type: MSSQL related Operating System: windows 2000/sp3 PHP Version: 4.2.3 New Comment: 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. Previous Comments: ------------------------------------------------------------------------ [2003-02-20 08:00:32] 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. ------------------------------------------------------------------------ [2003-02-09 03:40:37] fmk@php.net Please try using this CVS snapshot: http://snaps.php.net/php4-STABLE-latest.tar.gz For Windows: http://snaps.php.net/win32/php4-win32-STABLE-latest.zip ------------------------------------------------------------------------ [2002-12-25 04:14:42] 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 ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=21178&edit=1

« previous php.bugs (#113987) next »