diff options
author | Markus Staab <maggus.staab@googlemail.com> | 2019-12-24 15:34:42 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-12-24 15:34:42 +0100 |
commit | 22d56ad512464e1ae63b4708ad353caaa3d1f581 (patch) | |
tree | 16112e2d84101c82a26d945d8a4adb6be59646ea | |
parent | 8c29c45a2e21f5b3745d0a0b42f7af71ead9579d (diff) | |
download | php7-mysql-shim-22d56ad512464e1ae63b4708ad353caaa3d1f581.zip php7-mysql-shim-22d56ad512464e1ae63b4708ad353caaa3d1f581.tar.gz php7-mysql-shim-22d56ad512464e1ae63b4708ad353caaa3d1f581.tar.bz2 |
Added note about alternative approaches
-rw-r--r-- | README.md | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -36,4 +36,8 @@ Once the `lib/mysql.php` file is included, it will create `mysql_*` functions if - Calls to `is_resource()` and `get_resource_type()` on MySQL connections and results will fail as these are now their `mysqli` equivalents. - Some errors are now from `ext/mysqli`, and others are `E_USER_WARNING` instead of `E_WARNING`. - You must use the `mysqli.*` INI entries instead of `mysql.*` (e.g. `mysqli.default_user` instead of `mysql.default_user`) -- If no host, username, password parameter is provided when using the `mysql_*` functions, the default values from the corresponding `mysqli.*` settings from `php.ini` file will be used (e.g. `mysqli.default_host`, `mysqli.default_user`, `mysqli.default_pw`)
\ No newline at end of file +- If no host, username, password parameter is provided when using the `mysql_*` functions, the default values from the corresponding `mysqli.*` settings from `php.ini` file will be used (e.g. `mysqli.default_host`, `mysqli.default_user`, `mysqli.default_pw`) + +## Alternatives + +Instead of using this drop-in-replacement library you should consider refactoring your code from `mysql` to e.g. `mysqli`. This process can be automated with e.g. https://github.com/rectorphp/rector/tree/master/packages/MysqlToMysqli |