I am executing a SQL query inside a PHP script. The query is executed against a SQL Server database, using the PDO class. I am retrieving the results of the query using $result->fetch(PDO::FETCH_ASSOC).
One of the columns in the result is a string that could be in excess of 256 characters, but when I access this value in PHP, the string is always truncated at 256 characters. The value itself is basically just a sentence i.e., reasonable for its length to exceed 256 characters, but not 1024 characters.
The MS SQL DB stores the data in (effectively) a VARCHAR(1024) column. If I run the query in Visual Studio, there is no truncation - I get the full string returned.
I can obviously modify the query and the PHP code (not the configuration), but not the MS SQL DB.
Where is the truncation happening? How do I retrieve the full string in my PHP code?