Files
doc-fr/reference/pgsql/functions/pg-connection-status.xml
T
Damien Seguy 14a38b9fd1 massive typos chase
git-svn-id: https://svn.php.net/repository/phpdoc/fr/trunk@162926 c90b9560-bf6c-de11-be94-00142212c4b1
2004-07-09 20:26:31 +00:00

67 lines
1.9 KiB
XML

<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.7 $ -->
<!-- EN-Revision: 1.6 Maintainer: yannick Status: ready -->
<refentry id="function.pg-connection-status">
<refnamediv>
<refname>pg_connection_status</refname>
<refpurpose>Lit le statut de la connexion PostgreSQL</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>int</type><methodname>pg_connection_status</methodname>
<methodparam><type>resource</type><parameter>connection</parameter></methodparam>
</methodsynopsis>
<para>
<function>pg_connection_status</function> retourne le statut de la
connexion <parameter>connection</parameter>. Les valeurs possibles
sont <constant>PGSQL_CONNECTION_OK</constant> (connexion correcte) et
<constant>PGSQL_CONNECTION_BAD</constant> (connexion abandonnée).
La valeur de retour entière 0 indique une connexion valide.
</para>
<para>
<example>
<title>Exemple avec <function>pg_connection_status</function></title>
<programlisting role="php">
<![CDATA[
<?php
$dbconn = pg_connect("dbname=publisher") or die("Impossible de se connecter");
$stat = pg_connection_status($dbconn);
if ($stat === 0) {
echo 'Connexion ok';
} else {
echo 'Connexion ko';
}
?>
]]>
</programlisting>
</example>
</para>
<para>
Voir aussi
<function>pg_connection_busy</function>.
</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
-->