downloads | documentation | faq | getting help | mailing lists | licenses | wiki | reporting bugs | php.net sites | conferences | my php.net

search for in the

pg_convert> <pg_connection_reset
[edit] Last updated: Fri, 30 Nov 2012

view this page in

pg_connection_status

(PHP 4 >= 4.2.0, PHP 5)

pg_connection_status Zwraca stan połączenia

Opis

int pg_connection_status ( resource $połączenie )

pg_connection_status() zwraca status podanego połączenia.

Parametry

połączenie

Zasób, połączenie do bazy PostgreSQL.

Zwracane wartości

PGSQL_CONNECTION_OK lub PGSQL_CONNECTION_BAD.

Przykłady

Przykład #1 pg_connection_status() przykład

<?php
  $dbconn 
pg_connect("dbname=publisher") or die("Nie można się połączyć");
  
$stat pg_connection_status($dbconn);
  if (
$stat === PGSQL_CONNECTION_OK) {
      echo 
'Status połączenia ok';
  } else {
      echo 
'Status połączenia bad';
  }    
?>

Zobacz też:



pg_convert> <pg_connection_reset
[edit] Last updated: Fri, 30 Nov 2012
 
add a note add a note User Contributed Notes pg_connection_status - [3 notes]