mirror of
https://github.com/fofolee/uTools-Manuals.git
synced 2025-06-18 22:06:57 +08:00
89 lines
3.4 KiB
HTML
89 lines
3.4 KiB
HTML
<!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>Toggle autocommit behaviour</title>
|
|
</head>
|
|
<body class="docs"><div id="layout">
|
|
<div id="layout-content"><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)</p><p class="refpurpose"><span class="refname">odbc_autocommit</span> — <span class="dc-title">Toggle autocommit behaviour</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">resource</span> <code class="parameter">$connection_id</code></span>
|
|
[, <span class="methodparam"><span class="type">bool</span> <code class="parameter">$OnOff</code><span class="initializer"> = <strong><code>FALSE</code></strong></span></span>
|
|
] ) : <span class="type"><a href="language.pseudo-types.html#language.types.mixed" class="type mixed">mixed</a></span></div>
|
|
|
|
<p class="para rdfs-comment">
|
|
Toggles autocommit behaviour.
|
|
</p>
|
|
<p class="para">
|
|
By default, auto-commit is on for a connection. Disabling
|
|
auto-commit is equivalent with starting a transaction.
|
|
</p>
|
|
</div>
|
|
|
|
<div class="refsect1 parameters" id="refsect1-function.odbc-autocommit-parameters">
|
|
<h3 class="title">参数</h3>
|
|
<p class="para">
|
|
<dl>
|
|
|
|
|
|
<dt>
|
|
<code class="parameter">connection_id</code></dt>
|
|
|
|
<dd>
|
|
|
|
<p class="para">ODBC 连接标识符,详见
|
|
<span class="function"><a href="odbc_connect.html" class="function">odbc_connect()</a></span>。</p>
|
|
</dd>
|
|
|
|
|
|
|
|
<dt>
|
|
<code class="parameter">OnOff</code></dt>
|
|
|
|
<dd>
|
|
|
|
<p class="para">
|
|
If <code class="parameter">OnOff</code> is <strong><code>TRUE</code></strong>, auto-commit is enabled, if
|
|
it is <strong><code>FALSE</code></strong> auto-commit is disabled.
|
|
</p>
|
|
</dd>
|
|
|
|
|
|
</dl>
|
|
|
|
</p>
|
|
</div>
|
|
|
|
<div class="refsect1 returnvalues" id="refsect1-function.odbc-autocommit-returnvalues">
|
|
<h3 class="title">返回值</h3>
|
|
<p class="para">
|
|
Without the <code class="parameter">OnOff</code> parameter, this function returns
|
|
auto-commit status for <code class="parameter">connection_id</code>. Non-zero is
|
|
returned if auto-commit is on, 0 if it is off, or <strong><code>FALSE</code></strong> if an error
|
|
occurs.
|
|
</p>
|
|
<p class="para">
|
|
If <code class="parameter">OnOff</code> is set, this function returns <strong><code>TRUE</code></strong> on
|
|
success and <strong><code>FALSE</code></strong> on failure.
|
|
</p>
|
|
</div>
|
|
|
|
<div class="refsect1 seealso" id="refsect1-function.odbc-autocommit-seealso">
|
|
<h3 class="title">参见</h3>
|
|
<p class="para">
|
|
<ul class="simplelist">
|
|
<li class="member"><span class="function"><a href="odbc_commit.html" class="function" rel="rdfs-seeAlso">odbc_commit()</a> - Commit an ODBC transaction</span></li>
|
|
<li class="member"><span class="function"><a href="odbc_rollback.html" class="function" rel="rdfs-seeAlso">odbc_rollback()</a> - Rollback a transaction</span></li>
|
|
</ul>
|
|
</p>
|
|
</div>
|
|
|
|
</div></div></div></body></html> |