I am fetching a column from MSSQL table, the data-type of which ntext. When this column is null or has less data, script is working properly, but with large data, it just truncates, without any error or exception.
I am using odbc_fetch_array, to get data from result-set. I have tried various solutions, but none of them is working.
$sql = "select top 40 v.vendorID, v.userID, v.companyName, v.contactName, v.email, v.address1, v.address2 ,v.city, v.zip, v.countryID, v.stateOrRegionID, v.phone, v.fax, v.website, convert(nvarchar(max),v.profile) as profile,v.listOrder,v.logo, v.logoThumb, v.photos from custom_vendor as v order by v.listOrder ";
$rs = odbc_exec($conn, $sql);
if (!$rs) {exit(json_encode(array("error"=>"Error in SQL")));}
while( $row = odbc_fetch_array($rs) ) {
...
}
Thanks