PHP sqlsrv library handling of varbinary data limits
问题 I have a varbinary(8000) database field in SQL Server that I want to pull out. The sqlsrv limit for varbinary data is 8000. However if I do a select on the data <?php $query = " SELECT myvarbinary FROM table WHERE id = 48033; "; $results = sqlsrv_query($this->conn, $query); return sqlsrv_fetch_array($results, SQLSRV_FETCH_NUMERIC); Then the sqlsrv_fetch_array gives an error: PHP Fatal error: Invalid sql_display_size Truncation solution (works but no use) If I convert the field to varbinary