PHP  
downloads | documentation | faq | getting help | mailing lists | reporting bugs | php.net sites | links | my php.net 
search for in the  
<pg_connectpg_connection_reset>
Last updated: Mon, 16 Jul 2012

pg_connection_busy

(PHP 4 >= 4.2.0, PHP 5)

pg_connection_busy --  获知连接是否为忙

说明

bool pg_connection_busy ( resource connection )

pg_connection_busy() 在此连接状态为忙的时候返回 TRUE。如果连接状态为忙,说明前一个查询仍然在执行。如果调用 pg_get_result() 函数的话,则会被锁死。

例子 1. pg_connection_busy() 例子

<?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';
   }
?>

参见 pg_connection_status()pg_get_result()




<pg_connectpg_connection_reset>
 Last updated: Mon, 16 Jul 2012
 
Copyright © 2001-2005 The PHP Group
All rights reserved.
This unofficial mirror is operated at: http://manual.phpv.net/
Last updated: Thu Jul 7 19:13:47 2005 CST