MySQL and MySQli are APIs to connect a MySQL database server in PHP. Each has it’s advantages and disadvantages.
Note: By now MySQL extension is deprecated and it is not safe to use in future applications. It will be there for sometime for backward compatibility.
Original extension designed to allow you to interact PHP applications to MySQL database. The MySQL extension provides a procedural interface, and it should use with only MySQL version older than 4.1.3. This can be used, but not all MySQL features will not be available.
The MySQLi, as the name suggests, it is MySQL improved version, was a next generation version of MySQL to take advantages of new MySQL server versions. This extension is packaged with PHP versions 5 and later.
The main features
- Object-oriented interface also provides a procedural interface.
- Support for Prepared Statements
- Support for Multiple Statements
- Support for Transactions
- Enhanced debugging capabilities
- Embedded server support