mirror of
https://github.com/macintoshplus/doc-fr.git
synced 2026-04-27 02:28:31 +02:00
e470843406
#spotted by scripts/check-trans.php git-svn-id: https://svn.php.net/repository/phpdoc/fr/trunk@258438 c90b9560-bf6c-de11-be94-00142212c4b1
167 lines
4.4 KiB
XML
167 lines
4.4 KiB
XML
<?xml version="1.0" encoding="iso-8859-1"?>
|
|
<!-- $Revision: 1.16 $ -->
|
|
<!-- EN-Revision: 1.8 Maintainer: jsgoupil Status: ready -->
|
|
<!-- Reviewed: no -->
|
|
|
|
<refentry xml:id="function.pg-last-notice" xmlns="http://docbook.org/ns/docbook">
|
|
<refnamediv>
|
|
<refname>pg_last_notice</refname>
|
|
<refpurpose>
|
|
Retourne la dernière note du serveur PostgreSQL
|
|
</refpurpose>
|
|
</refnamediv>
|
|
|
|
<refsect1 role="description">
|
|
&reftitle.description;
|
|
<methodsynopsis>
|
|
<type>string</type><methodname>pg_last_notice</methodname>
|
|
<methodparam><type>resource</type><parameter>connection</parameter></methodparam>
|
|
</methodsynopsis>
|
|
<para>
|
|
<function>pg_last_notice</function> retourne la dernière note du
|
|
serveur PostgreSQL sur la connexion <parameter>connection</parameter>
|
|
spécifiée. Le serveur PostgreSQL envoie des notes dans plusieurs cas,
|
|
par exemple lors de création d'une colonne <literal>SERIAL</literal> dans
|
|
une table.
|
|
</para>
|
|
<para>
|
|
Avec <function>pg_last_notice</function>, vous pouvez éviter des requêtes
|
|
inutiles en vérifiant si des notes sont liées ou pas à votre transaction.
|
|
</para>
|
|
<para>
|
|
Le suivi des notes peut être rendu optionnel en mettant à 1 la
|
|
directive de configuration <literal>pgsql.ignore_notice</literal> du
|
|
fichier &php.ini;.
|
|
</para>
|
|
<para>
|
|
L'enregistrement des notes peut être rendu optionnel en mettant la directive
|
|
de configuration <literal>pgsql.log_notice</literal> du &php.ini; à 0.
|
|
À moins que <literal>pgsql.ignore_notice</literal> ne soit à 0, les notes
|
|
ne seront pas enregistrées.
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1 role="parameters">
|
|
&reftitle.parameters;
|
|
<para>
|
|
<variablelist>
|
|
<varlistentry>
|
|
<term><parameter>connection</parameter></term>
|
|
<listitem>
|
|
<para>
|
|
Ressource de connexion de base de données PostgreSQL.
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
</variablelist>
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1 role="returnvalues">
|
|
&reftitle.returnvalues;
|
|
<para>
|
|
Une &string; contenant la dernière note sur la connexion
|
|
<parameter>connection</parameter> ou &false; en cas d'erreur.
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1 role="changelog">
|
|
&reftitle.changelog;
|
|
<para>
|
|
<informaltable>
|
|
<tgroup cols="2">
|
|
<thead>
|
|
<row>
|
|
<entry>&Version;</entry>
|
|
<entry>&Description;</entry>
|
|
</row>
|
|
</thead>
|
|
<tbody>
|
|
<row>
|
|
<entry>4.3.0</entry>
|
|
<entry>
|
|
Cette fonction est maintenant pleinement implémentée. Les anciennes
|
|
versions ignoraient les paramètres de connexion à la base de données.
|
|
</entry>
|
|
</row>
|
|
<row>
|
|
<entry>4.3.0</entry>
|
|
<entry>
|
|
Les directives <literal>pgsql.ignore_notice</literal> et
|
|
<literal>pgsql.log_notice</literal> du &php.ini; ont été ajoutées.
|
|
</entry>
|
|
</row>
|
|
<row>
|
|
<entry>4.0.6</entry>
|
|
<entry>
|
|
PHP 4.0.6 a un problème avec la gestion des messages d'avertissement. Utiliser
|
|
le module PostgreSQL avec PHP 4.0.6 n'est pas recommandé, même si vous
|
|
n'utilisez pas la fonction <function>pg_last_notice</function>.
|
|
</entry>
|
|
</row>
|
|
</tbody>
|
|
</tgroup>
|
|
</informaltable>
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1 role="examples">
|
|
&reftitle.examples;
|
|
<para>
|
|
<example>
|
|
<title>Exemple avec <function>pg_last_error</function></title>
|
|
<programlisting role="php">
|
|
<![CDATA[
|
|
<?php
|
|
$pgsql_conn = pg_connect("dbname=mark host=localhost");
|
|
|
|
$res = pg_query("CREATE TABLE test (id SERIAL)");
|
|
|
|
$notice = pg_last_notice($pgsql_conn);
|
|
|
|
echo $notice;
|
|
?>
|
|
]]>
|
|
</programlisting>
|
|
&example.outputs;
|
|
<screen>
|
|
<![CDATA[
|
|
CREATE TABLE will create implicit sequence "test_id_seq" for "serial" column "test.id"
|
|
]]>
|
|
</screen>
|
|
</example>
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1 role="seealso">
|
|
&reftitle.seealso;
|
|
<para>
|
|
<simplelist>
|
|
<member><function>pg_query</function></member>
|
|
<member><function>pg_last_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:"../../../../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
|
|
-->
|