function.msql-pconnect.html

来自「php的帮助文档,涉及到PHP的案例和基本语法,以及实际应用内容」· HTML 代码 · 共 104 行

HTML
104
字号
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><html> <head>  <title>Open persistent mSQL connection</title>  <meta http-equiv="content-type" content="text/html; charset=UTF-8"> </head> <body><div style="text-align: center;"> <div class="prev" style="text-align: left; float: left;"><a href="function.msql-numrows.html">msql_numrows</a></div> <div class="next" style="text-align: right; float: right;"><a href="function.msql-query.html">msql_query</a></div> <div class="up"><a href="ref.msql.html">mSQL Functions</a></div> <div class="home"><a href="index.html">PHP Manual</a></div></div><hr /><div id="function.msql-pconnect" class="refentry"> <div class="refnamediv">  <h1 class="refname">msql_pconnect</h1>  <p class="verinfo">(PHP 4, PHP 5)</p><p class="refpurpose"><span class="refname">msql_pconnect</span> &mdash; <span class="dc-title">Open persistent mSQL connection</span></p> </div> <div class="refsect1 description">  <h3 class="title">Description</h3>  <div class="methodsynopsis dc-description">   <span class="type">resource</span> <span class="methodname"><b><b>msql_pconnect</b></b></span>    ([ <span class="methodparam"><span class="type">string</span> <tt class="parameter">$hostname</tt></span>  ] )</div>  <p class="para rdfs-comment">    <b>msql_pconnect()</b> acts very much like   <a href="function.msql-connect.html" class="function">msql_connect()</a> with two major differences.  </p>  <p class="para">    First, when connecting, the function would first try to find a    (persistent) link that&#039;s already open with the same host.   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 (<a href="function.msql-close.html" class="function">msql_close()</a> will not close links    established by this function).  </p> </div> <div class="refsect1 parameters">  <h3 class="title">Parameters</h3>  <p class="para">   <dl>    <dt>     <span class="term"><i><tt class="parameter">hostname</tt></i></span>     <dd>      <p class="para">       The hostname can also include a port number. e.g.        <i>hostname,port</i>.      </p>      <p class="para">       If not specified, the connection is established by the means of a Unix       domain socket, being then more efficient then a localhost TCP socket        connection.      </p>      <blockquote><p><b class="note">Note</b>:        <span class="simpara">        While this function will accept a colon (<i>:</i>) as a        host/port separator, a comma (<i>,</i>) is the preferred        method.       </span>      </p></blockquote>     </dd>    </dt>   </dl>  </p> </div> <div class="refsect1 returnvalues">  <h3 class="title">Return Values</h3>  <p class="para">   Returns a positive mSQL link identifier on success, or <b><tt>FALSE</tt></b> on   error.  </p> </div> <div class="refsect1 seealso">  <h3 class="title">See Also</h3>  <p class="para">   <ul class="simplelist">    <li class="member"><a href="function.msql-connect.html" class="function" rel="rdfs-seeAlso">msql_connect()</a></li>    <li class="member"><a href="function.msql-close.html" class="function" rel="rdfs-seeAlso">msql_close()</a></li>   </ul>  </p> </div></div><hr /><div style="text-align: center;"> <div class="prev" style="text-align: left; float: left;"><a href="function.msql-numrows.html">msql_numrows</a></div> <div class="next" style="text-align: right; float: right;"><a href="function.msql-query.html">msql_query</a></div> <div class="up"><a href="ref.msql.html">mSQL Functions</a></div> <div class="home"><a href="index.html">PHP Manual</a></div></div></body></html>

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?