Skip to content
This repository was archived by the owner on Oct 9, 2025. It is now read-only.

Latest commit

 

History

History
25 lines (16 loc) · 1.27 KB

File metadata and controls

25 lines (16 loc) · 1.27 KB

mssql Wrapper for PHP

PHP 7 removed the support of all legacy mssql_* functions. This files will restore the support using pdo_sqlsrv, sqlsrv or odbc driver wrapper.

Usage

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.

Why three different versions?

Because the main reason is the lack support of mssql_result function. Pull Request request to improve the wrappers are welcome.

Original Version

See Also