PHP String Limitation On odbc_fetch_array

前端 未结 2 1757
孤独总比滥情好
孤独总比滥情好 2021-01-21 07:08

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\'
2条回答
  •  后悔当初
    2021-01-21 07:52

    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.

提交回复
热议问题