Those are different APIs to access a MySQL backend
- The mysql is the historical API
- The mysqli is a new version of the historical API. It should perform better and have a better set of function. Also, the API is object-oriented.
- PDO_MySQL, is the MySQL for PDO. PDO has been introduced in PHP, and the project aims to make a common API for all the databases access, so in theory you should be able to migrate between RDMS without changing any code (if you don't use specific RDBM function in your queries), also object-oriented.
So it depends on what kind of code you want to produce. If you prefer object-oriented layers or plain functions...
My advice would be
- PDO
- MySQLi
- mysql
Also my feeling, the mysql API would probably being deleted in future releases of PHP
.