pg_connection_busy
pg_connection_busy
(PHP 4 >= 4.2.0, PHP 5, PHP 7)
pg_connection_busy - 获取连接是否忙
描述
bool pg_connection_busy ( resource $connection )
pg_connection_busy()
决定连接是否繁忙。如果它很忙,以前的查询仍在执行。如果在连接上使用pg_get_result(),它将被阻塞。
参数
connection
PostgreSQL数据库连接资源。
返回值
如果连接忙返回TRUE
,否则则返回FALSE
。
例子
Example #1 pg
_
connection
_
busy() example
<?php
$dbconn = pg_connect("dbname=publisher") or die("Could not connect"
$bs = pg_connection_busy($dbconn
if ($bs) {
echo 'connection is busy';
} else {
echo 'connection is not busy';
}
?>