П О Р Т А Л                            
С Е Т Е В Ы Х                          
П Р О Е К Т О В                        
  
Поиск по сайту:
                                                 
Главная

О проекте

Web-мастеру
     HTML & JavaScript
     SSI
     Perl
     PHP
     XML & XSLT
     Unix Shell

MySQL

Безопасность

Хостинг

Другое








Самое читаемое:

Учебник PHP - "Для Чайника".
Просмотров 6041 раз(а).

Иллюстрированный самоучитель по созданию сайтов.
Просмотров 8171 раз(а).

Учебник HTML.
Просмотров 4842 раз(а).

Руководство по PHP5.
Просмотров 1890 раз(а).

Хостинг через призму DNS.
Просмотров 6865 раз(а).

Подборка текстов стандартных документов.
Просмотров 57492 раз(а).

Учебник PHP - Самоучитель
Просмотров 5110 раз(а).

Документация на MySQL (учебник & справочное руководство)
Просмотров 11248 раз(а).

Внешние атаки...
Просмотров 7093 раз(а).

Учебник PHP.
Просмотров 4188 раз(а).

SSI в примерах.
Просмотров 1158 раз(а).



 
 
| Добавить в избранное | Сделать стартовой | Помощь





Руководство по PHP
Пред. След.

pg_transaction_status

(PHP 5 >= 5.1.0RC1)

pg_transaction_status -- Returns the current in-transaction status of the server.

Описание

int pg_transaction_status ( resource connection )

Returns the current in-transaction status of the server.

Предостережение

pg_transaction_status() will give incorrect results when using a PostgreSQL 7.3 server that has the parameter autocommit set to off. The server-side autocommit feature has been deprecated and does not exist in later server versions.

Список параметров

connection

PostgreSQL database connection resource.

Возвращаемые значения

The status can be PGSQL_TRANSACTION_IDLE (currently idle), PGSQL_TRANSACTION_ACTIVE (a command is in progress), PGSQL_TRANSACTION_INTRANS (idle, in a valid transaction block), or PGSQL_TRANSACTION_INERROR (idle, in a failed transaction block). PGSQL_TRANSACTION_UNKNOWN is reported if the connection is bad. PGSQL_TRANSACTION_ACTIVE is reported only when a query has been sent to the server and not yet completed.

Примеры

Пример 1. pg_transaction_status() example

<?php
  $dbconn
= pg_connect("dbname=publisher") or die("Could not connect");
  
$stat = pg_transaction_status($dbconn);
  if (
$stat === PGSQL_TRANSACTION_UNKNOWN) {
      echo
'Connection is bad';
  } else if (
$stat === PGSQL_TRANSACTION_IDLE) {
      echo
'Connection is currently idle';
  } else {
      echo
'Connection is in a transaction state';
  }    
?>



Если Вы не нашли что искали, то рекомендую воспользоваться поиском по сайту:
 





Copyright © 2005-2016 Project.Net.Ru