I have the following sql
SELECT
bw_imp_step as imp_action,
FROM cm3rm1 m1 INNER JOIN cm3rm2 m2 ON m1.number=m2.number
WHERE m1.number=\'$id\'
You can set the max text size through php.ini
like this
mssql.textlimit = 2147483647
mssql.textsize = 2147483647
If you don't have access to php.ini, you can just run this query.
SET TEXTSIZE 2147483647
Another option is just to use ini_set with the values like this
ini_set('mssql.textlimit', '2147483647');
ini_set('mssql.textsize', '2147483647');
If you're going to do it the ini_set way, make sure it's done before a database connection is established.