mirror of
https://github.com/php/doc-de.git
synced 2026-04-30 02:13:23 +02:00
85d1e2c1ed
git-svn-id: https://svn.php.net/repository/phpdoc/de/trunk@273110 c90b9560-bf6c-de11-be94-00142212c4b1
108 lines
3.2 KiB
XML
108 lines
3.2 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<!-- $Revision: 1.3 $ -->
|
|
<!-- EN-Revision: 1.6 Maintainer: conni Status: ready -->
|
|
<refentry xml:id='function.pg-transaction-status' xmlns="http://docbook.org/ns/docbook">
|
|
<refnamediv>
|
|
<refname>pg_transaction_status</refname>
|
|
<refpurpose>Gibt den aktuellen Transaktionsstatus des Servers zurück</refpurpose>
|
|
</refnamediv>
|
|
|
|
<refsect1 role="description">
|
|
&reftitle.description;
|
|
<methodsynopsis>
|
|
<type>int</type><methodname>pg_transaction_status</methodname>
|
|
<methodparam><type>resource</type><parameter>connection</parameter></methodparam>
|
|
</methodsynopsis>
|
|
<para>
|
|
Gibt den aktuellen Transaktionsstatus des Servers zurück.
|
|
</para>
|
|
<caution>
|
|
<para>
|
|
Die Funktion <function>pg_transaction_status</function> gibt
|
|
ungültige Ergebnisse zurück, wenn sie für einen PostgreSQL-Server
|
|
der Version 7.3 aufgerufen wird, bei dem der Parameter
|
|
<literal>autocommit</literal> auf off gesetzt ist. Die serverseitige
|
|
Eigenschaft autocommit ist veraltet und existiert in den neueren
|
|
PostgreSQL-Versionen nicht mehr.
|
|
</para>
|
|
</caution>
|
|
</refsect1>
|
|
|
|
<refsect1 role="parameters">
|
|
&reftitle.parameters;
|
|
<para>
|
|
<variablelist>
|
|
<varlistentry>
|
|
<term><parameter>connection</parameter></term>
|
|
<listitem>
|
|
<para>
|
|
PostgreSQL-Verbindungskennung.
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
</variablelist>
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1 role="returnvalues">
|
|
&reftitle.returnvalues;
|
|
<para>Mögliche Stati sind:
|
|
<constant>PGSQL_TRANSACTION_IDLE</constant> (zur Zeit untätig),
|
|
<constant>PGSQL_TRANSACTION_ACTIVE</constant> (ein Kommando wird abgearbeitet),
|
|
<constant>PGSQL_TRANSACTION_INTRANS</constant> (untätig, aber innerhalb eines gültigen Transaktionsblocks) oder
|
|
<constant>PGSQL_TRANSACTION_INERROR</constant> (untätig, innerhalb einer fehlgeschlagenen Transaktion).
|
|
<constant>PGSQL_TRANSACTION_UNKNOWN</constant> wird zurückgegeben, falls eine Transaktion ungültig ist.
|
|
<constant>PGSQL_TRANSACTION_ACTIVE</constant> wird nur dann
|
|
zurückgegeben, wenn eine Abfrage zum Server gesendet wurde und noch
|
|
nicht fertig abgearbeitet ist.
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1 role="examples">
|
|
&reftitle.examples;
|
|
<para>
|
|
<example>
|
|
<title><function>pg_transaction_status</function>-Beispiel</title>
|
|
<programlisting role="php">
|
|
<![CDATA[
|
|
<?php
|
|
$dbconn = pg_connect("dbname=publisher") or die("Konnte nicht verbinden");
|
|
$stat = pg_transaction_status($dbconn);
|
|
if ($stat === PGSQL_TRANSACTION_UNKNOWN) {
|
|
echo 'Verbindung ist ungültig';
|
|
} else if ($stat === PGSQL_TRANSACTION_IDLE) {
|
|
echo 'Verbindung ist zur Zeit untätig';
|
|
} else {
|
|
echo 'Verbindung meldet eine Transaktion';
|
|
}
|
|
?>
|
|
]]>
|
|
</programlisting>
|
|
</example>
|
|
</para>
|
|
</refsect1>
|
|
|
|
</refentry>
|
|
|
|
|
|
<!-- Keep this comment at the end of the file
|
|
Local variables:
|
|
mode: sgml
|
|
sgml-omittag:t
|
|
sgml-shorttag:t
|
|
sgml-minimize-attributes:nil
|
|
sgml-always-quote-attributes:t
|
|
sgml-indent-step:1
|
|
sgml-indent-data:t
|
|
indent-tabs-mode:nil
|
|
sgml-parent-document:nil
|
|
sgml-default-dtd-file:"../../../../manual.ced"
|
|
sgml-exposed-tags:nil
|
|
sgml-local-catalogs:nil
|
|
sgml-local-ecat-files:nil
|
|
End:
|
|
vim600: syn=xml fen fdm=syntax fdl=2 si
|
|
vim: et tw=78 syn=sgml
|
|
vi: ts=1 sw=1
|
|
-->
|