mysql_pconnect()
resource mysql_pconnect(server[:port|socket], user, password[, flags])Use this function to open a persistent connection to MySQL.
The connection will not end with the closing of the PHP script that
opened the connection, and it cannot be closed with
mysql_close(). The first argument of the
function is the server name. If none is specified,
localhost is assumed. A port may be specified
with the server name (separated by a colon) or a socket along with its
path. If no port is given, port 3306 is assumed. The username is given
as the second argument and the user’s password as the third. If you
attempt a connection that uses the same parameters as a previous one,
it uses the existing connection instead of creating a new connection.
As an optional fourth argument, you can give client flags for the
MySQL constants MYSQL_CLIENT_COMPRESS, MYSQL_CLIENT_IGNORE_SPACE,
MYSQL_CLIENT_INTERACTIVE, and
MYSQL_CLIENT_SSL. The function returns a connection
identifier if it’s successful; it returns false if it’s unsuccessful.
Here is an example:
mysql_pconnect('localhost', 'russell', 'dyer');