Author:wenlong Wu
One, for MS SQL Server database
There are two solutions, as follows:
Modify PHP.ini to implement: Open php.ini, you can see mssql.textsize,mssql.textlimit two options:
You can see that the default configuration is 4096 bytes, that is, the frequently encountered truncated to 4K, change it to the appropriate size, remove the preceding semicolon, and then save and then the Web server.
From the above two options can see the range is: 0-2147483647 bytes, in fact, 1 can also, check the PHP source code can be found-1 means unlimited:)
if (Ms_sql_g (textlimit)!=-1) {
sprintf (buffer, "%li", Ms_sql_g (Textlimit));
if (dbsetopt (Mssql.link, dbtextlimit, buffer) ==fail) {
Efree (hashed_details);
Dbfreelogin (Mssql.login);
Return_false;
}
}
if (Ms_sql_g (TEXTSIZE)!=-1) {
sprintf (buffer, "SET textsize%li", Ms_sql_g (TEXTSIZE));
dbcmd (mssql.link, buffer);
dbsqlexec (Mssql.link);
dbresults (Mssql.link);
}
The appropriate size to execute the set TEXTSIZE before querying in PHP: Just execute before select
Mssql_query ("SET textsize 65536");
From the above PHP source code can be seen in fact is also the implementation of SET TEXTSIZE:)
Second, for Sybase database
Since the extension does not have an option configurable like SQL Server in PHP.ini, only the second method above is used:
Executing before a Select
Sybase_query ("SET textsize 65536");
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.