ID: 43043 Comment by: felipensp at gmail dot com Reported By: alan dot trick at twu dot ca Status: Open Bug Type: MSSQL related Operating System: Linux PHP Version: 5.2.4 New Comment:
This isn't a bug. Check the configuration options mssql.textlimit and mssql.textsize. Previous Comments: ------------------------------------------------------------------------ [2007-10-19 18:51:47] alan dot trick at twu dot ca Description: ------------ This bug is somewhat related to #39213 except it only occurs (as far as I can tell) on fields that are ntext and nvarchar(max). The Moodle bug report MDL-11810 (http://tracker.moodle.org/browse/MDL-11810) has more info. This is with freeTDS. Reproduce code: --------------- $tables = array( 'nulltest' => 'varchar(5)', 'nulltestnvar' => 'nvarchar(5)', 'nulltestntext' => 'ntext', 'nulltestnvarmax' => 'nvarchar(max)' ); foreach($tables as $table=>$domain) { print "==$table==\n"; mssql_query("create table $table (test $domain);"); mssql_query("insert into $table values('');"); $r = mssql_query("select * from $table;"); while ($a = mssql_fetch_assoc($r)) var_dump($a['test']); mssql_query("drop table $table;"); } Expected result: ---------------- ==nulltest== string(0) "" ==nulltestnvar== string(0) "" ==nulltestntext== string(0) "" ==nulltestnvarmax== string(0) "" Actual result: -------------- ==nulltest== string(0) "" ==nulltestnvar== string(0) "" ==nulltestntext== NULL ==nulltestnvarmax== NULL ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=43043&edit=1
