personally, i had luck with the statement below, but have sent it to others
in the past and they had varying results.  but give this a shot at the top
of your page that your PHP code is running on.

mssql_query("set textsize 65536");


                      "Adam Presley"                                                   
                      <[EMAIL PROTECTED]        To:       [EMAIL PROTECTED]            
                      m>                       cc:                                     
                                               Subject:  [PHP-DB] Re: PHP & MSSQL      
                      08/11/2003 10:26                                                 

I know what you're going through here. In MS SQL you can define a VARCHAR
to about 8000 characters, but your PHP mssql_query command only returns 255
(0 - 254) characters. I then tried using the TEXT datatype. TEXT datatype
MS SQL allows somewhere around 2 billion characters. However, the PHP
mssql_query command only returns 4096 characters every time. This appear to
be a limitation of the PHP MSSQL commands.

"Shaun Bentley" <[EMAIL PROTECTED]> wrote in message
> Hi
>     I am currently trying to use PHP and MSSQL together but I am having a
> few problems.
> I can enter data into the Db OK, but when pulling the data back to
> on the page, the string cuts to around 250 chars. The Db field is VarChar
> 6000 and I can see the whole data in the field.
> I have tried pulling the data out as object, array & row but always lose
> end.
> Any help please!
> Shaun

PHP Database Mailing List (
To unsubscribe, visit:

PHP Database Mailing List (
To unsubscribe, visit:

Reply via email to