Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mysql_* functions is deprecated, using MySQLi or PDO instead #16

Open
peter279k opened this issue Jun 25, 2019 · 3 comments
Open

mysql_* functions is deprecated, using MySQLi or PDO instead #16

peter279k opened this issue Jun 25, 2019 · 3 comments

Comments

@peter279k
Copy link

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.

@emohamed
Copy link
Contributor

emohamed commented Jun 25, 2019

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).

@peter279k
Copy link
Author

peter279k commented Jun 25, 2019

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 using MySQLi or PDO classes instead.
  • We can add the PDO support to connect the MySQL database if possible.

These suggestions I think we can help them once they're accepted :).

@emohamed
Copy link
Contributor

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!

@emohamed emohamed reopened this Jun 25, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants