pg_connection_status

pg_connection_status是一個計算機語言函式,用於獲得連線狀態。

基本介紹

  • 中文名:pg_connection_status
  • onnection:獲得連線狀態
  • 說明:int pg_connection_status
  • 例子:pg_connection_status() 
pg_connection_status,說明,pg_connection_status() 例子1,pg_connection_status() 例子2,

pg_connection_status

(PHP 4 >= 4.2.0)
pg_connection_status -- 獲得連線狀態

說明

int pg_connection_status ( resource connection)
pg_connection_status() 返回一個連線的狀態。可能的狀態為 PGSQL_CONNECTION_OK 和 PGSQL_CONNECTION_BAD。

pg_connection_status() 例子1

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

pg_connection_status() 例子2

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

相關詞條

熱門詞條

聯絡我們