PHP 7 removed the support of all legacy mssql_*
functions. This files will restore the support using pdo_sqlsrv, sqlsrv or odbc driver wrapper.
Include this file and legacy code that relies on mssql_*
database calls will work in a modern environment.
- mssql.odbc_wrapper.php - Will use odbc_ calls. Requires the php odbc module (shipped with PHP).
- mssql.pdo_sqlsrv_wrapper.php - Will use sqlsrv_ calls. Requires the pdo and pdo_sqlsrv module Microsoft/msphpsql
- mssql.sqlsrv_wrapper.php - Will use sqlsrv_ calls. Requires the sqlsrv module Microsoft/msphpsql
You can choose one of the file, what you prefer.
Because the main reason is the lack support of mssql_result function. Pull Request request to improve the wrappers are welcome.
- bskrtich/mssqlwrapper (PDO sqlsrv Wrapper)
- jonathanrowley/4721830 (sqlsrv Wrapper)