There are some notes on this in the manual for mssql query . For some reason the column type limits the size of the string returned (typical of M$ products ??).
"
warwick dot barnes at aad dot gov dot au
12-Jan-2005 12:13
Using PHP 4.3.9 and MSSQL Library 7.0, when I try to SELECT text from a column (field) defined as VARCHAR 8000 I get only the first 255 characters of the text - it's trucated for no apparent reason.
To get round this I changed the column type from VARCHAR 8000 to TEXT, but then the output was trucated to 4096 characters.
To fix this I changed two values in PHP.INI:
mssql.textlimit = 16384
mssql.textsize = 16384
"
"
rzachris at yahoo dot com
19-May-2005 08:25
If you're having problems trying to get data stored in a varchar column with more than 255 chars use CONVERT to change the data type to TEXT like this:
$query=mssql_query("SELECT table.id, CONVERT(TEXT, table.comment) AS comment FROM table");
Don't forget to set name for the column (AS comment) or you won't be able to retrieve the data ...
"
Now my text is trucated to 16384 characters, which is big enough for me - but you can apparently use a value as large as 2147483647.