What is the difference between MySQL, MySQLi and PDO?
Which one is the best suited to use with PHP-MySQL?
What is the difference between MySQL, MySQLi and PDO?
Which one is the best suited to use with PHP-MySQL?
There are (more than) three popular ways to use MySQL from PHP. This outlines some features/differences PHP: Choosing an API:
I would recommend using PDO with prepared statements. It is a well-designed API and will let you more easily move to another database (including any that supports ODBC) if necessary.
Those are different APIs to access a MySQL backend
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
Also my feeling, the mysql API would probably being deleted in future releases of PHP.
mysqli is the enhanced version of mysql.
PDO extension defines a lightweight, consistent interface for accessing databases in PHP. Each database driver that implements the PDO interface can expose database-specific features as regular extension functions.