mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-16 00:48:54 +00:00
Added pg_ping() desc.
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@97690 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
parent
b0085f3057
commit
61cddb2e58
1 changed files with 65 additions and 0 deletions
65
reference/pgsql/functions/pg-ping.xml
Normal file
65
reference/pgsql/functions/pg-ping.xml
Normal file
|
@ -0,0 +1,65 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.1 $ -->
|
||||
<!-- splitted from ./en/functions/pgsql.xml, last change in rev 1.2 -->
|
||||
<refentry id="function.pg-ping">
|
||||
<refnamediv>
|
||||
<refname>pg_ping</refname>
|
||||
<refpurpose>Ping database connection</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1>
|
||||
<title>Description</title>
|
||||
<methodsynopsis>
|
||||
<type>array</type><methodname>pg_ping</methodname>
|
||||
<methodparam><type>resource</type><parameter>connection</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
<function>pg_ping</function> ping database connection, try to
|
||||
reconnect if it is broken. It returns &true is connection is
|
||||
alive, otherwise &false;.
|
||||
</para>
|
||||
<para>
|
||||
See also <function>pg_connection_status</function> and
|
||||
<function>pg_connection_reset</function>.
|
||||
</para>
|
||||
<para>
|
||||
<example>
|
||||
<title>PostgreSQL fetch array</title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
$conn = pg_pconnect ("dbname=publisher");
|
||||
if (!$conn) {
|
||||
echo "An error occured.\n";
|
||||
exit;
|
||||
}
|
||||
|
||||
if (!pg_ping($conn))
|
||||
die("Connection is broken\n");
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
</example>
|
||||
</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
sgml-omittag:t
|
||||
sgml-shorttag:t
|
||||
sgml-minimize-attributes:nil
|
||||
sgml-always-quote-attributes:t
|
||||
sgml-indent-step:1
|
||||
sgml-indent-data:t
|
||||
indent-tabs-mode:nil
|
||||
sgml-parent-document:nil
|
||||
sgml-default-dtd-file:"../../../../manual.ced"
|
||||
sgml-exposed-tags:nil
|
||||
sgml-local-catalogs:nil
|
||||
sgml-local-ecat-files:nil
|
||||
End:
|
||||
vim600: syn=xml fen fdm=syntax fdl=2 si
|
||||
vim: et tw=78 syn=sgml
|
||||
vi: ts=1 sw=1
|
||||
-->
|
Loading…
Reference in a new issue