Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is mysql_connect() usable in PHP 5.6.5 [duplicate]

Which is the latest version PHP version, who support mysql_connect()?

I've want to upgrade my PHP version. I've read, that mysql_connect() are deprecated. In all Projects I've use the old mysql_connect(). Can I update to PHP 5.6.5 or is the command in this version removed already?

Uses somebody PHP 5.6.5 with mysql_connect()?

Problem is, that I can't change sooo much Projects in this short time and could only update to the highest version, which support mysql_connect().

Best regards and many thanks!

like image 834
Reddi Avatar asked Jan 28 '15 20:01

Reddi


People also ask

Does php 5.6 support mysql_connect?

This extension was deprecated in PHP 5.5. 0, and it was removed in PHP 7.0. 0.

What is use of mysql_connect in php?

mysql_connect() Function: The mysql_connect() function is used to establish a new connection with the database. This connection is established when the script starts its execution. After establishing this connection with the database, it will be valid or be connected with the database only until the script is executed.

What is the difference between mysql_connect and Mysqli_connect?

There are several important differences between the two libraries: Mysqli supports charsets, mysql does not. Mysqli supports prepared statements, mysql does not. Mysql does not support multiple statements, mysqli does.

How do you fix deprecated mysql_connect (): The MySQL extension is deprecated and will be removed in the future use mysqli or PDO instead in?

Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in. Since PHP 5.5 has removed support for mysql extension in favor of mysqli. It's highly recommended to upgrade to phpGrid 6.0 to address mysql extension deprecation.


1 Answers

http://php.net/manual/en/function.mysql-connect.php

5.5.0 This function will generate an E_DEPRECATED error.

don't try to use any mysql_* functions as they are deprecated and dangerous. See mysqli_ functions instead.

like image 148
krzysiej Avatar answered Sep 28 '22 10:09

krzysiej