function.sybase-pconnect.html

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

HTML
190
字号
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><html> <head>  <title>Open persistent Sybase 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.sybase-num-rows.html">sybase_num_rows</a></div> <div class="next" style="text-align: right; float: right;"><a href="function.sybase-query.html">sybase_query</a></div> <div class="up"><a href="ref.sybase.html">Sybase Functions</a></div> <div class="home"><a href="index.html">PHP Manual</a></div></div><hr /><div id="function.sybase-pconnect" class="refentry"> <div class="refnamediv">  <h1 class="refname">sybase_pconnect</h1>  <p class="verinfo">(PHP 4, PHP 5)</p><p class="refpurpose"><span class="refname">sybase_pconnect</span> &mdash; <span class="dc-title">Open persistent Sybase 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>sybase_pconnect</b></b></span>    ([ <span class="methodparam"><span class="type">string</span> <tt class="parameter">$servername</tt></span>   [, <span class="methodparam"><span class="type">string</span> <tt class="parameter">$username</tt></span>   [, <span class="methodparam"><span class="type">string</span> <tt class="parameter">$password</tt></span>   [, <span class="methodparam"><span class="type">string</span> <tt class="parameter">$charset</tt></span>   [, <span class="methodparam"><span class="type">string</span> <tt class="parameter">$appname</tt></span>  ]]]]] )</div>  <p class="para rdfs-comment">   <b>sybase_pconnect()</b> acts very much like   <a href="function.sybase-connect.html" class="function">sybase_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,   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 (<a href="function.sybase-close.html" class="function">sybase_close()</a> will not   close links established by <b>sybase_pconnect()</b>).  </p>  <p class="para">   This type of links is therefore called &#039;persistent&#039;.  </p> </div> <div class="refsect1 parameters">  <h3 class="title">Parameters</h3>  <p class="para">   <dl>    <dt>     <span class="term"><i><tt class="parameter">servername</tt></i></span>     <dd>      <p class="para">       The servername argument has to be a valid servername that is defined       in the &#039;interfaces&#039; file.      </p>     </dd>    </dt>    <dt>     <span class="term"><i><tt class="parameter">username</tt></i></span>     <dd>      <p class="para">       Sybase user name      </p>     </dd>    </dt>    <dt>     <span class="term"><i><tt class="parameter">password</tt></i></span>     <dd>      <p class="para">       Password associated with <i><tt class="parameter">username</tt></i>.      </p>     </dd>    </dt>    <dt>     <span class="term"><i><tt class="parameter">charset</tt></i></span>     <dd>      <p class="para">       Specifies the charset for the connection      </p>     </dd>    </dt>    <dt>     <span class="term"><i><tt class="parameter">appname</tt></i></span>     <dd>      <p class="para">      </p>     </dd>    </dt>   </dl>  </p> </div> <div class="refsect1 returnvalues">  <h3 class="title">Return Values</h3>  <p class="para">   Returns a positive Sybase persistent link identifier on success, or   <b><tt>FALSE</tt></b> on error.  </p> </div> <div class="refsect1 changelog">  <h3 class="title">ChangeLog</h3>  <p class="para">   <table class="informaltable">    <colgroup>     <thead valign="middle">      <tr valign="middle">       <th colspan="1">Version</th>       <th colspan="1">Description</th>      </tr>     </thead>     <tbody valign="middle" class="tbody">      <tr valign="middle">       <td colspan="1" rowspan="1" align="left">4.0.2</td>       <td colspan="1" rowspan="1" align="left">        The <i><tt class="parameter">charset</tt></i> parameter was added.       </td>      </tr>     </tbody>    </colgroup>   </table>  </p> </div> <div class="refsect1 seealso">  <h3 class="title">See Also</h3>  <p class="para">   <ul class="simplelist">    <li class="member"><a href="function.sybase-connect.html" class="function" rel="rdfs-seeAlso">sybase_connect()</a></li>   </ul>  </p> </div></div><hr /><div style="text-align: center;"> <div class="prev" style="text-align: left; float: left;"><a href="function.sybase-num-rows.html">sybase_num_rows</a></div> <div class="next" style="text-align: right; float: right;"><a href="function.sybase-query.html">sybase_query</a></div> <div class="up"><a href="ref.sybase.html">Sybase Functions</a></div> <div class="home"><a href="index.html">PHP Manual</a></div></div></body></html>

⌨️ 快捷键说明

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