DIFFERENCES BETWEEN MYSQL AND MYSQLI IN PHP
MySQL MySQLi Difference
There are too many differences between these PHP database extensions. These differences are based on some factors like performance, library functions, features, benefits, and others.
1. MySQL extension added in PHP version 2.0. and deprecated as of PHP 5.5.0.
2. Does not support prepared statements.
3. MySQL provides the procedural interface.
4. MySQL extension does not support stored procedure.
5. MySQL extension lags in security and other special features, comparatively.
6. Transactions are handled by SQL queries only.
7. Extension directory: ext/mysql.
1. MySQLi extension added in PHP 5.5 and will work on MySQL 4.1.3 or above.
2. MySQLi supports prepared statements.
3. MySQLi provides both procedural and object-oriented interface.
4. MySQLi supports store procedure.
5. MySQLi extension is with enhanced security and improved debugging.
6. MySQLi supports transactions through API.
7. Extension directory: ext/mysqli.