php - Why TEXT column returns only 4096 bytes? -


i'm storing long text mssql_query();

and using field datatype called 'text'.

i tried different long strings using str_repeat(), page takes long time, in end submits result. when retrieve result however, 4096 bytes nomatterwhat. tried retrieve value management studio too, , gets same outcome.

it looks me storing problem me. please advice something... i'm confused.

edit these asked, i'm using:

function sql_escape($sql) {          /* de magicquotes */      $fix_str        = stripslashes($sql);      $fix_str    = str_replace("'","''",$sql);      $fix_str     = str_replace("\0","[null]",$fix_str);      return "'".$fix_str."'";  }  $query=mssql_query('update prod_cat set htmlbottom='.sql_escape(str_repeat('\'choose_cat ', 122000)).     ' id=1'   );    $query=mssql_query('select htmlbottom prod_cat id=1'); $a=mssql_fetch_assoc($query); echo strlen($a['htmlbottom']); 

microsoft's php driver (for reference): http://www.microsoft.com/en-us/download/details.aspx?id=20098

but if don't want (or can't) change drivers, this site:

you need increase maximum size of text column returned sql server php. can simple sql query:     set textsize 2147483647  can run following php (best run after make connection).     mssql_query("set textsize 2147483647");  better way work around issue change "textlimit" , "textsize" settings within php.ini, so:     mssql.textlimit = 2147483647     mssql.textsize = 2147483647 

your mssql driver truncating text. if can't change datatypes, drivers, etc., should fix issue you.


Comments

Popular posts from this blog

jquery - Invalid Assignment Left-Hand Side -

java - Play! framework 2.0: How to display multiple image? -

gmail - Is there any documentation for read-only access to the Google Contacts API? -