Hi,
In researching this problem I've seen this topic broached many times but have yet to find a suitable answer...
The host system is Win2k/MSSQL 7.0/PHP 4.0.3pl1 (ASAPI).
I've run into a 4K limit on data returned from a text field via SELECT. The data in the field is/will always need to be much longer than 4K. I have used SET TEXTSIZE 131072 prior to the select statement and checked @@TEXTSIZE to make sure it is being set correctly. I've set mssql.textsize and mssql.textlimit to 131072 in php.ini. None of it has worked. I have made sure that the data in the database is actually longer than 4096 bytes.
I've seen this exact problem described as an mssql module bug but apparently the bug was fixed before PHP 4.
I can't use ODBC. I can't use the CGI version of PHP.
I've come across a possible solution using READTEXT but I don't know how to implement it.
Here's the code snippet:
$sql = "SET TEXTSIZE 131072";
$result = mssql_query($sql,$connection) or die("DB Error<br>\nSQL: $sql");
$sql = "SELECT resume FROM artists WHERE id = '$artists_id'";
$result = mssql_query($sql,$connection) or die("DB Error<br>\nSQL: $sql");
while ($row = mssql_fetch_array($result)) {
$resume = mssql_decode($row["resume"]);
}
TIA!!
In researching this problem I've seen this topic broached many times but have yet to find a suitable answer...
The host system is Win2k/MSSQL 7.0/PHP 4.0.3pl1 (ASAPI).
I've run into a 4K limit on data returned from a text field via SELECT. The data in the field is/will always need to be much longer than 4K. I have used SET TEXTSIZE 131072 prior to the select statement and checked @@TEXTSIZE to make sure it is being set correctly. I've set mssql.textsize and mssql.textlimit to 131072 in php.ini. None of it has worked. I have made sure that the data in the database is actually longer than 4096 bytes.
I've seen this exact problem described as an mssql module bug but apparently the bug was fixed before PHP 4.
I can't use ODBC. I can't use the CGI version of PHP.
I've come across a possible solution using READTEXT but I don't know how to implement it.
Here's the code snippet:
$sql = "SET TEXTSIZE 131072";
$result = mssql_query($sql,$connection) or die("DB Error<br>\nSQL: $sql");
$sql = "SELECT resume FROM artists WHERE id = '$artists_id'";
$result = mssql_query($sql,$connection) or die("DB Error<br>\nSQL: $sql");
while ($row = mssql_fetch_array($result)) {
$resume = mssql_decode($row["resume"]);
}
TIA!!