Sophie

Sophie

distrib > Mageia > 4 > x86_64 > by-pkgid > f800694edefe91adea2624f711a41a2d > files > 10699

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>Connecting to Microsoft SQL Server and Sybase databases</title>

 </head>
 <body><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="ref.pdo-dblib.html">MS SQL Server (PDO)</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="ref.pdo-firebird.html">Firebird (PDO)</a></div>
 <div class="up"><a href="ref.pdo-dblib.html">MS SQL Server (PDO)</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div><hr /><div id="ref.pdo-dblib.connection" class="refentry">
   <div class="refnamediv">
    <h1 class="refname">PDO_DBLIB DSN</h1>
    <p class="verinfo">(PECL PDO_DBLIB &gt;= 0.9.0)</p><p class="refpurpose"><span class="refname">PDO_DBLIB DSN</span> &mdash; <span class="dc-title">Connecting to Microsoft SQL Server and Sybase databases</span></p>

   </div>

   <div class="refsect1 description" id="refsect1-ref.pdo-dblib.connection-description">
    <h3 class="title">Description</h3>
    <p class="para">
     The PDO_DBLIB Data Source Name (DSN) is composed of the following elements:
     <dl>

      <dt>

       <span class="term">DSN prefix</span>
       <dd>

        <p class="para">
         The DSN prefix is <strong class="userinput"><code>sybase:</code></strong> if PDO_DBLIB was
         linked against the Sybase ct-lib libraries,
         <strong class="userinput"><code>mssql:</code></strong> if PDO_DBLIB was linked against the
         Microsoft SQL Server libraries, or <strong class="userinput"><code>dblib:</code></strong> if
         PDO_DBLIB was linked against the FreeTDS libraries.
        </p>
       </dd>

      </dt>

      <dt>

       <span class="term"><em>host</em></span>
       <dd>

        <p class="para">
         The hostname on which the database server resides.
         Defaults to 127.0.0.1.
        </p>
       </dd>

      </dt>

      <dt>

       <span class="term"><em>dbname</em></span>
       <dd>

        <p class="para">
         The name of the database.
        </p>
       </dd>

      </dt>

      <dt>

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

        <p class="para">
         The client character set.
        </p>
       </dd>

      </dt>

      <dt>

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

        <p class="para">
         The application name (used in sysprocesses).
         Defaults to &quot;PHP Generic DB-lib&quot; or &quot;PHP freetds&quot;.
        </p>
       </dd>

      </dt>

      <dt>

       <span class="term"><em>secure</em></span>
       <dd>

        <p class="para">
         Currently unused.
        </p>
       </dd>

      </dt>

     </dl>

    </p>
   </div>

   <div class="refsect1 examples" id="refsect1-ref.pdo-dblib.connection-examples">
    <h3 class="title">Examples</h3>
    <p class="para">
     <div class="example" id="example-969">
      <p><strong>Example #1 PDO_DBLIB DSN examples</strong></p>
      <div class="example-contents"><p>
       The following examples show a PDO_DBLIB DSN for connecting to
       Microsoft SQL Server and Sybase databases:
       <div class="example-contents"><div class="cdata"><pre>
mssql:host=localhost;dbname=testdb
sybase:host=localhost;dbname=testdb
dblib:host=localhost;dbname=testdb
</pre></div>
       </div>

      </p></div>
     </div>
    </p>
   </div>

  </div><hr /><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="ref.pdo-dblib.html">MS SQL Server (PDO)</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="ref.pdo-firebird.html">Firebird (PDO)</a></div>
 <div class="up"><a href="ref.pdo-dblib.html">MS SQL Server (PDO)</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div></body></html>