Closed (works as designed)
Project:
Drupal core
Version:
6.x-dev
Component:
other
Priority:
Critical
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
13 Aug 2005 at 22:57 UTC
Updated:
7 Sep 2007 at 01:42 UTC
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
Comment #1
killes@www.drop.org commentedyou 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.
Comment #2
GD commented24.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.)
Comment #3
killes@www.drop.org commentedhttp://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.
Comment #4
gregglesSo let's use it in the future...like 4.8
Comment #5
bdragon commentedThe PHP function mysql_connect has nothing to do with the MySQL C API function mysql_connect.