<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$TOC_DEPRECATED = array();
$PARENTS = array();
include_once dirname(__FILE__) ."/toc/ref.cubrid.inc";
$setup = array (
  'home' => 
  array (
    0 => 'index.php',
    1 => 'PHP Manual',
  ),
  'head' => 
  array (
    0 => 'UTF-8',
    1 => 'de',
  ),
  'this' => 
  array (
    0 => 'function.cubrid-get-db-parameter.php',
    1 => 'cubrid_get_db_parameter',
    2 => 'Returns the CUBRID database parameters',
  ),
  'up' => 
  array (
    0 => 'ref.cubrid.php',
    1 => 'CUBRID Funktionen',
  ),
  'prev' => 
  array (
    0 => 'function.cubrid-get-client-info.php',
    1 => 'cubrid_get_client_info',
  ),
  'next' => 
  array (
    0 => 'function.cubrid-get-query-timeout.php',
    1 => 'cubrid_get_query_timeout',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'en',
    'path' => 'reference/cubrid/functions/cubrid-get-db-parameter.xml',
  ),
  'history' => 
  array (
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="function.cubrid-get-db-parameter" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">cubrid_get_db_parameter</h1>
  <p class="verinfo">(PECL CUBRID &gt;= 8.3.0)</p><p class="refpurpose"><span class="refname">cubrid_get_db_parameter</span> &mdash; <span class="dc-title">Returns the CUBRID database parameters</span></p>

 </div>

 <div class="refsect1 description" id="refsect1-function.cubrid-get-db-parameter-description">
  <h3 class="title">Beschreibung</h3>
  <div class="methodsynopsis dc-description">
   <span class="methodname"><strong>cubrid_get_db_parameter</strong></span>(<span class="methodparam"><span class="type"><a href="language.types.resource.php" class="type resource">resource</a></span> <code class="parameter">$conn_identifier</code></span>): <span class="type"><a href="language.types.array.php" class="type array">array</a></span></div>

  <p class="simpara">
   This function returns the CUBRID database parameters,Bei einem Fehler wird <strong><code><a href="reserved.constants.php#constant.false">false</a></code></strong> zurückgegeben..
   It returns an associative array with the values for the following parameters:
  </p>
  <ul class="simplelist">
  <li><strong><code>PARAM_ISOLATION_LEVEL</code></strong></li>
  <li><strong><code>PARAM_LOCK_TIMEOUT</code></strong></li>
  <li><strong><code>PARAM_MAX_STRING_LENGTH</code></strong></li>
  <li><strong><code>PARAM_AUTO_COMMIT</code></strong></li>
 </ul>
  <table class="doctable table">
  <caption><strong>Database parameters</strong></caption>
   
    <thead>
     <tr>
      <th>Parameter</th>
      <th>Description</th>
     </tr>

    </thead>

    <tbody class="tbody">
     <tr>
      <td>PARAM_ISOLATION_LEVEL</td>
      <td>The transaction isolation level.</td>
     </tr>

     <tr>
      <td>LOCK_TIMEOUT</td>
      <td>CUBRID provides the lock timeout feature, which sets the waiting
       time (in seconds) for the lock until the transaction lock setting is
       allowed. The default value of the lock_timeout_in_secs parameter is
       -1, which means the application client will wait indefinitely until
       the transaction lock is allowed.
      </td>
     </tr>

     <tr>
      <td>PARAM_AUTO_COMMIT</td>
      <td>In CUBRID PHP, auto-commit mode is disabled by default for
       transaction management. It can be set by using
       <span class="function"><a href="function.cubrid-set-autocommit.php" class="function">cubrid_set_autocommit()</a></span>.
      </td>
     </tr>

    </tbody>
   
  </table>


  <p class="para">
   The following table shows the isolation levels from 1 to 6. It consists of
   table schema (row) and isolation level:
  <table class="doctable table">
   <caption><strong>Levels of Isolation Supported by CUBRID</strong></caption>
    
     <thead>
      <tr>
       <th>Name</th>
       <th>Description</th>
      </tr>

     </thead>

     <tbody class="tbody">
      <tr>
       <td>SERIALIZABLE (6)</td>
       <td>In this isolation level, problems concerning concurrency (e.g.
        dirty read, non-repeatable read, phantom read, etc.) do not
        occur.</td>
      </tr>

      <tr>
       <td>REPEATABLE READ CLASS with REPEATABLE READ INSTANCES (5)</td>
       <td>Another transaction T2 cannot update the schema of table A while
        transaction T1 is viewing table A.
       Transaction T1 may experience phantom read for the record R that was
       inserted by another transaction T2 when it is repeatedly retrieving a
       specific record.</td>
      </tr>

      <tr>
       <td>REPEATABLE READ CLASS with READ COMMITTED INSTANCES (or CURSOR STABILITY) (4)</td>
       <td>Another transaction T2 cannot update the schema of table A while
        transaction T1 is viewing table A.
       Transaction T1 may experience R read (non-repeatable read) that was
       updated and committed by another transaction T2 when it is repeatedly
       retrieving the record R.</td>
      </tr>

      <tr>
       <td>REPEATABLE READ CLASS with READ UNCOMMITTED INSTANCES (3)</td>
       <td>Default isolation level.  Another transaction T2 cannot update
        the schema of table A  while transaction T1 is viewing table A.
        Transaction T1 may experience R&#039; read (dirty read) for the record that
        was updated but not committed by another transaction T2.</td>
      </tr>

      <tr>
       <td>READ COMMITTED CLASS with READ COMMITTED INSTANCES (2)</td>
       <td>Transaction T1 may experience A&#039; read (non-repeatable read) for
        the table that was updated and committed by another transaction  T2
        while it is viewing table A repeatedly.  Transaction T1 may experience
        R&#039; read (non-repeatable read) for the record that was updated and
        committed by another transaction T2 while it is retrieving the record
        R repeatedly.</td>
      </tr>

      <tr>
       <td>READ COMMITTED CLASS with READ UNCOMMITTED INSTANCES (1)</td>
       <td>Transaction T1 may experience A&#039; read (non-repeatable read) for
        the table that was updated and committed by another transaction T2
        while it is repeatedly viewing table A.  Transaction T1 may experience
        R&#039; read (dirty read) for the record that was updated but not committed
        by another transaction T2.</td>
      </tr>

     </tbody>
    
   </table>

  </p>
 </div>


 <div class="refsect1 parameters" id="refsect1-function.cubrid-get-db-parameter-parameters">
 <h3 class="title">Parameter-Liste</h3>
 <dl>
  
   <dt><code class="parameter">conn_identifier</code></dt>
   <dd><span class="simpara">
     The CUBRID connection. If the connection identifier is not specified,
     the last link opened by <span class="function"><a href="function.cubrid-connect.php" class="function">cubrid_connect()</a></span> is assumed.
   </span></dd>
  
 </dl>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-function.cubrid-get-db-parameter-returnvalues">
  <h3 class="title">Rückgabewerte</h3>
  <p class="simpara">
   An associative array with CUBRID database parameters; on success,Bei einem Fehler wird <strong><code><a href="reserved.constants.php#constant.false">false</a></code></strong> zurückgegeben..
  </p>
 </div>


 <div class="refsect1 changelog" id="refsect1-function.cubrid-get-db-parameter-changelog">
  <h3 class="title">Changelog</h3>
  <table class="doctable informaltable">
   
    <thead>
     <tr>
      <th>Version</th>
      <th>Beschreibung</th>
     </tr>

    </thead>

    <tbody class="tbody">
     <tr>
      <td>8.4.0</td>
      <td>
       Change LOCK_TIMEOUT to PARAM_LOCK_TIMEOUT, and MAX_STRING_LENGTH to
       PARAM_MAX_STRING_LENGTH in result.
      </td>
     </tr>

    </tbody>
   
  </table>

 </div>


 <div class="refsect1 examples" id="refsect1-function.cubrid-get-db-parameter-examples">
  <h3 class="title">Beispiele</h3>
  <div class="example" id="example-1">
   <p><strong>Beispiel #1 <span class="function"><strong>cubrid_get_db_parameter()</strong></span> example</strong></p>
   <div class="example-contents">
<div class="phpcode"><code><span style="color: #000000"><span style="color: #0000BB">&lt;?php<br />printf</span><span style="color: #007700">(</span><span style="color: #DD0000">"%-30s %s\n"</span><span style="color: #007700">, </span><span style="color: #DD0000">"CUBRID PHP Version:"</span><span style="color: #007700">, </span><span style="color: #0000BB">cubrid_version</span><span style="color: #007700">());<br /><br /></span><span style="color: #0000BB">printf</span><span style="color: #007700">(</span><span style="color: #DD0000">"\n"</span><span style="color: #007700">);<br /><br /></span><span style="color: #0000BB">$conn </span><span style="color: #007700">= </span><span style="color: #0000BB">cubrid_connect</span><span style="color: #007700">(</span><span style="color: #DD0000">"localhost"</span><span style="color: #007700">, </span><span style="color: #0000BB">33088</span><span style="color: #007700">, </span><span style="color: #DD0000">"demodb"</span><span style="color: #007700">);<br /><br />if (!</span><span style="color: #0000BB">$conn</span><span style="color: #007700">) {<br />    die(</span><span style="color: #DD0000">'Connect Error ('</span><span style="color: #007700">. </span><span style="color: #0000BB">cubrid_error_code</span><span style="color: #007700">() .</span><span style="color: #DD0000">')' </span><span style="color: #007700">. </span><span style="color: #0000BB">cubrid_error_msg</span><span style="color: #007700">());<br />}<br /><br /></span><span style="color: #0000BB">$db_params </span><span style="color: #007700">= </span><span style="color: #0000BB">cubrid_get_db_parameter</span><span style="color: #007700">(</span><span style="color: #0000BB">$conn</span><span style="color: #007700">);<br /><br />while (list(</span><span style="color: #0000BB">$param_name</span><span style="color: #007700">, </span><span style="color: #0000BB">$param_value</span><span style="color: #007700">) = </span><span style="color: #0000BB">each</span><span style="color: #007700">(</span><span style="color: #0000BB">$db_params</span><span style="color: #007700">)) {<br />    </span><span style="color: #0000BB">printf</span><span style="color: #007700">(</span><span style="color: #DD0000">"%-30s %s\n"</span><span style="color: #007700">, </span><span style="color: #0000BB">$param_name</span><span style="color: #007700">, </span><span style="color: #0000BB">$param_value</span><span style="color: #007700">);<br />}<br /><br /></span><span style="color: #0000BB">printf</span><span style="color: #007700">(</span><span style="color: #DD0000">"\n"</span><span style="color: #007700">);<br /><br /></span><span style="color: #0000BB">$server_info </span><span style="color: #007700">= </span><span style="color: #0000BB">cubrid_get_server_info</span><span style="color: #007700">(</span><span style="color: #0000BB">$conn</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">$client_info </span><span style="color: #007700">= </span><span style="color: #0000BB">cubrid_get_client_info</span><span style="color: #007700">();<br /><br /></span><span style="color: #0000BB">printf</span><span style="color: #007700">(</span><span style="color: #DD0000">"%-30s %s\n"</span><span style="color: #007700">, </span><span style="color: #DD0000">"Server Info:"</span><span style="color: #007700">, </span><span style="color: #0000BB">$server_info</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">printf</span><span style="color: #007700">(</span><span style="color: #DD0000">"%-30s %s\n"</span><span style="color: #007700">, </span><span style="color: #DD0000">"Client Info:"</span><span style="color: #007700">, </span><span style="color: #0000BB">$client_info</span><span style="color: #007700">);<br /><br /></span><span style="color: #0000BB">printf</span><span style="color: #007700">(</span><span style="color: #DD0000">"\n"</span><span style="color: #007700">);<br /><br /></span><span style="color: #0000BB">$charset </span><span style="color: #007700">= </span><span style="color: #0000BB">cubrid_get_charset</span><span style="color: #007700">(</span><span style="color: #0000BB">$conn</span><span style="color: #007700">);<br /><br /></span><span style="color: #0000BB">printf</span><span style="color: #007700">(</span><span style="color: #DD0000">"%-30s %s\n"</span><span style="color: #007700">, </span><span style="color: #DD0000">"CUBRID Charset:"</span><span style="color: #007700">, </span><span style="color: #0000BB">$charset</span><span style="color: #007700">);<br /><br /></span><span style="color: #0000BB">cubrid_disconnect</span><span style="color: #007700">(</span><span style="color: #0000BB">$conn</span><span style="color: #007700">);<br /><br /></span><span style="color: #0000BB">?&gt;</span></span></code></div>
   </div>

    <div class="example-contents"><p>Das oben gezeigte Beispiel erzeugt folgende Ausgabe:</p></div>
    <div class="example-contents screen">
<div class="examplescode"><pre class="examplescode">CUBRID PHP Version:            9.1.0.0001

PARAM_ISOLATION_LEVEL          3
LOCK_TIMEOUT                   -1
MAX_STRING_LENGTH              1073741823
PARAM_AUTO_COMMIT              1

Server Info:                   9.1.0.0212
Client Info:                   9.1.0

CUBRID Charset:                iso8859-1</pre>
</div>
    </div>
  </div>
 </div>


 <div class="refsect1 seealso" id="refsect1-function.cubrid-get-db-parameter-seealso">
  <h3 class="title">Siehe auch</h3>
  <ul class="simplelist">
   <li><span class="function"><a href="function.cubrid-set-db-parameter.php" class="function" rel="rdfs-seeAlso">cubrid_set_db_parameter()</a> - Sets the CUBRID database parameters</span></li>
   <li><span class="function"><a href="function.cubrid-get-autocommit.php" class="function" rel="rdfs-seeAlso">cubrid_get_autocommit()</a> - Get auto-commit mode of the connection</span></li>
  </ul>
 </div>

</div><?php manual_footer($setup); ?>