In addition to the points mentioned in the other answers about the advantages of mysqli:
-
Object-oriented interface
-
Prepared Statements support
-
Support for multiple Statements
-
Transaction support ( Transactions )
-
Improved debugging capabilities
-
Embedded Server Support
It should also be noted that mysql_
functions no longer receive updates such as fixes and improvements and this is the vital point for you not to use mysql_
anymore, because in the near future it will no longer exist for new versions of PHP.
In other words, if you continue to mysql_
functions, two situations can happen with your projects:
There may be security holes in the mysql_
or bugs API.
When the mysql_
API is disabled, your scripts will stop working, which will cause you a lot of headaches, as you will have to redo multiple codes.
Note that mysqli means MySQL Improved in Portuguese, would be something like Mysql improved , referring to the API and not to the database system.