From 22d56ad512464e1ae63b4708ad353caaa3d1f581 Mon Sep 17 00:00:00 2001 From: Markus Staab Date: Tue, 24 Dec 2019 15:34:42 +0100 Subject: Added note about alternative approaches --- README.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 4504143..4055d0e 100644 --- a/README.md +++ b/README.md @@ -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 -- cgit v1.1 From 59ca7caa0d1645789088e83b9fb417c8a9b85440 Mon Sep 17 00:00:00 2001 From: Markus Staab Date: Tue, 24 Dec 2019 15:38:57 +0100 Subject: Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 4055d0e..2a36071 100644 --- a/README.md +++ b/README.md @@ -40,4 +40,4 @@ Once the `lib/mysql.php` file is included, it will create `mysql_*` functions if ## 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 +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/blob/master/docs/AllRectorsOverview.md#mysqltomysqli -- cgit v1.1