Working with MariaDB
So far we have worked with core programming concepts of PHP and we have also worked with the MariaDB database server in Chapter 1, CRUD Operations, Sorting, Filtering, and Joins and Chapter 2, Advanced Programming with MariaDB. In this section, let us focus on setting up communication between PHP and MariaDB. PHP provides three APIs to connect to MariaDB; they are as follows:
API |
Description |
Comment |
---|---|---|
|
This is probably the most used API to connect to MySQL and MariaDB databases. This API has been around since PHP 2.0. Active development for this API has been stopped and it is not advised to use this API in any of new projects. |
The |
|
MySQL Improved is the new API that has been introduced with PHP 5. This API is a huge upgrade over the last API. This API supports features such as client-side and server-side prepared statements, stored procedures, and transactions. This... |