php的帮助文档,涉及到PHP的案例和基本语法,以及实际应用内容

源代码在线查看: function.pg-transaction-status.html

软件大小: 3633 K
上传用户: fengkuangyidao
关键词: php PHP 文档 实际应用
下载地址: 免注册下载 普通下载 VIP

相关代码

												 				  Returns the current in-transaction status of the server.				  				 				 				 pg_trace				 pg_tty				 PostgreSQL Functions				 PHP Manual								 				  pg_transaction_status				  (PHP 5 >= 5.1.0)pg_transaction_status — Returns the current in-transaction status of the server.								 								 				  Description				  				   int pg_transaction_status				    ( resource $connection				   )								  				    Returns the current in-transaction status of the server.				  				  Caution				    				      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.				    				  				 												 				  Parameters				  				   								    								     connection												     								      				       PostgreSQL database connection resource.				      				     								    								   								  				 												 				  Return Values				  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.				  				 								 				 				  Examples				  				   				    Example #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';  }    ?>												    								   				  				 																 pg_trace				 pg_tty				 PostgreSQL Functions				 PHP Manual											

相关资源