mirror of
https://github.com/codeguy/php-the-right-way.git
synced 2025-08-15 10:13:58 +02:00
MySQL extension removal is not as imminent as suggested, but still shouldn't be used.
Reference #101
This commit is contained in:
@@ -11,9 +11,12 @@ Native drivers are great if you are only using ONE database in your application,
|
|||||||
or you need to connect to an Oracle database, then you will not be able to use the same drivers. You'll need to learn a brand new API for each
|
or you need to connect to an Oracle database, then you will not be able to use the same drivers. You'll need to learn a brand new API for each
|
||||||
database — and that can get silly.
|
database — and that can get silly.
|
||||||
|
|
||||||
As an extra note on native drivers, the mysql extension for PHP is currently deprecated as of PHP 5.4.0 and will be removed entirely in PHP 5.5.0.
|
As an extra note on native drivers, the mysql extension for PHP is no longer in active development, and the official status since PHP 5.4.0 is
|
||||||
That means if you are using `mysql_connect()` and `mysql_query()` in your applications then you will be faced with a rewrite when you upgrade to
|
"Long term deprecation". This means it will be removed within the next few releases, so by PHP 5.6 (or whatever comes after 5.5) it may well be gone. If you are using `mysql_connect()` and `mysql_query()` in your applications then you will be faced with a rewrite at osme point down the
|
||||||
the next version. You can rewrite this application now to use the [MySQLi extension][mysqli], or use PDO.
|
line, so the best option is to replace mysql usage with mysqli or PDO in your applications within your own development shedules so you won't
|
||||||
|
be rushed later on. _If you are starting from scratch then absolutely do not use the mysql extension: use the [MySQLi extension][mysqli], or use PDO._
|
||||||
|
|
||||||
|
* [PHP: Choosing an API for MySQL](http://php.net/manual/en/mysqlinfo.api.choosing.php)
|
||||||
|
|
||||||
## PDO
|
## PDO
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user