mysql_connectDescriptionresource mysql_connect ( [string server [, string username [, string password [, bool new_link [, int client_flags]]]]])Returns a MySQL link identifier on success, or FALSE on failure. mysql_connect() establishes a connection to a MySQL server. The following defaults are assumed for missing optional parameters: server = 'localhost:3306', username = name of the user that owns the server process and password = empty password. The server parameter can also include a port number. eg. "hostname:port" or a path to a local socket eg. ":/path/to/socket" for the localhost.
If a second call is made to mysql_connect() with the same arguments, no new link will be established, but instead, the link identifier of the already opened link will be returned. The new_link parameter modifies this behavior and makes mysql_connect() always open a new link, even if mysql_connect() was called before with the same parameters. The client_flags parameter can be a combination of the constants MYSQL_CLIENT_COMPRESS, MYSQL_CLIENT_IGNORE_SPACE or MYSQL_CLIENT_INTERACTIVE.
The link to the server will be closed as soon as the execution of the script ends, unless it's closed earlier by explicitly calling mysql_close().
See also mysql_pconnect() and mysql_close(). |
Ecommerce shopping carts Events management projects Affiliates systems Large sized web projects Real estate and vacation rental projects Asp.net and c# projects |
||
|
Copyright © 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007 the PHP Documentation Group. Web design and webdevelopment and programming done by Software developers and web programmers
Web Design Copyright © 1999-2007. Chrisranjana Software Solutions Pvt Ltd. syndicate rss feed |