Skip to content

Conversation

@jan-kratochvil
Copy link

I found the problem is in SqlsrvResult.php function getResultColumns(). It calls sqlsrv_field_metadata() which returns numbers, they are not parsed correctly by function Helpers::detectType() that expects text describing the column.
I made a simple fix in SqlsrvResult.php adding translating array according to MS doc https://learn.microsoft.com/en-us/sql/connect/php/sqlsrv-field-metadata

@dg dg force-pushed the master branch 5 times, most recently from 8157984 to 4ea907a Compare August 6, 2025 22:33
@dg dg force-pushed the master branch 2 times, most recently from 722a37e to 013da5d Compare December 28, 2025 02:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

SqlsrvDriver: column types are not detected

2 participants