Mysql Deprecated

Asked

Viewed 252 times

-5

When entering data into a table the following message appears:

Deprecated: mysql_connect(): The mysql Extension is deprecated and will be Removed in the Future: use mysqli or PDO Instead in C: Easyphp14.1 data localweb Projects phptest conexao.php on line 3

I’m only using a basic code to test the development environment I’m using (Easyphp).

  • These functions are deprecated and have been removed from php7, you need to switch to Mysqli or PDO.

  • 1

    Please consider searching if the solution already exists on the site.

  • If you put a @ before the function Warning is not given. BUT DO NOT DO THIS, as you will learn look for Mysqli or PDO

1 answer

4


The message itself already says the problem: the functions mysql_* were discontinued. So, as discontinued, it is already obsolete and in future versions of PHP, the functions mysql_* will probably be removed.

Alternatively, you should use mysqli_* or PDO.

If you want more details, I recommend reading this question: Why should we not use Mysql type functions where we have excellent answers.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.