I am new to PHP so excuse me if I am wrong.

In current versions of mysql the mysql_connect function has been superceded with the function mysql_real_connect and therefor the Drupal connect functions need updating

Comments

killes@www.drop.org’s picture

Status: Active » Closed (works as designed)

you are wrong. the function you are lookign for is mysqli_real_connect. Note the "i". mysqli is an alternative extension that allows people to access advanced features of mysql 4.1 which Drupal does not use.

GD’s picture

24.2.3.5. mysql_connect()
MYSQL *mysql_connect(MYSQL *mysql, const char *host, const char *user, const char *passwd)

Description

This function is deprecated. It is preferable to use mysql_real_connect() instead.

mysql_connect() attempts to establish a connection to a MySQL database engine running on host. mysql_connect() must complete successfully before you can execute any of the other API functions, with the exception of mysql_get_client_info().

The meanings of the parameters are the same as for the corresponding parameters for mysql_real_connect() with the difference that the connection parameter may be NULL. In this case the C API allocates memory for the connection structure automatically and frees it when you call mysql_close(). The disadvantage of this approach is that you can't retrieve an error message if the connection fails. (To get error information from mysql_errno() or mysql_error(), you must provide a valid MYSQL pointer.)

killes@www.drop.org’s picture

http://de3.php.net/mysql-connect

There is nothign mentioned ybout mysql_connect being depreciated. I guess you are quoting directly from the mysql docs. In any case: This doesn't afffect us now.

greggles’s picture

Version: 4.6.2 » x.y.z
Category: bug » feature
Status: Closed (works as designed) » Postponed

So let's use it in the future...like 4.8

bdragon’s picture

Version: x.y.z » 6.x-dev
Status: Postponed » Closed (works as designed)

The PHP function mysql_connect has nothing to do with the MySQL C API function mysql_connect.