MSSQL and php.ini mssql.textlimit


Warning: count(): Parameter must be an array or an object that implements Countable in /home/styllloz/public_html/qa-theme/donut-theme/qa-donut-layer.php on line 274
0 like 0 dislike
5 views
The situation is this:
our database are images in base64 in a field of type text
when getting fields from PHP typical request — field image is clipped to 4096 bytes.
How to get a field of normal length?
Installed in php.ini

mssql.textlimit = 2147483647
mssql.textsize = 2147483647

— does not help...
Have found this solution:

$q = $db->query ('SET TEXTSIZE 2147483647');
$q->fetchAll();
ini_set ('mssql.textlimit' , '2147483647');
ini_set ('mssql.textsize' , '2147483647');
$q = $db->query("select CONVERT(TEXT, img) from [shop].[dbo].[news_image] WHERE id = $id");
$res = $q->fetchAll();


the result is the same — returns only 4096 bytes, i.e. the early part of the picture.

Did anyone with this and how did you decide on?
It has now been decided by the stored procedure which collects all of the temp table and returns, and then the script glues the line — well, it's the decision to put it mildly I was not very impressed with :)
by | 5 views

2 Answers

0 like 0 dislike
mssql is Sybase inherited the unfolding LOB-s logical pages, and e***Ty interface to access it still stretches.
read how they picked: msdn.microsoft.com/en-us/library/ms187365.aspx
by
0 like 0 dislike
I have something like this:
mssql_connect($mssql_host, $mssql_user, $mssql_pass) or die('Error connecting to database'); mssql_query("SET TEXTSIZE 2147483647"); $att=mssql_query("SELECT TheName, MimeType, TheSize, Content FROM [$mssql_base2].[dbo].[Document] WHERE ID='$attachmentID'"); if ($row_att = mssql_fetch_array($att, MSSQL_ASSOC) ) { $TheName=$row_att['TheName']; $MimeType=$row_att['MimeType']; $TheSize=$row_att['TheSize']; $Content=$row_att['Content']; print $Content; }#end if
by

Related questions

0 like 0 dislike
1 answer
asked May 13, 2019 by VasiliyMakogon
0 like 0 dislike
1 answer
0 like 0 dislike
1 answer
0 like 0 dislike
1 answer
asked Mar 23, 2019 by MSwind
0 like 0 dislike
2 answers
110,608 questions
257,186 answers
0 comments
27,923 users