Complete PHP MySQL Reference
The mysql_pconnect() function opens a persistent MySQL connection.
This function returns the connection on success, or FALSE and an error on failure. You can hide the error output by adding an '@' in front of the function name.
mysql_pconnect() is much like mysql_connect(), but with two major differences:
| Parameter | Description |
|---|---|
| server | Optional. Specifies the server to connect to (can also include a port number. e.g. "hostname:port" or a path to a local socket for the localhost). Default value is "localhost:3306" |
| user | Optional. Specifies the username to log in with. Default value is the name of the user that owns the server process |
| pwd | Optional. Specifies the password to log in with. Default is "" |
| clientflag | Optional. Can be a combination of the following constants:
|
Tip: To establish a non-persistent MySQL connection, use mysql_connect() instead.
Complete PHP MySQL Reference
The perfect solution for professionals who need to balance work, family, and career building.
More than 10 000 certificates already issued!
The HTML Certificate documents your knowledge of HTML.
The HTML5 Certificate documents your knowledge of advanced HTML5.
The CSS Certificate documents your knowledge of advanced CSS.
The JavaScript Certificate documents your knowledge of JavaScript and HTML DOM.
The jQuery Certificate documents your knowledge of jQuery.
The XML Certificate documents your knowledge of XML, XML DOM and XSLT.
The ASP Certificate documents your knowledge of ASP, SQL, and ADO.
The PHP Certificate documents your knowledge of PHP and SQL (MySQL).
Your message has been sent to W3Schools.