Jump to content

why my varchar(1000) value TRUNCATED in php??


defreez

Recommended Posts

You'll need to post your code that retrieves the record, and any other relevant information.

 

Since this sounds like a PHP problem, rather than a problem with MSSQL, moving thread to PHP help . . .

thx for ur response , i post here because i thought relevance mssql and php, sorry if im wrong :)

 

here is my code

 

......

$query=" select top 1 content from table_msg

where id='1234'

";

 

result=mssql_query($query,$dbConn)

 

$row=mssql_fetch_object($this->result);

 

print_r($row->content);

 

.......

//this only 256 character printed but in db 1000 character

environment

mssql server 2008

 

apache 2.2

php 5.2.x

freetds version = 4.2

I am a relative beginner but from what i understand VARCHAR can be set to a value of between 0-255 in Mysql versions pryor to MySQL 5.0.3 and 0 to 65,535 in later versions. So check you versions also check out Mysql site for futher details: http://dev.mysql.com/doc/refman/5.0/en/char.html

 

Scratch that i didnt read the question correctly (mssql) - Sorry

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.