mirror of
https://github.com/macintoshplus/doc-fr.git
synced 2026-03-24 08:52:09 +01:00
110 lines
3.5 KiB
XML
110 lines
3.5 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<!-- EN-Revision: ebd624e434f6a49aa951a3a2e3efbe736a95c02c Maintainer: devnexen Status: ready -->
|
|
<!-- Reviewed: no -->
|
|
<refentry xml:id="function.pg-set-error-context-visibility" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
|
<refnamediv>
|
|
<refname>pg_set_error_context_visibility</refname>
|
|
<refpurpose>
|
|
Détermine la visibilité des messages d'erreur du contexte retournés par <function>pg_last_error</function>
|
|
et <function>pg_result_error</function>
|
|
</refpurpose>
|
|
</refnamediv>
|
|
|
|
<refsect1 role="description">
|
|
&reftitle.description;
|
|
<methodsynopsis>
|
|
<type>int</type><methodname>pg_set_error_context_visibility</methodname>
|
|
<methodparam><type>PgSql\Connection</type><parameter>connection</parameter></methodparam>
|
|
<methodparam><type>int</type><parameter>visibility</parameter></methodparam>
|
|
</methodsynopsis>
|
|
<para>
|
|
Détermine la visibilité des messages d'erreur du contexte retournés par <function>pg_last_error</function>
|
|
et <function>pg_result_error</function>
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1 role="parameters">
|
|
&reftitle.parameters;
|
|
<para>
|
|
<variablelist>
|
|
<varlistentry>
|
|
<term><parameter>connection</parameter></term>
|
|
<listitem>
|
|
&pgsql.parameter.connection;
|
|
</listitem>
|
|
</varlistentry>
|
|
<varlistentry>
|
|
<term><parameter>visibility</parameter></term>
|
|
<listitem>
|
|
<para>
|
|
La visibilité requise : <constant>PGSQL_SHOW_CONTEXT_NEVER</constant>,
|
|
<constant>PGSQL_SHOW_CONTEXT_ERRORS</constant>
|
|
ou <constant>PGSQL_SHOW_CONTEXT_ALWAYS</constant>.
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
</variablelist>
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1 role="returnvalues">
|
|
&reftitle.returnvalues;
|
|
<para>
|
|
Le niveau de visibilité précédent : <constant>PGSQL_SHOW_CONTEXT_NEVER</constant>,
|
|
<constant>PGSQL_SHOW_CONTEXT_ERRORS</constant>
|
|
ou <constant>PGSQL_SHOW_CONTEXT_ALWAYS</constant>.
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1 role="examples">
|
|
&reftitle.examples;
|
|
<example xml:id="function.pg-set-error-context-visibility.example.basic">
|
|
<title><function>pg_set_error_context_visibility</function> exemple</title>
|
|
<programlisting role="php">
|
|
<![CDATA[
|
|
<?php
|
|
$dbconn = pg_connect("dbname=publisher") or die("Impossible de se connecter");
|
|
if (!pg_connection_busy($dbconn)) {
|
|
pg_send_query($dbconn, "select * from doesnotexist;");
|
|
}
|
|
pg_set_error_context_visibility($dbconn, PGSQL_SHOW_CONTEXT_ALWAYS);
|
|
$res1 = pg_get_result($dbconn);
|
|
echo pg_result_error($res1);
|
|
?>
|
|
]]>
|
|
</programlisting>
|
|
</example>
|
|
</refsect1>
|
|
|
|
<refsect1 role="seealso">
|
|
&reftitle.seealso;
|
|
<para>
|
|
<simplelist>
|
|
<member><function>pg_last_error</function></member>
|
|
<member><function>pg_result_error</function></member>
|
|
</simplelist>
|
|
</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:"~/.phpdoc/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
|
|
-->
|