mysql_* functions is deprecated, using MySQLi or PDO instead
As title, it seems that the mysql_* functions are deprecated/removed since PHP version is 7.0.
And we should consider using the PDO and MySQLi to be compatible with PHP-7.x versions.
HI @peter279k!
MySQLi is currently supported(and the default). There is no PDO support at this point, but we haven't experienced situations where it's the only available option(i.e. where neither mysql_ no mysqli_ are available, but PDO is enabled).
Hi @emohamed. thank you for your reply and explanation.
I have seen that the MySQL and MySQLi have their classes in this repository.
Some suggestions I recommend are as follows:
- I think we can consider checking whether the
mysql_*functions are available. If not, throw exception message to tell developers usingMySQLiorPDOclasses instead. - We can add the
PDOsupport to connect the MySQL database if possible.
These suggestions I think we can help them once they're accepted :).
Hi @peter279k
I think I see your point. You mean that currently if both mysql_ and mysqli_ extensions are not available, the result would be fatal error without clear message that at least one of those is required?
We can add the PDO support to connect the MySQL database if possible.
Sure, that would be great. Please feel free to fork the repo & open a pull request with the change.
Thanks!