Can a PHP library and mssql select more than 256 characters from a varchar column?

Is there any work (other than changing the column type in the text field) for SELECTing a large varchar field using the PHP library and mssql? For example, varchar (500). Does PHP really limit the number of characters to 255? Is there a way to pull back more than that?

+5
source share
6 answers

On the PHP page, the problem appears to be the underlying database driver on Windows platforms. Varchar can only return <255 characters. The job is to convert varchar to text in an SQL SELECT statement.

+5
source

To transfer a wide VARCHAR to TEXT in MS SQL:

SELECT convert(text,myWideField) FROM myTable

myWideField - , myTable - ... .

TEXT, 256 .

.

+4

freetds.

/etc/freetds.conf

:

tds version = 4.2

tds version = 8.0

, Mssql.

+3

php.ini:

mssql.textlimit = 2147483647
mssql.textsize = 2147483647

...

varchar (2000) varchar (max). !

+1

, Varchar.

0

MySQL, PHP... MySQL 5.0.3 MySQL 255 VARCHAR firled. 65535 .

-1
source

All Articles