downloads | documentation | faq | getting help | mailing lists | licenses | wiki | reporting bugs | php.net sites | links | conferences | my php.net

search for in the

Our source is open

The syntax highlighted source is automatically generated by PHP from the plaintext script. If you're interested in what's behind the several functions we used, you can always take a look at the source of the following files:

Of course, if you want to see the source of this page, we have it available. You can also browse the SVN repository for this website on svn.php.net.

Source of: /manual/en/function.odbc-pconnect.php

<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$PARENTS = array();
include_once
dirname(__FILE__) ."/toc/ref.uodbc.inc";
$setup = array (
 
'home' =>
  array (
   
0 => 'index.php',
   
1 => 'PHP Manual',
  ),
 
'head' =>
  array (
   
0 => 'UTF-8',
   
1 => 'en',
  ),
 
'this' =>
  array (
   
0 => 'function.odbc-pconnect.php',
   
1 => 'odbc_pconnect',
  ),
 
'up' =>
  array (
   
0 => 'ref.uodbc.php',
   
1 => 'ODBC Functions',
  ),
 
'prev' =>
  array (
   
0 => 'function.odbc-num-rows.php',
   
1 => 'odbc_num_rows',
  ),
 
'next' =>
  array (
   
0 => 'function.odbc-prepare.php',
   
1 => 'odbc_prepare',
  ),
);
$setup["toc"] = $TOC;
$setup["parents"] = $PARENTS;
manual_setup($setup);

manual_header();
?>
<div id="function.odbc-pconnect" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">odbc_pconnect</h1>
  <p class="verinfo">(PHP 4, PHP 5)</p><p class="refpurpose"><span class="refname">odbc_pconnect</span> &mdash; <span class="dc-title">Open a persistent database connection</span></p>

 </div>
 
 <a name="function.odbc-pconnect.description"></a><div class="refsect1 description">
  <h3 class="title">Description</h3>
  <div class="methodsynopsis dc-description">
   <span class="type">resource</span> <span class="methodname"><b>odbc_pconnect</b></span>
    ( <span class="methodparam"><span class="type">string</span> <tt class="parameter">$dsn</tt></span>
   , <span class="methodparam"><span class="type">string</span> <tt class="parameter">$user</tt></span>
   , <span class="methodparam"><span class="type">string</span> <tt class="parameter">$password</tt></span>
   [, <span class="methodparam"><span class="type">int</span> <tt class="parameter">$cursor_type</tt></span>
  ] )</div>

  <p class="para rdfs-comment">
   Opens a persistent database connection.
  </p>
  <p class="para">
   This function is much like
   <a href="function.odbc-connect.php" class="function">odbc_connect()</a>, except that the connection is
   not really closed when the script has finished.  Future requests
   for a connection with the same <i><tt class="parameter">dsn</tt></i>
,
   <i><tt class="parameter">user</tt></i>
, <i><tt class="parameter">password</tt></i>

   combination (via <a href="function.odbc-connect.php" class="function">odbc_connect()</a> and
   <b>odbc_pconnect()</b>) can reuse the persistent
   connection.
  </p>
 </div>


 <a name="function.odbc-pconnect.parameters"></a><div class="refsect1 parameters">
  <h3 class="title">Parameters</h3>
  <p class="para">
   See <a href="function.odbc-connect.php" class="function">odbc_connect()</a> for details.
  </p>
 </div>


 <a name="function.odbc-pconnect.returnvalues"></a><div class="refsect1 returnvalues">
  <h3 class="title">Return Values</h3>
  <p class="para">
   Returns an ODBC connection id or 0 (<b><tt class="constant">FALSE</tt></b>) on
   error.
  </p>
 </div>


 <a name="function.odbc-pconnect.notes"></a><div class="refsect1 notes">
  <h3 class="title">Notes</h3>
  <blockquote><p><b class="note">Note</b>:
   <span class="simpara">
    Persistent connections have no effect if PHP is used as a CGI
    program.
   </span>
  </p></blockquote>
 </div>


 <a name="function.odbc-pconnect.seealso"></a><div class="refsect1 seealso">
  <h3 class="title">See Also</h3>
  <p class="para">
   </p><ul class="simplelist">
    <li class="member"><a href="function.odbc-connect.php" class="function" rel="rdfs-seeAlso">odbc_connect()</a> - Connect to a datasource</li>
    <li class="member"><a href="features.persistent-connections.php" class="link">Persistent Database Connections</a></li>
   </ul><p>
  </p>
 </div>


</div><?php manual_footer(); ?>
 
show source | credits | sitemap | contact | advertising | mirror sites