<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$TOC_DEPRECATED = 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 => 'ru',
  ),
  'this' => 
  array (
    0 => 'function.odbc-autocommit.php',
    1 => 'odbc_autocommit',
    2 => 'Переключает поведение автоматической фиксации',
  ),
  'up' => 
  array (
    0 => 'ref.uodbc.php',
    1 => 'Функции ODBC',
  ),
  'prev' => 
  array (
    0 => 'ref.uodbc.php',
    1 => 'Функции ODBC',
  ),
  'next' => 
  array (
    0 => 'function.odbc-binmode.php',
    1 => 'odbc_binmode',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'ru',
    'path' => 'reference/uodbc/functions/odbc-autocommit.xml',
  ),
  'history' => 
  array (
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="function.odbc-autocommit" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">odbc_autocommit</h1>
  <p class="verinfo">(PHP 4, PHP 5, PHP 7, PHP 8)</p><p class="refpurpose"><span class="refname">odbc_autocommit</span> &mdash; <span class="dc-title">Переключает поведение автоматической фиксации</span></p>

 </div>

 <div class="refsect1 description" id="refsect1-function.odbc-autocommit-description">
  <h3 class="title">Описание</h3>
  <div class="methodsynopsis dc-description">
   <span class="methodname"><strong>odbc_autocommit</strong></span>(<span class="methodparam"><span class="type">Odbc\Connection</span> <code class="parameter">$odbc</code></span>, <span class="methodparam"><span class="type"><span class="type"><a href="language.types.null.php" class="type null">?</a></span><span class="type"><a href="language.types.boolean.php" class="type bool">bool</a></span></span> <code class="parameter">$enable</code><span class="initializer"> = <strong><code><a href="reserved.constants.php#constant.null">null</a></code></strong></span></span>): <span class="type"><span class="type"><a href="language.types.integer.php" class="type int">int</a></span>|<span class="type"><a href="language.types.boolean.php" class="type bool">bool</a></span></span></div>

  <p class="para rdfs-comment">
   Функция переключает поведение автоматической фиксации.
  </p>
  <p class="para">
   По умолчанию для подключения включена автоматическая фиксация. Отключение
   автоматической фиксации эквивалентно запуску транзакции.
  </p>
 </div>


 <div class="refsect1 parameters" id="refsect1-function.odbc-autocommit-parameters">
  <h3 class="title">Список параметров</h3>
  <p class="para">
   <dl>
    
     <dt><code class="parameter">odbc</code></dt>
     <dd>
      <p class="para">Объект ODBC-соединения.
Подробнее о коннекторе рассказывает описание функции <span class="function"><a href="function.odbc-connect.php" class="function">odbc_connect()</a></span>.</p>
     </dd>
    
    
     <dt><code class="parameter">enable</code></dt>
     <dd>
      <p class="para">
       Со значением <strong><code><a href="reserved.constants.php#constant.true">true</a></code></strong> параметр <code class="parameter">enable</code> включает автоматическую фиксацию,
       со значением <strong><code><a href="reserved.constants.php#constant.false">false</a></code></strong> — отключает.
       Функция возвращает статус автофиксации в соединении <code class="parameter">odbc</code>,
       если в этот параметр передали значение <strong><code><a href="reserved.constants.php#constant.null">null</a></code></strong>.
      </p>
     </dd>
    
   </dl>
  </p>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-function.odbc-autocommit-returnvalues">
  <h3 class="title">Возвращаемые значения</h3>
  <p class="para">
   Функция возвращает статус автоматической фиксации для подключения, которое передали
   в параметр <code class="parameter">odbc</code>, если в параметр <code class="parameter">enable</code> передали значение <strong><code><a href="reserved.constants.php#constant.null">null</a></code></strong>.
   Функция возвращает ненулевое значение, если автоматическая фиксация включена, 0, если выключена,
   и <strong><code><a href="reserved.constants.php#constant.false">false</a></code></strong>, если возникла ошибка.
  </p>
  <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>, если возникла ошибка,
   если значение аргумента <code class="parameter">enable</code> отличается от значения <strong><code><a href="reserved.constants.php#constant.null">null</a></code></strong>.
  </p>
 </div>


 <div class="refsect1 changelog" id="refsect1-function.odbc-autocommit-changelog">
  <h3 class="title">Список изменений</h3>
  <table class="doctable informaltable">
   
    <thead>
     <tr>
      <th>Версия</th>
      <th>Описание</th>
     </tr>

    </thead>

    <tbody class="tbody">
     <tr>
 <td>8.4.0</td>
 <td>
  Параметр <code class="parameter">odbc</code> теперь принимает объект соединения <span class="classname"><strong class="classname">Odbc\Connection</strong></span>;
  раньше принимался тип <span class="type"><a href="language.types.resource.php" class="type resource">resource</a></span>.
 </td>
</tr>

     <tr>
      <td>8.3.0</td>
      <td>
       Параметр <code class="parameter">enable</code> теперь принимает значение <strong><code><a href="reserved.constants.php#constant.null">null</a></code></strong>.
      </td>
     </tr>

    </tbody>
   
  </table>

 </div>


 <div class="refsect1 seealso" id="refsect1-function.odbc-autocommit-seealso">
  <h3 class="title">Смотрите также</h3>
  <p class="para">
   <ul class="simplelist">
    <li><span class="function"><a href="function.odbc-commit.php" class="function" rel="rdfs-seeAlso">odbc_commit()</a> - Фиксирует ODBC-транзакцию</span></li>
    <li><span class="function"><a href="function.odbc-rollback.php" class="function" rel="rdfs-seeAlso">odbc_rollback()</a> - Откатывает транзакцию</span></li>
   </ul>
  </p>
 </div>

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