I would like to know what are the advantages that mysqli_
has in relation to mysql_
, as it is suggested to me directly to mysqli_
.
I would like to know what are the advantages that mysqli_
has in relation to mysql_
, as it is suggested to me directly to mysqli_
.
MySQL
functions are deprecated, so MySQLi
functions end up being new, secure, have new features and are object oriented. MySQLi
is an evolution of MySQL
.
There is still an alternative to MySQLi
which is PDO
(driver that implements the PHP Data Objects interface) that allows you to work with multiple databases in a transparent way.
By title putting it in the manual on the mysqli
library, I will reply in a very simple way:
Why mysqli_ is better than mysql _?
Because, according to the manual, it is:
Enhanced MySQL Extension
See here in this link
I have other words: the Mysqli
extension is the evolution of the Mysql
extension for PHP.
In this case, I advise you to leave your code with mysqli
, since the mysql
extension has already been deprecated (and its use becomes discouraged by PHP personnel).