Last active
January 29, 2021 14:31
-
-
Save MilesChou/d07bcf156d502d9138f784a92c16f09c to your computer and use it in GitHub Desktop.
Adapter function example for mysql to mysqli
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
if (!function_exists('mysql_connect')) { | |
function mysql_connect($host, $username, $password) { | |
mysqli_connect($host, $username, $password); | |
} | |
} | |
mysql_connect('127.0.0.1', 'root', 'password'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment