<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$TOC_DEPRECATED = array();
$PARENTS = array();
include_once dirname(__FILE__) ."/toc/class.mysqli.inc";
$setup = array (
  'home' => 
  array (
    0 => 'index.php',
    1 => 'PHP Manual',
  ),
  'head' => 
  array (
    0 => 'UTF-8',
    1 => 'de',
  ),
  'this' => 
  array (
    0 => 'mysqli.options.php',
    1 => 'mysqli::options',
    2 => 'Setzt Optionen',
  ),
  'up' => 
  array (
    0 => 'class.mysqli.php',
    1 => 'mysqli',
  ),
  'prev' => 
  array (
    0 => 'mysqli.next-result.php',
    1 => 'mysqli::next_result',
  ),
  'next' => 
  array (
    0 => 'mysqli.ping.php',
    1 => 'mysqli::ping',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'de',
    'path' => 'reference/mysqli/mysqli/options.xml',
  ),
  'history' => 
  array (
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="mysqli.options" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">mysqli::options</h1>
  <h1 class="refname">mysqli_options</h1>
  <p class="verinfo">(PHP 5, PHP 7, PHP 8)</p><p class="refpurpose"><span class="refname">mysqli::options</span> -- <span class="refname">mysqli_options</span> &mdash; <span class="dc-title">Setzt Optionen</span></p>

 </div>

 <div class="refsect1 description" id="refsect1-mysqli.options-description">
  <h3 class="title">Beschreibung</h3>
  <p class="para">Objektorientierter Stil</p>
  <div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="methodname"><strong>mysqli::options</strong></span>(<span class="methodparam"><span class="type"><a href="language.types.integer.php" class="type int">int</a></span> <code class="parameter">$option</code></span>, <span class="methodparam"><span class="type"><span class="type"><a href="language.types.string.php" class="type string">string</a></span>|<span class="type"><a href="language.types.integer.php" class="type int">int</a></span></span> <code class="parameter">$value</code></span>): <span class="type"><a href="language.types.boolean.php" class="type bool">bool</a></span></div>

  <p class="para rdfs-comment">Prozeduraler Stil</p>
  <div class="methodsynopsis dc-description"><span class="methodname"><strong>mysqli_options</strong></span>(<span class="methodparam"><span class="type"><a href="class.mysqli.php" class="type mysqli">mysqli</a></span> <code class="parameter">$mysql</code></span>, <span class="methodparam"><span class="type"><a href="language.types.integer.php" class="type int">int</a></span> <code class="parameter">$option</code></span>, <span class="methodparam"><span class="type"><span class="type"><a href="language.types.string.php" class="type string">string</a></span>|<span class="type"><a href="language.types.integer.php" class="type int">int</a></span></span> <code class="parameter">$value</code></span>): <span class="type"><a href="language.types.boolean.php" class="type bool">bool</a></span></div>

  <p class="para rdfs-comment">
   Wird verwendet, um zusätzliche Verbindungsoptionen festzulegen und das
   Verhalten einer Verbindung zu beeinflussen.
  </p>
  <p class="para">
   Diese Funktion kann mehrfach aufgerufen werden, um mehrere Optionen zu
   setzen.
  </p>
  <p class="para">
   <span class="function"><strong>mysqli_options()</strong></span> muss nach
   <span class="function"><a href="mysqli.init.php" class="function">mysqli_init()</a></span> und vor
   <span class="function"><a href="mysqli.real-connect.php" class="function">mysqli_real_connect()</a></span> aufgerufen werden.
  </p>
 </div>


 <div class="refsect1 parameters" id="refsect1-mysqli.options-parameters">
  <h3 class="title">Parameter-Liste</h3>
  <p class="para">
   <dl>
    <dt>
<code class="parameter">mysql</code></dt><dd><p class="para">Nur bei prozeduralem Aufruf: ein von
<span class="function"><a href="function.mysqli-connect.php" class="function">mysqli_connect()</a></span> oder <span class="function"><a href="mysqli.init.php" class="function">mysqli_init()</a></span>
zurückgegebenes <span class="classname"><a href="class.mysqli.php" class="classname">mysqli</a></span>-Objekt.</p></dd>
    
     <dt><code class="parameter">option</code></dt>
     <dd>
      <p class="para">
       Die Option, die gesetzt werden soll. Es kann einer der folgenden Werte
       sein:
       <table id="mysqli.options.parameters" class="doctable table">
        <caption><strong>Gültige Optionen</strong></caption>
        
         <thead>
          <tr>
           <th>Name</th>
           <th>Beschreibung</th>
          </tr>

         </thead>

         <tbody class="tbody">
          <tr>
           <td><strong><code><a href="mysqli.constants.php#constant.mysqli-opt-connect-timeout">MYSQLI_OPT_CONNECT_TIMEOUT</a></code></strong></td>
           <td>Zeitlimit für den Verbindungsaufbau (in Sekunden)</td>
          </tr>

          <tr>
           <td><strong><code><a href="mysqli.constants.php#constant.mysqli-opt-read-timeout">MYSQLI_OPT_READ_TIMEOUT</a></code></strong></td>
           <td>
            Zeitlimit für die Ausführung eines Befehls (in Sekunden).
            Verfügbar seit PHP 7.2.0.
           </td>
          </tr>

          <tr>
           <td><strong><code><a href="mysqli.constants.php#constant.mysqli-opt-local-infile">MYSQLI_OPT_LOCAL_INFILE</a></code></strong></td>
           <td>Aktivieren/Deaktivieren von <code class="literal">LOAD LOCAL INFILE</code></td>
          </tr>

          <tr>
           <td><strong><code><a href="mysqli.constants.php#constant.mysqli-init-command">MYSQLI_INIT_COMMAND</a></code></strong></td>
           <td>
            Der Befehl, der nach dem Aufbau einer Verbindung zum MySQL-Server
            ausgeführt wird
           </td>
          </tr>

          <tr>
           <td><strong><code><a href="mysqli.constants.php#constant.mysqli-set-charset-name">MYSQLI_SET_CHARSET_NAME</a></code></strong></td>
           <td>Der Zeichensatz, der als Standard gesetzt werden soll</td>
          </tr>

          <tr>
           <td><strong><code><a href="mysqli.constants.php#constant.mysqli-read-default-file">MYSQLI_READ_DEFAULT_FILE</a></code></strong></td>
           <td>
            Optionen aus der benannten Optionsdatei lesen statt aus
            <var class="filename">my.cnf</var>; wird von mysqlnd nicht unterstützt.
           </td>
          </tr>

          <tr>
           <td><strong><code><a href="mysqli.constants.php#constant.mysqli-read-default-group">MYSQLI_READ_DEFAULT_GROUP</a></code></strong></td>
           <td>
            Liest die Optionen der benannten Gruppe aus der Datei
            <var class="filename">my.cnf</var> oder der Datei, die mit
            <strong><code>MYSQL_READ_DEFAULT_FILE</code></strong> angegeben wurde;
            wird von mysqlnd nicht unterstützt.
           </td>
          </tr>

          <tr>
           <td><strong><code><a href="mysqli.constants.php#constant.mysqli-server-public-key">MYSQLI_SERVER_PUBLIC_KEY</a></code></strong></td>
           <td>
            Die öffentliche RSA-Schlüsseldatei, die für die SHA-256-basierte
            Authentifizierung verwendet wird.
           </td>
          </tr>

          <tr>
           <td><strong><code><a href="mysqli.constants.php#constant.mysqli-opt-net-cmd-buffer-size">MYSQLI_OPT_NET_CMD_BUFFER_SIZE</a></code></strong></td>
           <td>
            Die Größe des internen Befehls-/Netzwerkpuffers; gilt nur für
            mysqlnd.
           </td>
          </tr>

          <tr>
           <td><strong><code><a href="mysqli.constants.php#constant.mysqli-opt-net-read-buffer-size">MYSQLI_OPT_NET_READ_BUFFER_SIZE</a></code></strong></td>
           <td>
            Maximale zu lesende Blockgröße (in Bytes), wenn der Textkörper
            eines MySQL-Befehlspakets gelesen wird; gilt nur für mysqlnd.
           </td>
          </tr>

          <tr>
           <td><strong><code><a href="mysqli.constants.php#constant.mysqli-opt-int-and-float-native">MYSQLI_OPT_INT_AND_FLOAT_NATIVE</a></code></strong></td>
           <td>
            Wenn nicht-vorbereitete Anweisungen verwendet werden, werden
            Spalten mit Integer- und Float-Werten wieder in PHP-Zahlen
            umgewandelt; gilt nur für mysqlnd.
           </td>
          </tr>

          <tr>
           <td><strong><code><a href="mysqli.constants.php#constant.mysqli-opt-ssl-verify-server-cert">MYSQLI_OPT_SSL_VERIFY_SERVER_CERT</a></code></strong></td>
           <td>
            Gibt an, ob das Serverzertifikat verifiziert werden soll oder
            nicht.
           </td>
          </tr>

         </tbody>
        
       </table>

      </p>
     </dd>
    
    
     <dt><code class="parameter">value</code></dt>
     <dd>
      <p class="para">
       Der Wert für die Option
      </p>
     </dd>
    
   </dl>
  </p>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-mysqli.options-returnvalues">
  <h3 class="title">Rückgabewerte</h3>
  <p class="para">
   Gibt bei Erfolg <strong><code><a href="reserved.constants.php#constant.true">true</a></code></strong> zurück. Bei einem Fehler wird <strong><code><a href="reserved.constants.php#constant.false">false</a></code></strong> zurückgegeben.
  </p>
 </div>


 <div class="refsect1 errors" id="refsect1-mysqli.options-errors">
  <h3 class="title">Fehler/Exceptions</h3>
  <p class="para">
If mysqli error reporting is enabled (<strong><code><a href="mysqli.constants.php#constant.mysqli-report-error">MYSQLI_REPORT_ERROR</a></code></strong>) and the requested operation fails,
a warning is generated. If, in addition, the mode is set to <strong><code><a href="mysqli.constants.php#constant.mysqli-report-strict">MYSQLI_REPORT_STRICT</a></code></strong>,
a <span class="classname"><a href="class.mysqli-sql-exception.php" class="classname">mysqli_sql_exception</a></span> is thrown instead.</p>
 </div>


 <div class="refsect1 examples" id="refsect1-mysqli.options-examples">
  <h3 class="title">Beispiele</h3>
  <p class="para">
   Siehe <span class="function"><a href="mysqli.real-connect.php" class="function">mysqli_real_connect()</a></span>.
  </p>
 </div>


 <div class="refsect1 notes" id="refsect1-mysqli.options-notes">
  <h3 class="title">Anmerkungen</h3>
  <blockquote class="note"><p><strong class="note">Hinweis</strong>: 
<p class="para">MySQLnd nimmt immer den Standardzeichensatz des Servers an. Dieser Zeichensatz wird während
des Aufbaus der Verbindung bzw. der Authentifizierung übermittelt und danach von MySQLnd verwendet.
</p><p class="para">Libmysqlclient verwendet als Standardzeichensatz den, der in der Datei
<var class="filename">my.cnf</var> angegeben oder durch einen Aufruf von <span class="function"><strong>mysqli_options()</strong></span>
vor dem Aufruf von <span class="function"><a href="mysqli.real-connect.php" class="function">mysqli_real_connect()</a></span> aber nach
<span class="function"><a href="mysqli.init.php" class="function">mysqli_init()</a></span> gesetzt wurde.</p></p></blockquote>
 </div>


 <div class="refsect1 seealso" id="refsect1-mysqli.options-seealso">
  <h3 class="title">Siehe auch</h3>
  <p class="para">
   <ul class="simplelist">
    <li><span class="function"><a href="mysqli.init.php" class="function" rel="rdfs-seeAlso">mysqli_init()</a> - Initialisiert MySQLi und liefert ein Objekt zur Verwendung mit mysqli_real_connect()</span></li>
    <li><span class="function"><a href="mysqli.real-connect.php" class="function" rel="rdfs-seeAlso">mysqli_real_connect()</a> - Baut eine Verbindung zu einem MySQL-Server auf</span></li>
   </ul>
  </p>
 </div>


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