|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2003-09-15 18:30 UTC] iliaa@php.net
[2003-09-16 03:55 UTC] abies@php.net
[2003-09-16 05:35 UTC] abies@php.net
[2004-01-28 16:56 UTC] php at electricsurfer dot com
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Nov 03 06:00:01 2025 UTC |
Description: ------------ Then I try to read value of VARCHAR field I get only 255 characters, but VARCHAR is 8000 bytes long. MSSQL v. 7.0 ntwdblib.dll v. 2000.80.194.0 PHP v. 4.3.2 Apache v. 2.0.43 / IIS 6 Reproduce code: --------------- $myVar = str_repeat("*", 500); mssql_query("DELETE FROM myTable"); mssql_query("INSERT INTO myTable (myField) VALUES ('".$myVar."')"); $query = "SELECT LEN(myField), myField FROM myTable"; list($realLength, $myVar) = mssql_fetch_row(mssql_query($query)); echo "DB length: ".$realLength."; PHP length: ".strlen($myVar); Expected result: ---------------- $myVar must be equal $realLength Actual result: -------------- strlen($myVar) == 255 (always)