note 98940 added to function.mssql-bind

From: Date: Fri, 16 Jul 2010 18:05:49 +0000
Subject: note 98940 added to function.mssql-bind
Groups: php.notes 
Request: Send a blank email to php-notes+get-170917@lists.php.net to get a copy of this message
there is a bug either in php or in some extention/driver that will convert empty strings ('') to NULL when passed to mssql_bind. I have developed a work around: if($var === ''){ //stupid hack to prevent mssql driver from converting empty strings to null. now they arent empty strings but they will get trimmed down to legth 0 ;-) $var = ' '; $type = SQLVARCHAR; $isNull = false; $maxLen = 0; } mssql_bind($stmt, $param_name, $var, $type, $is_output,$isNull, $maxLen); ---- Server IP: 69.147.83.197 Probable Submitter: 208.97.56.84 ---- Manual Page -- http://www.php.net/manual/en/function.mssql-bind.php Edit -- https://master.php.net/note/edit/98940 Del: integrated -- https://master.php.net/note/delete/98940/integrated Del: useless -- https://master.php.net/note/delete/98940/useless Del: bad code -- https://master.php.net/note/delete/98940/bad+code Del: spam -- https://master.php.net/note/delete/98940/spam Del: non-english -- https://master.php.net/note/delete/98940/non-english Del: in docs -- https://master.php.net/note/delete/98940/in+docs Del: other reasons-- https://master.php.net/note/delete/98940 Reject -- https://master.php.net/note/reject/98940 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#170917) next »