Skip to content

Instantly share code, notes, and snippets.

View thiagokiyota's full-sized avatar

Thiago Kiyota thiagokiyota

View GitHub Profile
@thiagokiyota
thiagokiyota / mssql_helper.php
Created January 28, 2021 21:06 — forked from displague/mssql_helper.php
PDO_SQLSRV wrapper for legacy MSSQL PHP database functions
<?php
if (! extension_loaded('mssql') && extension_loaded('pdo_sqlsrv')) {
//Return an associative array. Used on mssql_fetch_array()'s result_type parameter.
define('MSSQL_ASSOC', '1');
//Return an array with numeric keys. Used on mssql_fetch_array()'s result_type parameter.
define('MSSQL_NUM', '2');
//Return an array with both numeric keys and keys with their field name. This is the default value for mssql_fetch_array()'s result_type parameter.