<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <meta http-equiv="content-type" content="text/html; charset=UTF-8"> <title>Open a persistent connection to a FrontBase Server</title> </head> <body><div class="manualnavbar" style="text-align: center;"> <div class="prev" style="text-align: left; float: left;"><a href="function.fbsql-password.html">fbsql_password</a></div> <div class="next" style="text-align: right; float: right;"><a href="function.fbsql-query.html">fbsql_query</a></div> <div class="up"><a href="ref.fbsql.html">FrontBase Functions</a></div> <div class="home"><a href="index.html">PHP Manual</a></div> </div><hr /><div id="function.fbsql-pconnect" class="refentry"> <div class="refnamediv"> <h1 class="refname">fbsql_pconnect</h1> <p class="verinfo">(PHP 4 >= 4.0.6, PHP 5)</p><p class="refpurpose"><span class="refname">fbsql_pconnect</span> — <span class="dc-title">Open a persistent connection to a FrontBase Server</span></p> </div> <div class="refsect1 description" id="refsect1-function.fbsql-pconnect-description"> <h3 class="title">Description</h3> <div class="methodsynopsis dc-description"> <span class="type">resource</span> <span class="methodname"><strong>fbsql_pconnect</strong></span> ([ <span class="methodparam"><span class="type">string</span> <code class="parameter">$hostname</code><span class="initializer"> = ini_get("fbsql.default_host")</span></span> [, <span class="methodparam"><span class="type">string</span> <code class="parameter">$username</code><span class="initializer"> = ini_get("fbsql.default_user")</span></span> [, <span class="methodparam"><span class="type">string</span> <code class="parameter">$password</code><span class="initializer"> = ini_get("fbsql.default_password")</span></span> ]]] )</div> <p class="para rdfs-comment"> Establishes a persistent connection to a FrontBase server. </p> <p class="para"> To set the server port number, use <span class="function"><a href="function.fbsql-select-db.html" class="function">fbsql_select_db()</a></span>. </p> <p class="para"> <span class="function"><strong>fbsql_pconnect()</strong></span> acts very much like <span class="function"><a href="function.fbsql-connect.html" class="function">fbsql_connect()</a></span> with two major differences: </p> <p class="para"> First, when connecting, the function would first try to find a (persistent) link that's already open with the same host, username and password. If one is found, an identifier for it will be returned instead of opening a new connection. </p> <p class="para"> Second, the connection to the SQL server will not be closed when the execution of the script ends. Instead, the link will remain open for future use. </p> <p class="para"> This type of links is therefore called 'persistent'. </p> </div> <div class="refsect1 parameters" id="refsect1-function.fbsql-pconnect-parameters"> <h3 class="title">Parameters</h3> <p class="para"> <dl> <dt> <span class="term"><em><code class="parameter">hostname</code></em></span> <dd> <p class="para"> The server host name. </p> </dd> </dt> <dt> <span class="term"><em><code class="parameter">username</code></em></span> <dd> <p class="para"> The user name for the connection. </p> </dd> </dt> <dt> <span class="term"><em><code class="parameter">password</code></em></span> <dd> <p class="para"> The password for the connection. </p> </dd> </dt> </dl> </p> </div> <div class="refsect1 returnvalues" id="refsect1-function.fbsql-pconnect-returnvalues"> <h3 class="title">Return Values</h3> <p class="para"> Returns a positive FrontBase persistent link identifier on success, or <strong><code>FALSE</code></strong> on error. </p> </div> <div class="refsect1 seealso" id="refsect1-function.fbsql-pconnect-seealso"> <h3 class="title">See Also</h3> <p class="para"> <ul class="simplelist"> <li class="member"> <span class="function"><a href="function.fbsql-connect.html" class="function" rel="rdfs-seeAlso">fbsql_connect()</a> - Open a connection to a FrontBase Server</span></li> </ul> </p> </div> </div><hr /><div class="manualnavbar" style="text-align: center;"> <div class="prev" style="text-align: left; float: left;"><a href="function.fbsql-password.html">fbsql_password</a></div> <div class="next" style="text-align: right; float: right;"><a href="function.fbsql-query.html">fbsql_query</a></div> <div class="up"><a href="ref.fbsql.html">FrontBase Functions</a></div> <div class="home"><a href="index.html">PHP Manual</a></div> </div></body></html>