How it Works
What's the difference between MySQL and MySQLi?
What's different between MySQL and MySQLi? Why use MySQLi instead of MySQL.
November 26, 2016, 2:41 pm
Differences between MySQL and MySQLi are as follows:
MySQL is deprecated in PHP v5.5.0, and removed in PHP v7, whilst MySQLi is not, should be using MySQLi or PDO
MySQLi is more secure, as you can use prepared statements, whilst MySQL isn't
Support for Prepared Statements
Support for Multiple Statements
Support for Transactions
Enhanced debugging capabilities
Embedded server support
Basically, there isn't much difference other than security, or being deprecated and removed. It is strongly suggested that you use MySQLi or PDO for PHP applications as newer versions of PHP will remove the ext/mysql function in the future. So if you were to upgrade to the newest version of PHP, and were to use old ext/mysql functions then the application will fail to work as intended. Then you would need to convert your ext/mysql functions into ext/mysqli functions.
It's best to start using MySQLi now, than to waste time by converting mysql to mysqli. All new PHP applications should be using MySQLi, or PDO.
November 29, 2016, 1:47 pm