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

pg_connection_status

(PHP 4 >= 4.2.0, PHP 5)

pg_connection_status --  获得连接状态

说明

int pg_connection_status ( resource connection )

pg_connection_status() 返回一个连接的状态。可能的状态为 PGSQL_CONNECTION_OKPGSQL_CONNECTION_BAD

例子 1. pg_connection_status() 例子

<?php
   $dbconn
= pg_connect("dbname=publisher") or die("Could not connect");
  
$stat = pg_connection_status($dbconn);
   echo
'connection_status: '.$stat;
?>

例子 2. pg_connection_status() 例子

<?php
   $dbconn
= pg_connect("dbname=publisher") or die("Could not connect");
  
$stat = pg_connection_status($dbconn);
   echo
'connection_status: '.$stat;
?>

参见 pg_connection_busy()




<pg_connection_resetpg_convert>
 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