Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

Troubleshooting
Research
Professional Opinions
Ask a Question
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE

troubleshooting Question

PHP & MSSQL varchar(MAX)

Avatar of aumudin
aumudinFlag for United States of America asked on
DatabasesPHPMicrosoft SQL Server 2005
9 Comments1 Solution2201 ViewsLast Modified:
I guess varchar(max) is the new way to go instead of text. But for some odd reason when I echo out my results from my simple select statement it only displays maybe a quarter of whats actually stored in sql.

If I use ms sql server management studio and do the select it shows everything correctly, if I do it in my php code it doesnt.

Here is my sql string.
SELECT notes FROM tblContacts

fairly straight forward :)

Is there something special I need to be doing in php to make it actually get the full value of whats stored in the varchar(max)?


I tried CAST(notes as TEXT) as notes but that did the same thing only displayed maybe a quarter of it, almost like its sticking to that 255 character limit.

Thanks for any help!

-- Edit --
I should also add that it is not throwing any errors at me.