Sophie

Sophie

distrib > Mageia > 4 > i586 > by-pkgid > f800694edefe91adea2624f711a41a2d > files > 6244

php-manual-en-5.5.7-1.mga4.noarch.rpm

<!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 persistent Sybase connection</title>

 </head>
 <body><div class="manualnavbar" 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" id="refsect1-function.sybase-pconnect-description">
  <h3 class="title">Description</h3>
  <div class="methodsynopsis dc-description">
   <span class="type">resource</span> <span class="methodname"><strong>sybase_pconnect</strong></span>
    ([ <span class="methodparam"><span class="type">string</span> <code class="parameter">$servername</code></span>
   [, <span class="methodparam"><span class="type">string</span> <code class="parameter">$username</code></span>
   [, <span class="methodparam"><span class="type">string</span> <code class="parameter">$password</code></span>
   [, <span class="methodparam"><span class="type">string</span> <code class="parameter">$charset</code></span>
   [, <span class="methodparam"><span class="type">string</span> <code class="parameter">$appname</code></span>
  ]]]]] )</div>

  <p class="para rdfs-comment">
    <span class="function"><strong>sybase_pconnect()</strong></span> acts very much like
    <span class="function"><a href="function.sybase-connect.html" class="function">sybase_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&#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 ( <span class="function"><a href="function.sybase-close.html" class="function">sybase_close()</a></span> will not
   close links established by  <span class="function"><strong>sybase_pconnect()</strong></span>).
  </p>
  <p class="para">
   This type of links is therefore called &#039;persistent&#039;.
  </p>
 </div>


 <div class="refsect1 parameters" id="refsect1-function.sybase-pconnect-parameters">
  <h3 class="title">Parameters</h3>
  <p class="para">
   <dl>

    <dt>

     <span class="term"><em><code class="parameter">servername</code></em></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"><em><code class="parameter">username</code></em></span>
     <dd>

      <p class="para">
       Sybase user name
      </p>
     </dd>

    </dt>

    <dt>

     <span class="term"><em><code class="parameter">password</code></em></span>
     <dd>

      <p class="para">
       Password associated with <em><code class="parameter">username</code></em>.
      </p>
     </dd>

    </dt>

    <dt>

     <span class="term"><em><code class="parameter">charset</code></em></span>
     <dd>

      <p class="para">
       Specifies the charset for the connection
      </p>
     </dd>

    </dt>

    <dt>

     <span class="term"><em><code class="parameter">appname</code></em></span>
     <dd>

      <p class="para">
       Specifies an <em>appname</em> for the Sybase connection.
       This allow you to make separate connections in the same script to the
       same database. This may come handy when you have started a transaction
       in your current connection, and you need to be able to do a separate
       query which cannot be performed inside this transaction.
      </p>
     </dd>

    </dt>

   </dl>

  </p>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-function.sybase-pconnect-returnvalues">
  <h3 class="title">Return Values</h3>
  <p class="para">
   Returns a positive Sybase persistent link identifier on success, or
   <strong><code>FALSE</code></strong> on error.
  </p>
 </div>


 <div class="refsect1 changelog" id="refsect1-function.sybase-pconnect-changelog">
  <h3 class="title">Changelog</h3>
  <p class="para">
   <table class="doctable informaltable">
    
     <thead>
      <tr>
       <th>Version</th>
       <th>Description</th>
      </tr>

     </thead>

     <tbody class="tbody">
      <tr>
       <td>4.2.0</td>
       <td>
        The <em><code class="parameter">appname</code></em> parameter was added.
       </td>
      </tr>

      <tr>
       <td>4.0.2</td>
       <td>
        The <em><code class="parameter">charset</code></em> parameter was added.
       </td>
      </tr>

     </tbody>
    
   </table>

  </p>
 </div>


 <div class="refsect1 seealso" id="refsect1-function.sybase-pconnect-seealso">
  <h3 class="title">See Also</h3>
  <p class="para">
   <ul class="simplelist">
    <li class="member"> <span class="function"><a href="function.sybase-connect.html" class="function" rel="rdfs-seeAlso">sybase_connect()</a> - Opens a Sybase server connection</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.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>