<?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 => 'uk',
  ),
  'this' => 
  array (
    0 => 'mysqli.options.php',
    1 => 'mysqli::options',
    2 => 'Set options',
  ),
  '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' => 'en',
    '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">Set options</span></p>

 </div>

 <div class="refsect1 description" id="refsect1-mysqli.options-description">
  <h3 class="title">Опис</h3>
  <p class="para">Об&#039;єктно-орієнтований стиль</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">Процедурний стиль</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">
   Used to set extra connect options and affect behavior for a connection.
  </p>
  <p class="para">
   This function may be called multiple times to set several options.
  </p>
  <p class="para">
   <span class="function"><strong>mysqli_options()</strong></span> should be called after
   <span class="function"><a href="mysqli.init.php" class="function">mysqli_init()</a></span> and before
   <span class="function"><a href="mysqli.real-connect.php" class="function">mysqli_real_connect()</a></span>.
  </p>
 </div>


 <div class="refsect1 parameters" id="refsect1-mysqli.options-parameters">
  <h3 class="title">Параметри</h3>
  <p class="para">
   <dl>
    <dt>
<code class="parameter">mysql</code></dt><dd><p class="para">Тільки процедурний стиль:
об&#039;єкт <span class="classname"><a href="class.mysqli.php" class="classname">mysqli</a></span>, якого повертає функція
<span class="function"><a href="function.mysqli-connect.php" class="function">mysqli_connect()</a></span> або
<span class="function"><a href="mysqli.init.php" class="function">mysqli_init()</a></span></p></dd>
    
     <dt><code class="parameter">option</code></dt>
     <dd>
      <p class="para">
       The option that you want to set. It can be one of the following values:
       <table id="mysqli.options.parameters" class="doctable table">
        <caption><strong>Valid options</strong></caption>
        
         <thead>
          <tr>
           <th>Name</th>
           <th>Description</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>Connection timeout in seconds</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>Command execution result timeout in seconds. Available as of 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>Enable/disable use of <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>Command to execute after when connecting to MySQL server</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>The charset to be set as default.</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>
            Read options from named option file instead of <var class="filename">my.cnf</var>
            Not supported by mysqlnd.
           </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>
            Read options from the named group from <var class="filename">my.cnf</var>
            or the file specified with <strong><code>MYSQL_READ_DEFAULT_FILE</code></strong>.
            Not supported by mysqlnd.
           </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>
             RSA public key file used with the SHA-256 based authentication.
           </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>
             The size of the internal command/network buffer. Only valid for
             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>
             Maximum read chunk size in bytes when reading the body of a MySQL
             command packet. Only valid for 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>
             Convert integer and float columns back to PHP numbers when using non-prepared statements.
             Only valid for 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>
            Whether to verify server certificate or not.
           </td>
          </tr>

         </tbody>
        
       </table>

      </p>
     </dd>
    
    
     <dt><code class="parameter">value</code></dt>
     <dd>
      <p class="para">
       The value for the option.
      </p>
     </dd>
    
   </dl>
  </p>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-mysqli.options-returnvalues">
  <h3 class="title">Значення, що повертаються</h3>
  <p class="para">
   Повертає <strong><code><a href="reserved.constants.php#constant.true">true</a></code></strong> у разі успіху або <strong><code><a href="reserved.constants.php#constant.false">false</a></code></strong> в разі помилки.
  </p>
 </div>


 <div class="refsect1 errors" id="refsect1-mysqli.options-errors">
  <h3 class="title">Помилки/виключення</h3>
  <p class="para"> Якщо увімкнені звіти про помилки
mysqli (<strong><code><a href="mysqli.constants.php#constant.mysqli-report-error">MYSQLI_REPORT_ERROR</a></code></strong>) і запитана операція не
виконалась, буде виведено попередження, але якщо встановлено режим
<strong><code><a href="mysqli.constants.php#constant.mysqli-report-strict">MYSQLI_REPORT_STRICT</a></code></strong>, буде викинуто виключення
<span class="classname"><a href="class.mysqli-sql-exception.php" class="classname">mysqli_sql_exception</a></span>.</p>
 </div>


 <div class="refsect1 examples" id="refsect1-mysqli.options-examples">
  <h3 class="title">Приклади</h3>
  <p class="para">
   See <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">Примітки</h3>
  <blockquote class="note"><p><strong class="note">Зауваження</strong>: <p class="para">MySQLnd завжди використовує
стандартне кодування символів на сервері. Це кодування надсилається на етапі
з&#039;єднання/автентифікації, які використовує
mysqlnd.</p><p class="para">Libmysqlclient використовує кодування символів, вказане у
файлі <var class="filename">my.cnf</var>, або явним викликом функції
<span class="function"><strong>mysqli_options()</strong></span> перед викликом
<span class="function"><a href="mysqli.real-connect.php" class="function">mysqli_real_connect()</a></span>, але після
<span class="function"><a href="mysqli.init.php" class="function">mysqli_init()</a></span>.</p></p></blockquote>
 </div>


 <div class="refsect1 seealso" id="refsect1-mysqli.options-seealso">
  <h3 class="title">Прогляньте також</h3>
  <p class="para">
   <ul class="simplelist">
    <li><span class="function"><a href="mysqli.init.php" class="function" rel="rdfs-seeAlso">mysqli_init()</a> - Initializes MySQLi and returns an object for use with mysqli_real_connect()</span></li>
    <li><span class="function"><a href="mysqli.real-connect.php" class="function" rel="rdfs-seeAlso">mysqli_real_connect()</a> - Opens a connection to a mysql server</span></li>
   </ul>
  </p>
 </div>


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