cvs: peardoc /fr/package/database/db/db connect.xml iserror.xml /fr/package/database/db/db-result fetchinto.xml fetchrow.xml free.xml nextresult.xml
numcols.xml numrows.xml
| From: | Yannick TORRES | Date: | Wed, 07 Jul 2004 21:22:05 +0000 |
| Subject: | cvs: peardoc /fr/package/database/db/db connect.xml iserror.xml /fr/package/database/db/db-result fetchinto.xml fetchrow.xml free.xml nextresult.xml numcols.xml numrows.xml |
||
| Groups: | php.pear.doc | ||
| Request: | Send a blank email to pear-doc+get-4574@lists.php.net to get a copy of this message | ||
yannick Wed Jul 7 17:22:05 2004 EDT
Modified files:
/peardoc/fr/package/database/db/db connect.xml iserror.xml
/peardoc/fr/package/database/db/db-result fetchinto.xml
fetchrow.xml free.xml
nextresult.xml
numcols.xml numrows.xml
Log:
sync with EN revision
http://cvs.php.net/diff.php/peardoc/fr/package/database/db/db/connect.xml?r1=1.4&r2=1.5&ty=u Index: peardoc/fr/package/database/db/db/connect.xml diff -u peardoc/fr/package/database/db/db/connect.xml:1.4 peardoc/fr/package/database/db/db/connect.xml:1.5 --- peardoc/fr/package/database/db/db/connect.xml:1.4 Mon Feb 23 05:25:12 2004 +++ peardoc/fr/package/database/db/db/connect.xml Wed Jul 7 17:22:04 2004 @@ -1,124 +1,132 @@ -<!-- $Revision: 1.4 $ --> -<!-- EN-Revision: 1.11 Maintainer: didou Status: ready --> +<?xml version="1.0" encoding="iso-8859-1" ?> +<!-- $Revision: 1.5 $ --> +<!-- EN-Revision: 1.21 Maintainer: didou Status: ready --> <refentry id="package.database.db.db.connect"> - <refnamediv> - <refname>DB::connect()</refname> - <refpurpose>Se connecte à une base de données</refpurpose> - </refnamediv> - <refsynopsisdiv> - <funcsynopsis> - <funcprototype> - <funcdef>object <function>DB::connect</function></funcdef> - <paramdef>mixed <parameter>$dsn</parameter></paramdef> - <paramdef>array <parameter><optional>$options = array()</optional></parameter> - </paramdef> - </funcprototype> - </funcsynopsis> - </refsynopsisdiv> - <refsect1 id="package.database.db.db.connect.desc"> - &title.desc; - <para> - Crée un nouvel objet de connexion DB et se connecte à la base de données - spécifiée. - </para> - </refsect1> - <refsect1 id="package.database.db.db.connect.parameter"> - &title.param; - <para> - <variablelist> - <varlistentry> - <term> - &type.string; ou &type.array; - <parameter>$dsn</parameter> - </term> - <listitem> - <para> - Nom de la source de données (Data Source Name). La forme - chaînale est décrite dans la section - <link linkend="package.database.db.intro-dsn">DSN</link> tandis que - la forme de tableaux est couverte dans la section - <link linkend="package.database.db.intro-connect">Introduction - - Connexion</link>. - </para> - </listitem> - </varlistentry> - <varlistentry> - <term> - &type.array; - <parameter>$options</parameter> - </term> - <listitem> - <para> - Un argument optionnel qui peut contenir des directives de configuration - pour ce package. - Lisez <link linkend="package.database.db.db-common.setoption"> - <function>setOption</function></link> pour plus d'informations sur les - possibilités offertes. - </para> - </listitem> - </varlistentry> - </variablelist> - </para> - </refsect1> - <refsect1 id="package.database.db.db.connect.return"> - &title.returns; - <para> - <parameter>object</parameter> - l'object créé chargé - de la connexion à DB, ou un objet &class.db-error; en cas d'erreurs. - </para> - </refsect1> - <refsect1 id="package.database.db.db.connect.throws"> - &title.throws; - <para> - <table> - <title>&title.throws.errortable;</title> - <tgroup cols="4"> - <thead> - <row> - <entry>Code erreur</entry> - <entry>Message erreur</entry> - <entry>Raison</entry> - <entry>Solution</entry> - </row> - </thead> - <tbody> - <row> - <entry><constant>DB_ERROR_NOT_FOUND</constant></entry> - <entry> - &null; - </entry> - <entry> - La classe spécifique à cette base de - données n'a pas été trouvée. - </entry> - <entry> - Vérifiez le paramètre <parameter>$dsn</parameter>, ainsi que - l'installation du <filename>package DB</filename> et que votre - base de données est supporée par &class.db;. - </entry> - </row> - </tbody> - </tgroup> - </table> - </para> - </refsect1> - <refsect1 id="package.database.db.db.connect.note"> - &title.note; - ¬e.shouldstatic; - </refsect1> - <refsect1 id="package.database.db.db.connect.see"> - &title.see; - <para> - <link linkend="package.database.db.db-common.disconnect"> - <function>DB::disconnect</function> - </link>, - <link linkend="package.database.db.intro-connect"> - <function>Tutoriel - Se connecter</function> - </link> - </para> - </refsect1> - </refentry> + <refnamediv> + <refname>DB::connect()</refname> + <refpurpose>Se connecte à une base de données</refpurpose> + </refnamediv> + <refsynopsisdiv> + <funcsynopsis> + <funcprototype> + <funcdef>object <function>connect</function></funcdef> + <paramdef> + mixed <parameter>$dsn</parameter> + </paramdef> + <paramdef> + array <parameter><optional>$options = array()</optional></parameter> + </paramdef> + </funcprototype> + </funcsynopsis> + </refsynopsisdiv> + + <refsect1 id="package.database.db.db.connect.desc"> + &title.desc; + <para> + Crée un nouvel objet de connexion DB et + se connecte à la base de données spécifiée. + </para> + </refsect1> + + <refsect1 id="package.database.db.db.connect.parameter"> + &title.param; + <para> + <variablelist> + <varlistentry> + <term> + &type.string; ou &type.array; + <parameter>$dsn</parameter> + </term> + <listitem> + <para> + Nom de la source de données (Data Source Name). La forme + chaînale est décrite dans la section + <link linkend="package.database.db.intro-dsn">DSN</link> tandis que + la forme de tableaux est couverte dans la section + <link linkend="package.database.db.intro-connect">Introduction + - Connexion</link>. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term> + &type.array; + <parameter>$options</parameter> + </term> + <listitem> + <para> + Un argument optionnel qui peut contenir des directives de configuration + pour ce package. + Lisez <link linkend="package.database.db.db-common.setoption"> + <function>setOption</function></link> pour plus d'informations sur les + possibilités offertes. + </para> + </listitem> + </varlistentry> + </variablelist> + </para> + </refsect1> + + <refsect1 id="package.database.db.db.connect.return"> + &title.returns; + <para> + &type.object; - un nouvel objet DB + ou un objet &class.db-error; en cas d'erreur. + </para> + </refsect1> + + <refsect1 id="package.database.db.db.connect.throws"> + &title.throws; + <para> + <table> + <title>&title.throws.errortable;</title> + <tgroup cols="4"> + <thead> + <row> + <entry>Code erreur</entry> + <entry>Message erreur</entry> + <entry>Raison</entry> + <entry>Solution</entry> + </row> + </thead> + <tbody> + <row> + <entry><constant>DB_ERROR_NOT_FOUND</constant></entry> + <entry> + not found + </entry> + <entry> + La classe spécifique à cette base de + données n'a pas été trouvée. + </entry> + <entry> + Vérifiez le paramètre <parameter>$dsn</parameter>, ainsi que + l'installation du <filename>package DB</filename> et que votre + base de données est supporée par &class.db;. + </entry> + </row> + </tbody> + </tgroup> + </table> + </para> + </refsect1> + + <refsect1 id="package.database.db.db.connect.note"> + &title.note; + ¬e.shouldstatic; + </refsect1> + <refsect1 id="package.database.db.db.connect.see"> + &title.see; + <para> + <link linkend="package.database.db.db-common.disconnect"> + <function>disconnect</function></link>, + <link linkend="package.database.db.intro-connect"> + <quote>Intro - Connect</quote></link> + </para> + </refsect1> +</refentry> + <!-- Keep this comment at the end of the file Local variables: mode: sgml http://cvs.php.net/diff.php/peardoc/fr/package/database/db/db/iserror.xml?r1=1.4&r2=1.5&ty=u Index: peardoc/fr/package/database/db/db/iserror.xml diff -u peardoc/fr/package/database/db/db/iserror.xml:1.4 peardoc/fr/package/database/db/db/iserror.xml:1.5 --- peardoc/fr/package/database/db/db/iserror.xml:1.4 Mon Feb 23 05:25:50 2004 +++ peardoc/fr/package/database/db/db/iserror.xml Wed Jul 7 17:22:04 2004 @@ -1,56 +1,83 @@ -<!-- $Revision: 1.4 $ --> -<!-- EN-Revision: 1.7 Maintainer: didou Status: ready --> +<?xml version="1.0" encoding="iso-8859-1" ?> +<!-- $Revision: 1.5 $ --> +<!-- EN-Revision: 1.15 Maintainer: didou Status: ready --> <refentry id="package.database.db.db.iserror"> - <refnamediv> - <refname>DB::isError()</refname> - <refpurpose>Détermine si une variable est un objet DB_Error</refpurpose> - </refnamediv> - <refsynopsisdiv> - <funcsynopsis> - <funcprototype> - <funcdef>boolean <function>DB::isError</function></funcdef> - <paramdef>mixed <parameter>$value</parameter></paramdef> - </funcprototype> - </funcsynopsis> - </refsynopsisdiv> - <refsect1 id="package.database.db.db.iserror.desc"> - &title.desc; - <para> - Vérifie si le code de retour d'une méthode de DB est un objet - &class.db-error; ou non. - </para> - </refsect1> - <refsect1 id="package.database.db.db.iserror.parameter"> - &title.param; - <para> - <variablelist> - <varlistentry> - <term> - &type.mixed; - <parameter>$value</parameter> - </term> - <listitem> - <para> - Variable à vérifier - </para> - </listitem> - </varlistentry> - </variablelist> - </para> - </refsect1> - <refsect1 id="package.database.db.db.iserror.return"> - &title.returns; - <para> - <parameter>boolean</parameter> - &true;, si <parameter> - $value</parameter> est un objet &class.db-error; - </para> - </refsect1> - <refsect1 id="package.database.db.db.iserror.note"> - &title.note; - ¬e.shouldstatic; - </refsect1> - </refentry> + <refnamediv> + <refname>DB::isError()</refname> + <refpurpose>Détermine si une variable est un objet DB_Error</refpurpose> + </refnamediv> + + <refsynopsisdiv> + <funcsynopsis> + <funcprototype> + <funcdef>boolean <function>isError</function></funcdef> + <paramdef> + mixed <parameter>$value</parameter> + </paramdef> + </funcprototype> + </funcsynopsis> + </refsynopsisdiv> + + <refsect1 id="package.database.db.db.iserror.desc"> + &title.desc; + <para> + Vérifie si le code de retour d'une méthode de DB est un objet + &class.db-error; ou non. + </para> + </refsect1> + + <refsect1 id="package.database.db.db.iserror.parameter"> + &title.param; + <para> + <variablelist> + <varlistentry> + <term> + &type.mixed; + <parameter>$value</parameter> + </term> + <listitem> + <para> + Variable à vérifier + </para> + </listitem> + </varlistentry> + </variablelist> + </para> + </refsect1> + <refsect1 id="package.database.db.db.iserror.return"> + &title.returns; + <para> + &type.bool; - &true;, si <parameter>$value</parameter> + est un objet &class.db-error; + </para> + </refsect1> + + <refsect1 id="package.database.db.db.iserror.note"> + &title.note; + ¬e.shouldstatic; + </refsect1> + + <refsect1 id="package.database.db.db.iserror.example"> + &title.example; + <example> + <title>Utilisation de <function>isError</function></title> + <programlisting role="php"> +<![CDATA[ +<?php +require_once 'DB.php'; + +$db =& DB::connect('pgsql://usr:pw@localhost/dbnam'); +if (DB::isError($db)) { + die($db->getMessage()); +} +?> +]]> + </programlisting> + </example> + </refsect1> +</refentry> + <!-- Keep this comment at the end of the file Local variables: mode: sgml http://cvs.php.net/diff.php/peardoc/fr/package/database/db/db-result/fetchinto.xml?r1=1.1&r2=1.2&ty=u Index: peardoc/fr/package/database/db/db-result/fetchinto.xml diff -u peardoc/fr/package/database/db/db-result/fetchinto.xml:1.1 peardoc/fr/package/database/db/db-result/fetchinto.xml:1.2 --- peardoc/fr/package/database/db/db-result/fetchinto.xml:1.1 Sat Feb 21 21:33:41 2004 +++ peardoc/fr/package/database/db/db-result/fetchinto.xml Wed Jul 7 17:22:04 2004 @@ -1,94 +1,151 @@ -<!-- $Revision: 1.1 $ --> -<!-- EN-Revision: 1.11 Maintainer: didou Status: ready --> +<?xml version="1.0" encoding="iso-8859-1" ?> +<!-- $Revision: 1.2 $ --> +<!-- EN-Revision: 1.27 Maintainer: didou Status: ready --> + <refentry id="package.database.db.db-result.fetchinto"> - <refnamediv> - <refname>DB_result::fetchInto()</refname> - <refpurpose>Récupère une ligne dans une variable</refpurpose> - </refnamediv> - <refsynopsisdiv> - <funcsynopsis> - <funcprototype> - <funcdef>mixed <function>fetchInto</function></funcdef> - <paramdef>mixed + <refnamediv> + <refname>DB_result::fetchInto()</refname> + <refpurpose>Récupère une ligne dans une variable</refpurpose> + </refnamediv> + + <refsynopsisdiv> + <funcsynopsis> + <funcprototype> + <funcdef>integer <function>fetchInto</function></funcdef> + <paramdef> + array <parameter>&$arr</parameter> + </paramdef> + <paramdef> + integer <parameter><optional>$fetchMode = + <constant>DB_FETCHMODE_DEFAULT</constant></optional></parameter> + </paramdef> + <paramdef> + integer <parameter><optional>$rowNum = &null;</optional></parameter> + </paramdef> + </funcprototype> + </funcsynopsis> + </refsynopsisdiv> + + <refsect1 id="package.database.db.db-result.fetchinto.desc"> + &title.desc; + <para> + Copie une ligne d'un résultat dans une variable fournie et + déplace le pointeur de résultat à la ligne suivante. + Les données peuvent être formatées en tableau ou en objet. + </para> + </refsect1> + + <refsect1 id="package.database.db.db-result.fetchinto.parameter"> + &title.param; + <para> + <variablelist> + <varlistentry> + <term> + &type.mixed; <parameter>$arr</parameter> - </paramdef> - <paramdef>integer = - <parameter><optional>$fetchMode <constant>DB_FETCHMODE_DEFAULT</constant> - </optional></parameter> - </paramdef> - <paramdef>integer - <parameter><optional>$rowNum = &null;</optional></parameter> - </paramdef> - </funcprototype> - </funcsynopsis> - </refsynopsisdiv> - <refsect1 id="package.database.db.db-result.fetchinto.desc"> - &title.desc; - <para> - Copie une ligne d'un résultat dans une variable. Voyez la <link - linkend="package.database.db.intro-fetch">section "Fetch"</link> - pour plus d'informations. - </para> - </refsect1> - <refsect1 id="package.database.db.db-result.fetchinto.parameter"> - &title.param; - <para> - <variablelist> - <varlistentry> - <term> - &type.mixed; - <parameter>$arr</parameter> - </term> - <listitem> - <para> - reférence à une variable pour stocker la ligne - </para> - </listitem> - </varlistentry> - <varlistentry> - <term> - &type.int; - <parameter>$fetchMode</parameter> - </term> - <listitem> - <para> - format de la ligne récupérée - </para> - </listitem> - </varlistentry> - <varlistentry> - <term> - &type.int; - <parameter>$rowNum</parameter> - </term> - <listitem> - <para> - le numéro de la ligne à récupérer - </para> - </listitem> - </varlistentry> - </variablelist> - </para> - </refsect1> - <refsect1 id="package.database.db.db-result.fetchinto.return"> - &title.returns; - <para> - <parameter>mixed</parameter> - un tableau ou &null; s'il n'y a plus de - lignes - </para> - </refsect1> - <refsect1 id="package.database.db.db-result.fetchinto.note"> - &title.note; - ¬e.notstatic; - </refsect1> - <refsect1 id="package.database.db.db-result.fetchinto.see"> - &title.see; - <para> - <link linkend="package.database.db.db-result.fetchrow"> - <function>fetchRow</function></link> - </para> - </refsect1> - </refentry> + </term> + <listitem> + <para> + reférence à une variable pour stocker la ligne + </para> + </listitem> + </varlistentry> + <varlistentry> + <term> + &type.int; + <parameter>$fetchMode</parameter> + </term> + <listitem> + <para> + le mode de récupération à utiliser. + Par défaut vaut <constant>DB_FETCHMODE_DEFAULT</constant>, + qui demande à la méthode d'utiliser le mode de récupération courant de DB. + Le mode de récupération de DB peut être modifié en utilisant + <link linkend="package.database.db.db-common.setfetchmode"> + <function>setFetchMode</function></link>. + Les valeurs possibles sont : + <itemizedlist> + <listitem> + <para> + <constant>DB_FETCHMODE_ORDERED</constant> + </para> + </listitem> + <listitem> + <para> + <constant>DB_FETCHMODE_ASSOC</constant> + </para> + </listitem> + <listitem> + <para> + <constant>DB_FETCHMODE_OBJECT</constant> + </para> + </listitem> + </itemizedlist> + </para> + </listitem> + </varlistentry> + <varlistentry> + <term> + &type.int; + <parameter>$rowNum</parameter> + </term> + <listitem> + <para> + le numéro de la ligne à récupérer + </para> + </listitem> + </varlistentry> + </variablelist> + </para> + </refsect1> + + <refsect1 id="package.database.db.db-result.fetchinto.return"> + &title.returns; + <para> + &type.int; - &constant.db-ok; si une ligne est récupéré, + &null; lorsque l'on est arrivé à la fin du jeu de résultats ou + un objet &class.db-error; en cas d'erreur + </para> + </refsect1> + + <refsect1 id="package.database.db.db-result.fetchinto.note"> + &title.note; + ¬e.notstatic; + </refsect1> + + <refsect1 id="package.database.db.db-result.fetchinto.example"> + &title.example; + <example> + <title>Utilisation de <function>fetchInto</function></title> + <programlisting role="php"> +<![CDATA[ +<?php +// On suppose que $db est un objet DB valide... +$res =& $db->query('SELECT * FROM mytable'); +while ($res->fetchInto($row)) { + // En supposant que le mode par défaut de récupération est + // DB_FETCHMODE_ORDERED + echo $row[0] . "\n"; +} +?> +]]> + </programlisting> + </example> + </refsect1> + + <refsect1 id="package.database.db.db-result.fetchinto.see"> + &title.see; + <para> + <link linkend="package.database.db.intro-fetch"> + <quote>Intro - Results</quote></link>, + <link linkend="package.database.db.db-common.setfetchmode"> + <function>setFetchMode</function></link>, + <link linkend="package.database.db.db-result.fetchrow"> + <function>fetchRow</function></link> + </para> + </refsect1> +</refentry> + <!-- Keep this comment at the end of the file Local variables: mode: sgml http://cvs.php.net/diff.php/peardoc/fr/package/database/db/db-result/fetchrow.xml?r1=1.1&r2=1.2&ty=u Index: peardoc/fr/package/database/db/db-result/fetchrow.xml diff -u peardoc/fr/package/database/db/db-result/fetchrow.xml:1.1 peardoc/fr/package/database/db/db-result/fetchrow.xml:1.2 --- peardoc/fr/package/database/db/db-result/fetchrow.xml:1.1 Sat Feb 21 21:33:41 2004 +++ peardoc/fr/package/database/db/db-result/fetchrow.xml Wed Jul 7 17:22:04 2004 @@ -1,80 +1,137 @@ -<!-- $Revision: 1.1 $ --> -<!-- EN-Revision: 1.11 Maintainer: didou Status: ready --> +<?xml version="1.0" encoding="iso-8859-1" ?> +<!-- $Revision: 1.2 $ --> +<!-- EN-Revision: 1.28 Maintainer: didou Status: ready --> + <refentry id="package.database.db.db-result.fetchrow"> - <refnamediv> - <refname>DB_result::fetchRow()</refname> - <refpurpose>Récupère une ligne</refpurpose> - </refnamediv> - <refsynopsisdiv> - <funcsynopsis> - <funcprototype> - <funcdef>mixed <function>fetchRow</function></funcdef> - <paramdef>integer - <parameter><optional>$fetchmode = <constant>DB_DEFAULT_MODE</constant> - </optional></parameter> - </paramdef> - <paramdef>integer - <parameter><optional>$rownum = &null;</optional></parameter> - </paramdef> - </funcprototype> - </funcsynopsis> - </refsynopsisdiv> - <refsect1 id="package.database.db.db-result.fetchrow.desc"> - &title.desc; - <para> - Récupère et retourne une ligne d'un résultat. Voyez la <link - linkend="package.database.db.intro-fetch">section "Fetch"</link> - pour plus d'informations. - </para> - </refsect1> - <refsect1 id="package.database.db.db-result.fetchrow.parameter"> - &title.param; - <para> - <variablelist> - <varlistentry> - <term> - &type.int; - <parameter>$fetchmode</parameter> - </term> - <listitem> - <para> - format de la ligne récupérée - </para> - </listitem> - </varlistentry> - <varlistentry> - <term> - &type.int; - <parameter>$rownum</parameter> - </term> - <listitem> - <para> - le numéro de la ligne à récupérer - </para> - </listitem> - </varlistentry> - </variablelist> - </para> - </refsect1> - <refsect1 id="package.database.db.db-result.fetchrow.return"> - &title.returns; - <para> - <parameter>mixed</parameter> - un tableau ou &null; s'il n'y a plus de - lignes - </para> - </refsect1> - <refsect1 id="package.database.db.db-result.fetchrow.note"> - &title.note; - ¬e.notstatic; - </refsect1> - <refsect1 id="package.database.db.db-result.fetchrow.see"> - &title.see; - <para> - <link linkend="package.database.db.db-result.fetchinto"> - <function>fetchInto</function></link> - </para> - </refsect1> - </refentry> + <refnamediv> + <refname>DB_result::fetchRow()</refname> + <refpurpose>Récupère une ligne</refpurpose> + </refnamediv> + + <refsynopsisdiv> + <funcsynopsis> + <funcprototype> + <funcdef>mixed <function>&fetchRow</function></funcdef> + <paramdef> + integer <parameter><optional>$fetchmode = + <constant>DB_DEFAULT_MODE</constant></optional></parameter> + </paramdef> + <paramdef> + integer <parameter><optional>$rownum = &null;</optional></parameter> + </paramdef> + </funcprototype> + </funcsynopsis> + </refsynopsisdiv> + + <refsect1 id="package.database.db.db-result.fetchrow.desc"> + &title.desc; + <para> + Retourne une ligne de données depuis le jeu de résultats et déplace + le pointeur de résultats à la ligne suivante. + Les données peuvent être formatées comme tableau ou objet. + </para> + </refsect1> + + <refsect1 id="package.database.db.db-result.fetchrow.parameter"> + &title.param; + <para> + <variablelist> + <varlistentry> + <term> + &type.int; + <parameter>$fetchmode</parameter> + </term> + <listitem> + <para> + le mode de récupération à utiliser. + Par défaut vaut <constant>DB_FETCHMODE_DEFAULT</constant>, + qui demande à la méthode d'utiliser le mode de récupération courant de DB. + Le mode de récupération de DB peut être modifié en utilisant + <link linkend="package.database.db.db-common.setfetchmode"> + <function>setFetchMode</function></link>. + Les valeurs possibles sont : + <itemizedlist> + <listitem> + <para> + <constant>DB_FETCHMODE_ORDERED</constant> + </para> + </listitem> + <listitem> + <para> + <constant>DB_FETCHMODE_ASSOC</constant> + </para> + </listitem> + <listitem> + <para> + <constant>DB_FETCHMODE_OBJECT</constant> + </para> + </listitem> + </itemizedlist> + </para> + </listitem> + </varlistentry> + <varlistentry> + <term> + &type.int; + <parameter>$rownum</parameter> + </term> + <listitem> + <para> + le numéro de la ligne à récupérer + </para> + </listitem> + </varlistentry> + </variablelist> + </para> + </refsect1> + + <refsect1 id="package.database.db.db-result.fetchrow.return"> + &title.returns; + <para> + &type.mixed; - un tableau ou un objet contenant la ligne de données, + &null; lorsque l'on a atteint la fin du jeu de résultats ou + un objet &class.db-error; en cas d'erreur + </para> + </refsect1> + + <refsect1 id="package.database.db.db-result.fetchrow.note"> + &title.note; + ¬e.notstatic; + </refsect1> + + <refsect1 id="package.database.db.db-result.fetchrow.example"> + &title.example; + <example> + <title>Utilisation de <function>fetchRow</function></title> + <programlisting role="php"> +<![CDATA[ +<?php +// On suppose que $db est un objet DB valide... +$res =& $db->query('SELECT * FROM mytable'); +while ($row =& $res->fetchRow()) { + // En supposant que le mode par défaut de récupération est + // DB_FETCHMODE_ORDERED + echo $row[0] . "\n"; +} +?> +]]> + </programlisting> + </example> + </refsect1> + + <refsect1 id="package.database.db.db-result.fetchrow.see"> + &title.see; + <para> + <link linkend="package.database.db.intro-fetch"> + <quote>Introduction - Résultats</quote></link>, + <link linkend="package.database.db.db-common.setfetchmode"> + <function>setFetchMode</function></link>, + <link linkend="package.database.db.db-result.fetchinto"> + <function>fetchInto</function></link> + </para> + </refsect1> +</refentry> + <!-- Keep this comment at the end of the file Local variables: mode: sgml http://cvs.php.net/diff.php/peardoc/fr/package/database/db/db-result/free.xml?r1=1.1&r2=1.2&ty=u Index: peardoc/fr/package/database/db/db-result/free.xml diff -u peardoc/fr/package/database/db/db-result/free.xml:1.1 peardoc/fr/package/database/db/db-result/free.xml:1.2 --- peardoc/fr/package/database/db/db-result/free.xml:1.1 Sat Feb 21 21:33:41 2004 +++ peardoc/fr/package/database/db/db-result/free.xml Wed Jul 7 17:22:04 2004 @@ -1,43 +1,63 @@ -<!-- $Revision: 1.1 $ --> -<!-- EN-Revision: 1.11 Maintainer: didou Status: ready --> +<?xml version="1.0" encoding="iso-8859-1" ?> +<!-- $Revision: 1.2 $ --> +<!-- EN-Revision: 1.19 Maintainer: didou Status: ready --> + <refentry id="package.database.db.db-result.free"> - <refnamediv> - <refname>DB_result::free()</refname> - <refpurpose>Libère un résultat</refpurpose> - </refnamediv> - <refsynopsisdiv> - <funcsynopsis> - <funcprototype> - <funcdef>boolean <function>free</function></funcdef> - <paramdef></paramdef> - </funcprototype> - </funcsynopsis> - </refsynopsisdiv> - <refsect1 id="package.database.db.db-result.free.desc"> - &title.desc; - <para> - Supprime le résultat et libère la mémoire occupée par celui-ci. - Cette fonction ne <emphasis>supprimer PAS</emphasis> l'objet &class.db-result; - lui-même. - </para> - </refsect1> - <refsect1 id="package.database.db.db-result.free.return"> - &title.returns; - <para> - <itemizedlist> - <listitem> - <para> - <parameter>boolean</parameter> - &return.success; - </para> - </listitem> - </itemizedlist> - </para> - </refsect1> - <refsect1 id="package.database.db.db-result.free.note"> - &title.note; - ¬e.notstatic; - </refsect1> - </refentry> + <refnamediv> + <refname>DB_result::free()</refname> + <refpurpose>Libère un résultat</refpurpose> + </refnamediv> + + <refsynopsisdiv> + <funcsynopsis> + <funcprototype> + <funcdef>boolean <function>free</function></funcdef> + <paramdef></paramdef> + </funcprototype> + </funcsynopsis> + </refsynopsisdiv> + + <refsect1 id="package.database.db.db-result.free.desc"> + &title.desc; + <para> + Supprime le résultat et libère la mémoire occupée par celui-ci. + Cette fonction ne <emphasis>supprime PAS</emphasis> l'objet &class.db-result; + lui-même. + </para> + </refsect1> + + <refsect1 id="package.database.db.db-result.free.return"> + &title.returns; + <para> + &type.bool; - &return.success; + </para> + </refsect1> + + <refsect1 id="package.database.db.db-result.free.example"> + &title.example; + <example> + <title>Utilisation de <function>free</function></title> + <programlisting role="php"> +<![CDATA[ +<?php +// On suppose que $db est un objet DB valide... +$res =& $db->query('SELECT name, address FROM clients'); +while ($row =& $res->fetchRow()) { + echo $row['name'] . ', ' . $row['address'] . "\n"; +} +$res->free(); +?> +]]> + </programlisting> + </example> + </refsect1> + + <refsect1 id="package.database.db.db-result.free.note"> + &title.note; + ¬e.notstatic; + </refsect1> +</refentry> + <!-- Keep this comment at the end of the file Local variables: mode: sgml http://cvs.php.net/diff.php/peardoc/fr/package/database/db/db-result/nextresult.xml?r1=1.1&r2=1.2&ty=u Index: peardoc/fr/package/database/db/db-result/nextresult.xml diff -u peardoc/fr/package/database/db/db-result/nextresult.xml:1.1 peardoc/fr/package/database/db/db-result/nextresult.xml:1.2 --- peardoc/fr/package/database/db/db-result/nextresult.xml:1.1 Sat Feb 21 21:33:41 2004 +++ peardoc/fr/package/database/db/db-result/nextresult.xml Wed Jul 7 17:22:04 2004 @@ -1,46 +1,53 @@ -<!-- $Revision: 1.1 $ --> -<!-- EN-Revision: 1.11 Maintainer: didou Status: ready --> +<?xml version="1.0" encoding="iso-8859-1" ?> +<!-- $Revision: 1.2 $ --> +<!-- EN-Revision: 1.18 Maintainer: didou Status: ready --> + <refentry id="package.database.db.db-result.nextresult"> - <refnamediv> - <refname>DB_result::nextResult()</refname> - <refpurpose>Retourne les résultats des requêtes multiple</refpurpose> - </refnamediv> - <refsynopsisdiv> - <funcsynopsis> - <funcprototype> - <funcdef>boolean <function>nextResult</function></funcdef> - <paramdef></paramdef> - </funcprototype> - </funcsynopsis> - </refsynopsisdiv> - <refsect1 id="package.database.db.db-result.nextresult.desc"> - &title.desc; + <refnamediv> + <refname>DB_result::nextResult()</refname> + <refpurpose>Retourne les résultats des requêtes multiple</refpurpose> + </refnamediv> + + <refsynopsisdiv> + <funcsynopsis> + <funcprototype> + <funcdef>boolean <function>nextResult</function></funcdef> + <paramdef></paramdef> + </funcprototype> + </funcsynopsis> + </refsynopsisdiv> + + <refsect1 id="package.database.db.db-result.nextresult.desc"> + &title.desc; + <para> + Quelques pilotes de base de données supportent l'exécution + simultanée de plusieurs requêtes. + Avec <function>nextResult</function>, vous pouvez traverser les résultats. + </para> + <warning> <para> - Quelques pilotes de base de données supportent l'exécution simultanée de - plusieurs requêtes. Avec <function>nextResult</function> vous pouvez - travaerser les résultats. + Cette fonction n'a rien à voir avec + <link linkend="package.database.db.db-common.executemultiple"> + <function>multipleExecute</function></link>. </para> - <warning> - <para> - Cette fonction n'a rien à voir avec - <link linkend="package.database.db.db-common.executemultiple"> - <function>multipleExecute</function></link>. - </para> - </warning> - </refsect1> - <refsect1 id="package.database.db.db-result.nextresult.return"> - &title.returns; - <para> - <parameter>boolean</parameter> - &true;, si - &class.db-result; contient le résultat suivant; - &false;, s'il n'y a plus de résultats à récupérer - </para> - </refsect1> - <refsect1 id="package.database.db.db-result.nextresult.note"> - &title.note; - ¬e.notstatic; - </refsect1> - </refentry> + </warning> + </refsect1> + + <refsect1 id="package.database.db.db-result.nextresult.return"> + &title.returns; + <para> + &type.bool; - &true;, si + &class.db-result; contient le résultat suivant ; + &false;, s'il n'y a plus de résultats à récupérer + </para> + </refsect1> + + <refsect1 id="package.database.db.db-result.nextresult.note"> + &title.note; + ¬e.notstatic; + </refsect1> +</refentry> + <!-- Keep this comment at the end of the file Local variables: mode: sgml http://cvs.php.net/diff.php/peardoc/fr/package/database/db/db-result/numcols.xml?r1=1.1&r2=1.2&ty=u Index: peardoc/fr/package/database/db/db-result/numcols.xml diff -u peardoc/fr/package/database/db/db-result/numcols.xml:1.1 peardoc/fr/package/database/db/db-result/numcols.xml:1.2 --- peardoc/fr/package/database/db/db-result/numcols.xml:1.1 Sat Feb 21 21:33:41 2004 +++ peardoc/fr/package/database/db/db-result/numcols.xml Wed Jul 7 17:22:04 2004 @@ -1,42 +1,67 @@ -<!-- $Revision: 1.1 $ --> -<!-- EN-Revision: 1.10 Maintainer: didou Status: ready --> +<?xml version="1.0" encoding="iso-8859-1" ?> +<!-- $Revision: 1.2 $ --> +<!-- EN-Revision: 1.19 Maintainer: didou Status: ready --> + <refentry id="package.database.db.db-result.numcols"> - <refnamediv> - <refname>DB_result::numCols()</refname> - <refpurpose>Retourne le nombre de colonnes</refpurpose> - </refnamediv> - <refsynopsisdiv> - <funcsynopsis> - <funcprototype> - <funcdef>integer <function>numCols</function></funcdef> - <paramdef></paramdef> - </funcprototype> - </funcsynopsis> - </refsynopsisdiv> - <refsect1 id="package.database.db.db-result.numcols.desc"> - &title.desc; - <para> - Retourne le nombre de colonnes de la ligne dans le résultat. - </para> - </refsect1> - <refsect1 id="package.database.db.db-result.numcols.return"> - &title.returns; - <para> - <parameter>integer</parameter> - nombre de colonnes - </para> - </refsect1> - <refsect1 id="package.database.db.db-result.numcols.note"> - &title.note; - ¬e.notstatic; - </refsect1> - <refsect1 id="package.database.db.db-result.numcols.see"> - &title.see; - <para> - <link linkend="package.database.db.db-result.numrows"> - <function>numRows</function></link> - </para> - </refsect1> - </refentry> + <refnamediv> + <refname>DB_result::numCols()</refname> + <refpurpose>Retourne le nombre de colonnes</refpurpose> + </refnamediv> + + <refsynopsisdiv> + <funcsynopsis> + <funcprototype> + <funcdef>integer <function>numCols</function></funcdef> + <paramdef></paramdef> + </funcprototype> + </funcsynopsis> + </refsynopsisdiv> + + <refsect1 id="package.database.db.db-result.numcols.desc"> + &title.desc; + <para> + Retourne le nombre de colonnes de la ligne dans le résultat. + </para> + </refsect1> + + <refsect1 id="package.database.db.db-result.numcols.return"> + &title.returns; + <para> + &type.int; - nombre de colonnes + ou un objet &class.db-error; en cas d'erreur + </para> + </refsect1> + + <refsect1 id="package.database.db.db-result.numcols.note"> + &title.note; + ¬e.notstatic; + </refsect1> + + <refsect1 id="package.database.db.db-result.numcols.example"> + &title.example; + <example> + <title>Utilisation de <function>numCols</function></title> + <programlisting role="php"> +<![CDATA[ +<?php +// On suppose que $db est un objet DB valide... +$res =& $db->query('SELECT * FROM phptest'); +echo $res->numCols(); +?> +]]> + </programlisting> + </example> + </refsect1> + + <refsect1 id="package.database.db.db-result.numcols.see"> + &title.see; + <para> + <link linkend="package.database.db.db-result.numrows"> + <function>numRows</function></link> + </para> + </refsect1> +</refentry> + <!-- Keep this comment at the end of the file Local variables: mode: sgml http://cvs.php.net/diff.php/peardoc/fr/package/database/db/db-result/numrows.xml?r1=1.1&r2=1.2&ty=u Index: peardoc/fr/package/database/db/db-result/numrows.xml diff -u peardoc/fr/package/database/db/db-result/numrows.xml:1.1 peardoc/fr/package/database/db/db-result/numrows.xml:1.2 --- peardoc/fr/package/database/db/db-result/numrows.xml:1.1 Sat Feb 21 21:33:41 2004 +++ peardoc/fr/package/database/db/db-result/numrows.xml Wed Jul 7 17:22:04 2004 @@ -1,42 +1,67 @@ -<!-- $Revision: 1.1 $ --> -<!-- EN-Revision: 1.11 Maintainer: didou Status: ready --> +<?xml version="1.0" encoding="iso-8859-1" ?> +<!-- $Revision: 1.2 $ --> +<!-- EN-Revision: 1.20 Maintainer: didou Status: ready --> + <refentry id="package.database.db.db-result.numrows"> - <refnamediv> - <refname>DB_result::numRows()</refname> - <refpurpose>Retourne le nombre de lignes</refpurpose> - </refnamediv> - <refsynopsisdiv> - <funcsynopsis> - <funcprototype> - <funcdef>integer <function>numRows</function></funcdef> - <paramdef></paramdef> - </funcprototype> - </funcsynopsis> - </refsynopsisdiv> - <refsect1 id="package.database.db.db-result.numrows.desc"> - &title.desc; - <para> - Retourne le nombre de lignes dans le résultat. - </para> - </refsect1> - <refsect1 id="package.database.db.db-result.numrows.return"> - &title.returns; - <para> - <parameter>integer</parameter> - nombre de lignes - </para> - </refsect1> - <refsect1 id="package.database.db.db-result.numrows.note"> - &title.note; - ¬e.notstatic; - </refsect1> - <refsect1 id="package.database.db.db-result.numrows.see"> - &title.see; - <para> - <link linkend="package.database.db.db-result.numcols"> - <function>numCols</function></link> - </para> - </refsect1> - </refentry> + <refnamediv> + <refname>DB_result::numRows()</refname> + <refpurpose>Retourne le nombre de lignes</refpurpose> + </refnamediv> + + <refsynopsisdiv> + <funcsynopsis> + <funcprototype> + <funcdef>integer <function>numRows</function></funcdef> + <paramdef></paramdef> + </funcprototype> + </funcsynopsis> + </refsynopsisdiv> + + <refsect1 id="package.database.db.db-result.numrows.desc"> + &title.desc; + <para> + Retourne le nombre de lignes dans le résultat. + </para> + </refsect1> + + <refsect1 id="package.database.db.db-result.numrows.return"> + &title.returns; + <para> + &type.int; - nombre de lignes + ou un objet &class.db-error; en cas d'erreur + </para> + </refsect1> + + <refsect1 id="package.database.db.db-result.numrows.note"> + &title.note; + ¬e.notstatic; + </refsect1> + + <refsect1 id="package.database.db.db-result.numrows.example"> + &title.example; + <example> + <title>Utilisation de <function>numRows</function></title> + <programlisting role="php"> +<![CDATA[ +<?php +// On suppose que $db est un objet DB valide... +$res =& $db->query('SELECT * FROM phptest'); +echo $res->numRows(); +?> +]]> + </programlisting> + </example> + </refsect1> + + <refsect1 id="package.database.db.db-result.numrows.see"> + &title.see; + <para> + <link linkend="package.database.db.db-result.numcols"> + <function>numCols</function></link> + </para> + </refsect1> +</refentry> + <!-- Keep this comment at the end of the file Local variables: mode: sgml
http://cvs.php.net/diff.php/peardoc/fr/package/database/db/db/connect.xml?r1=1.4&r2=1.5&ty=u Index: peardoc/fr/package/database/db/db/connect.xml diff -u peardoc/fr/package/database/db/db/connect.xml:1.4 peardoc/fr/package/database/db/db/connect.xml:1.5 --- peardoc/fr/package/database/db/db/connect.xml:1.4 Mon Feb 23 05:25:12 2004 +++ peardoc/fr/package/database/db/db/connect.xml Wed Jul 7 17:22:04 2004 @@ -1,124 +1,132 @@ -<!-- $Revision: 1.4 $ --> -<!-- EN-Revision: 1.11 Maintainer: didou Status: ready --> +<?xml version="1.0" encoding="iso-8859-1" ?> +<!-- $Revision: 1.5 $ --> +<!-- EN-Revision: 1.21 Maintainer: didou Status: ready --> <refentry id="package.database.db.db.connect"> - <refnamediv> - <refname>DB::connect()</refname> - <refpurpose>Se connecte à une base de données</refpurpose> - </refnamediv> - <refsynopsisdiv> - <funcsynopsis> - <funcprototype> - <funcdef>object <function>DB::connect</function></funcdef> - <paramdef>mixed <parameter>$dsn</parameter></paramdef> - <paramdef>array <parameter><optional>$options = array()</optional></parameter> - </paramdef> - </funcprototype> - </funcsynopsis> - </refsynopsisdiv> - <refsect1 id="package.database.db.db.connect.desc"> - &title.desc; - <para> - Crée un nouvel objet de connexion DB et se connecte à la base de données - spécifiée. - </para> - </refsect1> - <refsect1 id="package.database.db.db.connect.parameter"> - &title.param; - <para> - <variablelist> - <varlistentry> - <term> - &type.string; ou &type.array; - <parameter>$dsn</parameter> - </term> - <listitem> - <para> - Nom de la source de données (Data Source Name). La forme - chaînale est décrite dans la section - <link linkend="package.database.db.intro-dsn">DSN</link> tandis que - la forme de tableaux est couverte dans la section - <link linkend="package.database.db.intro-connect">Introduction - - Connexion</link>. - </para> - </listitem> - </varlistentry> - <varlistentry> - <term> - &type.array; - <parameter>$options</parameter> - </term> - <listitem> - <para> - Un argument optionnel qui peut contenir des directives de configuration - pour ce package. - Lisez <link linkend="package.database.db.db-common.setoption"> - <function>setOption</function></link> pour plus d'informations sur les - possibilités offertes. - </para> - </listitem> - </varlistentry> - </variablelist> - </para> - </refsect1> - <refsect1 id="package.database.db.db.connect.return"> - &title.returns; - <para> - <parameter>object</parameter> - l'object créé chargé - de la connexion à DB, ou un objet &class.db-error; en cas d'erreurs. - </para> - </refsect1> - <refsect1 id="package.database.db.db.connect.throws"> - &title.throws; - <para> - <table> - <title>&title.throws.errortable;</title> - <tgroup cols="4"> - <thead> - <row> - <entry>Code erreur</entry> - <entry>Message erreur</entry> - <entry>Raison</entry> - <entry>Solution</entry> - </row> - </thead> - <tbody> - <row> - <entry><constant>DB_ERROR_NOT_FOUND</constant></entry> - <entry> - &null; - </entry> - <entry> - La classe spécifique à cette base de - données n'a pas été trouvée. - </entry> - <entry> - Vérifiez le paramètre <parameter>$dsn</parameter>, ainsi que - l'installation du <filename>package DB</filename> et que votre - base de données est supporée par &class.db;. - </entry> - </row> - </tbody> - </tgroup> - </table> - </para> - </refsect1> - <refsect1 id="package.database.db.db.connect.note"> - &title.note; - ¬e.shouldstatic; - </refsect1> - <refsect1 id="package.database.db.db.connect.see"> - &title.see; - <para> - <link linkend="package.database.db.db-common.disconnect"> - <function>DB::disconnect</function> - </link>, - <link linkend="package.database.db.intro-connect"> - <function>Tutoriel - Se connecter</function> - </link> - </para> - </refsect1> - </refentry> + <refnamediv> + <refname>DB::connect()</refname> + <refpurpose>Se connecte à une base de données</refpurpose> + </refnamediv> + <refsynopsisdiv> + <funcsynopsis> + <funcprototype> + <funcdef>object <function>connect</function></funcdef> + <paramdef> + mixed <parameter>$dsn</parameter> + </paramdef> + <paramdef> + array <parameter><optional>$options = array()</optional></parameter> + </paramdef> + </funcprototype> + </funcsynopsis> + </refsynopsisdiv> + + <refsect1 id="package.database.db.db.connect.desc"> + &title.desc; + <para> + Crée un nouvel objet de connexion DB et + se connecte à la base de données spécifiée. + </para> + </refsect1> + + <refsect1 id="package.database.db.db.connect.parameter"> + &title.param; + <para> + <variablelist> + <varlistentry> + <term> + &type.string; ou &type.array; + <parameter>$dsn</parameter> + </term> + <listitem> + <para> + Nom de la source de données (Data Source Name). La forme + chaînale est décrite dans la section + <link linkend="package.database.db.intro-dsn">DSN</link> tandis que + la forme de tableaux est couverte dans la section + <link linkend="package.database.db.intro-connect">Introduction + - Connexion</link>. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term> + &type.array; + <parameter>$options</parameter> + </term> + <listitem> + <para> + Un argument optionnel qui peut contenir des directives de configuration + pour ce package. + Lisez <link linkend="package.database.db.db-common.setoption"> + <function>setOption</function></link> pour plus d'informations sur les + possibilités offertes. + </para> + </listitem> + </varlistentry> + </variablelist> + </para> + </refsect1> + + <refsect1 id="package.database.db.db.connect.return"> + &title.returns; + <para> + &type.object; - un nouvel objet DB + ou un objet &class.db-error; en cas d'erreur. + </para> + </refsect1> + + <refsect1 id="package.database.db.db.connect.throws"> + &title.throws; + <para> + <table> + <title>&title.throws.errortable;</title> + <tgroup cols="4"> + <thead> + <row> + <entry>Code erreur</entry> + <entry>Message erreur</entry> + <entry>Raison</entry> + <entry>Solution</entry> + </row> + </thead> + <tbody> + <row> + <entry><constant>DB_ERROR_NOT_FOUND</constant></entry> + <entry> + not found + </entry> + <entry> + La classe spécifique à cette base de + données n'a pas été trouvée. + </entry> + <entry> + Vérifiez le paramètre <parameter>$dsn</parameter>, ainsi que + l'installation du <filename>package DB</filename> et que votre + base de données est supporée par &class.db;. + </entry> + </row> + </tbody> + </tgroup> + </table> + </para> + </refsect1> + + <refsect1 id="package.database.db.db.connect.note"> + &title.note; + ¬e.shouldstatic; + </refsect1> + <refsect1 id="package.database.db.db.connect.see"> + &title.see; + <para> + <link linkend="package.database.db.db-common.disconnect"> + <function>disconnect</function></link>, + <link linkend="package.database.db.intro-connect"> + <quote>Intro - Connect</quote></link> + </para> + </refsect1> +</refentry> + <!-- Keep this comment at the end of the file Local variables: mode: sgml http://cvs.php.net/diff.php/peardoc/fr/package/database/db/db/iserror.xml?r1=1.4&r2=1.5&ty=u Index: peardoc/fr/package/database/db/db/iserror.xml diff -u peardoc/fr/package/database/db/db/iserror.xml:1.4 peardoc/fr/package/database/db/db/iserror.xml:1.5 --- peardoc/fr/package/database/db/db/iserror.xml:1.4 Mon Feb 23 05:25:50 2004 +++ peardoc/fr/package/database/db/db/iserror.xml Wed Jul 7 17:22:04 2004 @@ -1,56 +1,83 @@ -<!-- $Revision: 1.4 $ --> -<!-- EN-Revision: 1.7 Maintainer: didou Status: ready --> +<?xml version="1.0" encoding="iso-8859-1" ?> +<!-- $Revision: 1.5 $ --> +<!-- EN-Revision: 1.15 Maintainer: didou Status: ready --> <refentry id="package.database.db.db.iserror"> - <refnamediv> - <refname>DB::isError()</refname> - <refpurpose>Détermine si une variable est un objet DB_Error</refpurpose> - </refnamediv> - <refsynopsisdiv> - <funcsynopsis> - <funcprototype> - <funcdef>boolean <function>DB::isError</function></funcdef> - <paramdef>mixed <parameter>$value</parameter></paramdef> - </funcprototype> - </funcsynopsis> - </refsynopsisdiv> - <refsect1 id="package.database.db.db.iserror.desc"> - &title.desc; - <para> - Vérifie si le code de retour d'une méthode de DB est un objet - &class.db-error; ou non. - </para> - </refsect1> - <refsect1 id="package.database.db.db.iserror.parameter"> - &title.param; - <para> - <variablelist> - <varlistentry> - <term> - &type.mixed; - <parameter>$value</parameter> - </term> - <listitem> - <para> - Variable à vérifier - </para> - </listitem> - </varlistentry> - </variablelist> - </para> - </refsect1> - <refsect1 id="package.database.db.db.iserror.return"> - &title.returns; - <para> - <parameter>boolean</parameter> - &true;, si <parameter> - $value</parameter> est un objet &class.db-error; - </para> - </refsect1> - <refsect1 id="package.database.db.db.iserror.note"> - &title.note; - ¬e.shouldstatic; - </refsect1> - </refentry> + <refnamediv> + <refname>DB::isError()</refname> + <refpurpose>Détermine si une variable est un objet DB_Error</refpurpose> + </refnamediv> + + <refsynopsisdiv> + <funcsynopsis> + <funcprototype> + <funcdef>boolean <function>isError</function></funcdef> + <paramdef> + mixed <parameter>$value</parameter> + </paramdef> + </funcprototype> + </funcsynopsis> + </refsynopsisdiv> + + <refsect1 id="package.database.db.db.iserror.desc"> + &title.desc; + <para> + Vérifie si le code de retour d'une méthode de DB est un objet + &class.db-error; ou non. + </para> + </refsect1> + + <refsect1 id="package.database.db.db.iserror.parameter"> + &title.param; + <para> + <variablelist> + <varlistentry> + <term> + &type.mixed; + <parameter>$value</parameter> + </term> + <listitem> + <para> + Variable à vérifier + </para> + </listitem> + </varlistentry> + </variablelist> + </para> + </refsect1> + <refsect1 id="package.database.db.db.iserror.return"> + &title.returns; + <para> + &type.bool; - &true;, si <parameter>$value</parameter> + est un objet &class.db-error; + </para> + </refsect1> + + <refsect1 id="package.database.db.db.iserror.note"> + &title.note; + ¬e.shouldstatic; + </refsect1> + + <refsect1 id="package.database.db.db.iserror.example"> + &title.example; + <example> + <title>Utilisation de <function>isError</function></title> + <programlisting role="php"> +<![CDATA[ +<?php +require_once 'DB.php'; + +$db =& DB::connect('pgsql://usr:pw@localhost/dbnam'); +if (DB::isError($db)) { + die($db->getMessage()); +} +?> +]]> + </programlisting> + </example> + </refsect1> +</refentry> + <!-- Keep this comment at the end of the file Local variables: mode: sgml http://cvs.php.net/diff.php/peardoc/fr/package/database/db/db-result/fetchinto.xml?r1=1.1&r2=1.2&ty=u Index: peardoc/fr/package/database/db/db-result/fetchinto.xml diff -u peardoc/fr/package/database/db/db-result/fetchinto.xml:1.1 peardoc/fr/package/database/db/db-result/fetchinto.xml:1.2 --- peardoc/fr/package/database/db/db-result/fetchinto.xml:1.1 Sat Feb 21 21:33:41 2004 +++ peardoc/fr/package/database/db/db-result/fetchinto.xml Wed Jul 7 17:22:04 2004 @@ -1,94 +1,151 @@ -<!-- $Revision: 1.1 $ --> -<!-- EN-Revision: 1.11 Maintainer: didou Status: ready --> +<?xml version="1.0" encoding="iso-8859-1" ?> +<!-- $Revision: 1.2 $ --> +<!-- EN-Revision: 1.27 Maintainer: didou Status: ready --> + <refentry id="package.database.db.db-result.fetchinto"> - <refnamediv> - <refname>DB_result::fetchInto()</refname> - <refpurpose>Récupère une ligne dans une variable</refpurpose> - </refnamediv> - <refsynopsisdiv> - <funcsynopsis> - <funcprototype> - <funcdef>mixed <function>fetchInto</function></funcdef> - <paramdef>mixed + <refnamediv> + <refname>DB_result::fetchInto()</refname> + <refpurpose>Récupère une ligne dans une variable</refpurpose> + </refnamediv> + + <refsynopsisdiv> + <funcsynopsis> + <funcprototype> + <funcdef>integer <function>fetchInto</function></funcdef> + <paramdef> + array <parameter>&$arr</parameter> + </paramdef> + <paramdef> + integer <parameter><optional>$fetchMode = + <constant>DB_FETCHMODE_DEFAULT</constant></optional></parameter> + </paramdef> + <paramdef> + integer <parameter><optional>$rowNum = &null;</optional></parameter> + </paramdef> + </funcprototype> + </funcsynopsis> + </refsynopsisdiv> + + <refsect1 id="package.database.db.db-result.fetchinto.desc"> + &title.desc; + <para> + Copie une ligne d'un résultat dans une variable fournie et + déplace le pointeur de résultat à la ligne suivante. + Les données peuvent être formatées en tableau ou en objet. + </para> + </refsect1> + + <refsect1 id="package.database.db.db-result.fetchinto.parameter"> + &title.param; + <para> + <variablelist> + <varlistentry> + <term> + &type.mixed; <parameter>$arr</parameter> - </paramdef> - <paramdef>integer = - <parameter><optional>$fetchMode <constant>DB_FETCHMODE_DEFAULT</constant> - </optional></parameter> - </paramdef> - <paramdef>integer - <parameter><optional>$rowNum = &null;</optional></parameter> - </paramdef> - </funcprototype> - </funcsynopsis> - </refsynopsisdiv> - <refsect1 id="package.database.db.db-result.fetchinto.desc"> - &title.desc; - <para> - Copie une ligne d'un résultat dans une variable. Voyez la <link - linkend="package.database.db.intro-fetch">section "Fetch"</link> - pour plus d'informations. - </para> - </refsect1> - <refsect1 id="package.database.db.db-result.fetchinto.parameter"> - &title.param; - <para> - <variablelist> - <varlistentry> - <term> - &type.mixed; - <parameter>$arr</parameter> - </term> - <listitem> - <para> - reférence à une variable pour stocker la ligne - </para> - </listitem> - </varlistentry> - <varlistentry> - <term> - &type.int; - <parameter>$fetchMode</parameter> - </term> - <listitem> - <para> - format de la ligne récupérée - </para> - </listitem> - </varlistentry> - <varlistentry> - <term> - &type.int; - <parameter>$rowNum</parameter> - </term> - <listitem> - <para> - le numéro de la ligne à récupérer - </para> - </listitem> - </varlistentry> - </variablelist> - </para> - </refsect1> - <refsect1 id="package.database.db.db-result.fetchinto.return"> - &title.returns; - <para> - <parameter>mixed</parameter> - un tableau ou &null; s'il n'y a plus de - lignes - </para> - </refsect1> - <refsect1 id="package.database.db.db-result.fetchinto.note"> - &title.note; - ¬e.notstatic; - </refsect1> - <refsect1 id="package.database.db.db-result.fetchinto.see"> - &title.see; - <para> - <link linkend="package.database.db.db-result.fetchrow"> - <function>fetchRow</function></link> - </para> - </refsect1> - </refentry> + </term> + <listitem> + <para> + reférence à une variable pour stocker la ligne + </para> + </listitem> + </varlistentry> + <varlistentry> + <term> + &type.int; + <parameter>$fetchMode</parameter> + </term> + <listitem> + <para> + le mode de récupération à utiliser. + Par défaut vaut <constant>DB_FETCHMODE_DEFAULT</constant>, + qui demande à la méthode d'utiliser le mode de récupération courant de DB. + Le mode de récupération de DB peut être modifié en utilisant + <link linkend="package.database.db.db-common.setfetchmode"> + <function>setFetchMode</function></link>. + Les valeurs possibles sont : + <itemizedlist> + <listitem> + <para> + <constant>DB_FETCHMODE_ORDERED</constant> + </para> + </listitem> + <listitem> + <para> + <constant>DB_FETCHMODE_ASSOC</constant> + </para> + </listitem> + <listitem> + <para> + <constant>DB_FETCHMODE_OBJECT</constant> + </para> + </listitem> + </itemizedlist> + </para> + </listitem> + </varlistentry> + <varlistentry> + <term> + &type.int; + <parameter>$rowNum</parameter> + </term> + <listitem> + <para> + le numéro de la ligne à récupérer + </para> + </listitem> + </varlistentry> + </variablelist> + </para> + </refsect1> + + <refsect1 id="package.database.db.db-result.fetchinto.return"> + &title.returns; + <para> + &type.int; - &constant.db-ok; si une ligne est récupéré, + &null; lorsque l'on est arrivé à la fin du jeu de résultats ou + un objet &class.db-error; en cas d'erreur + </para> + </refsect1> + + <refsect1 id="package.database.db.db-result.fetchinto.note"> + &title.note; + ¬e.notstatic; + </refsect1> + + <refsect1 id="package.database.db.db-result.fetchinto.example"> + &title.example; + <example> + <title>Utilisation de <function>fetchInto</function></title> + <programlisting role="php"> +<![CDATA[ +<?php +// On suppose que $db est un objet DB valide... +$res =& $db->query('SELECT * FROM mytable'); +while ($res->fetchInto($row)) { + // En supposant que le mode par défaut de récupération est + // DB_FETCHMODE_ORDERED + echo $row[0] . "\n"; +} +?> +]]> + </programlisting> + </example> + </refsect1> + + <refsect1 id="package.database.db.db-result.fetchinto.see"> + &title.see; + <para> + <link linkend="package.database.db.intro-fetch"> + <quote>Intro - Results</quote></link>, + <link linkend="package.database.db.db-common.setfetchmode"> + <function>setFetchMode</function></link>, + <link linkend="package.database.db.db-result.fetchrow"> + <function>fetchRow</function></link> + </para> + </refsect1> +</refentry> + <!-- Keep this comment at the end of the file Local variables: mode: sgml http://cvs.php.net/diff.php/peardoc/fr/package/database/db/db-result/fetchrow.xml?r1=1.1&r2=1.2&ty=u Index: peardoc/fr/package/database/db/db-result/fetchrow.xml diff -u peardoc/fr/package/database/db/db-result/fetchrow.xml:1.1 peardoc/fr/package/database/db/db-result/fetchrow.xml:1.2 --- peardoc/fr/package/database/db/db-result/fetchrow.xml:1.1 Sat Feb 21 21:33:41 2004 +++ peardoc/fr/package/database/db/db-result/fetchrow.xml Wed Jul 7 17:22:04 2004 @@ -1,80 +1,137 @@ -<!-- $Revision: 1.1 $ --> -<!-- EN-Revision: 1.11 Maintainer: didou Status: ready --> +<?xml version="1.0" encoding="iso-8859-1" ?> +<!-- $Revision: 1.2 $ --> +<!-- EN-Revision: 1.28 Maintainer: didou Status: ready --> + <refentry id="package.database.db.db-result.fetchrow"> - <refnamediv> - <refname>DB_result::fetchRow()</refname> - <refpurpose>Récupère une ligne</refpurpose> - </refnamediv> - <refsynopsisdiv> - <funcsynopsis> - <funcprototype> - <funcdef>mixed <function>fetchRow</function></funcdef> - <paramdef>integer - <parameter><optional>$fetchmode = <constant>DB_DEFAULT_MODE</constant> - </optional></parameter> - </paramdef> - <paramdef>integer - <parameter><optional>$rownum = &null;</optional></parameter> - </paramdef> - </funcprototype> - </funcsynopsis> - </refsynopsisdiv> - <refsect1 id="package.database.db.db-result.fetchrow.desc"> - &title.desc; - <para> - Récupère et retourne une ligne d'un résultat. Voyez la <link - linkend="package.database.db.intro-fetch">section "Fetch"</link> - pour plus d'informations. - </para> - </refsect1> - <refsect1 id="package.database.db.db-result.fetchrow.parameter"> - &title.param; - <para> - <variablelist> - <varlistentry> - <term> - &type.int; - <parameter>$fetchmode</parameter> - </term> - <listitem> - <para> - format de la ligne récupérée - </para> - </listitem> - </varlistentry> - <varlistentry> - <term> - &type.int; - <parameter>$rownum</parameter> - </term> - <listitem> - <para> - le numéro de la ligne à récupérer - </para> - </listitem> - </varlistentry> - </variablelist> - </para> - </refsect1> - <refsect1 id="package.database.db.db-result.fetchrow.return"> - &title.returns; - <para> - <parameter>mixed</parameter> - un tableau ou &null; s'il n'y a plus de - lignes - </para> - </refsect1> - <refsect1 id="package.database.db.db-result.fetchrow.note"> - &title.note; - ¬e.notstatic; - </refsect1> - <refsect1 id="package.database.db.db-result.fetchrow.see"> - &title.see; - <para> - <link linkend="package.database.db.db-result.fetchinto"> - <function>fetchInto</function></link> - </para> - </refsect1> - </refentry> + <refnamediv> + <refname>DB_result::fetchRow()</refname> + <refpurpose>Récupère une ligne</refpurpose> + </refnamediv> + + <refsynopsisdiv> + <funcsynopsis> + <funcprototype> + <funcdef>mixed <function>&fetchRow</function></funcdef> + <paramdef> + integer <parameter><optional>$fetchmode = + <constant>DB_DEFAULT_MODE</constant></optional></parameter> + </paramdef> + <paramdef> + integer <parameter><optional>$rownum = &null;</optional></parameter> + </paramdef> + </funcprototype> + </funcsynopsis> + </refsynopsisdiv> + + <refsect1 id="package.database.db.db-result.fetchrow.desc"> + &title.desc; + <para> + Retourne une ligne de données depuis le jeu de résultats et déplace + le pointeur de résultats à la ligne suivante. + Les données peuvent être formatées comme tableau ou objet. + </para> + </refsect1> + + <refsect1 id="package.database.db.db-result.fetchrow.parameter"> + &title.param; + <para> + <variablelist> + <varlistentry> + <term> + &type.int; + <parameter>$fetchmode</parameter> + </term> + <listitem> + <para> + le mode de récupération à utiliser. + Par défaut vaut <constant>DB_FETCHMODE_DEFAULT</constant>, + qui demande à la méthode d'utiliser le mode de récupération courant de DB. + Le mode de récupération de DB peut être modifié en utilisant + <link linkend="package.database.db.db-common.setfetchmode"> + <function>setFetchMode</function></link>. + Les valeurs possibles sont : + <itemizedlist> + <listitem> + <para> + <constant>DB_FETCHMODE_ORDERED</constant> + </para> + </listitem> + <listitem> + <para> + <constant>DB_FETCHMODE_ASSOC</constant> + </para> + </listitem> + <listitem> + <para> + <constant>DB_FETCHMODE_OBJECT</constant> + </para> + </listitem> + </itemizedlist> + </para> + </listitem> + </varlistentry> + <varlistentry> + <term> + &type.int; + <parameter>$rownum</parameter> + </term> + <listitem> + <para> + le numéro de la ligne à récupérer + </para> + </listitem> + </varlistentry> + </variablelist> + </para> + </refsect1> + + <refsect1 id="package.database.db.db-result.fetchrow.return"> + &title.returns; + <para> + &type.mixed; - un tableau ou un objet contenant la ligne de données, + &null; lorsque l'on a atteint la fin du jeu de résultats ou + un objet &class.db-error; en cas d'erreur + </para> + </refsect1> + + <refsect1 id="package.database.db.db-result.fetchrow.note"> + &title.note; + ¬e.notstatic; + </refsect1> + + <refsect1 id="package.database.db.db-result.fetchrow.example"> + &title.example; + <example> + <title>Utilisation de <function>fetchRow</function></title> + <programlisting role="php"> +<![CDATA[ +<?php +// On suppose que $db est un objet DB valide... +$res =& $db->query('SELECT * FROM mytable'); +while ($row =& $res->fetchRow()) { + // En supposant que le mode par défaut de récupération est + // DB_FETCHMODE_ORDERED + echo $row[0] . "\n"; +} +?> +]]> + </programlisting> + </example> + </refsect1> + + <refsect1 id="package.database.db.db-result.fetchrow.see"> + &title.see; + <para> + <link linkend="package.database.db.intro-fetch"> + <quote>Introduction - Résultats</quote></link>, + <link linkend="package.database.db.db-common.setfetchmode"> + <function>setFetchMode</function></link>, + <link linkend="package.database.db.db-result.fetchinto"> + <function>fetchInto</function></link> + </para> + </refsect1> +</refentry> + <!-- Keep this comment at the end of the file Local variables: mode: sgml http://cvs.php.net/diff.php/peardoc/fr/package/database/db/db-result/free.xml?r1=1.1&r2=1.2&ty=u Index: peardoc/fr/package/database/db/db-result/free.xml diff -u peardoc/fr/package/database/db/db-result/free.xml:1.1 peardoc/fr/package/database/db/db-result/free.xml:1.2 --- peardoc/fr/package/database/db/db-result/free.xml:1.1 Sat Feb 21 21:33:41 2004 +++ peardoc/fr/package/database/db/db-result/free.xml Wed Jul 7 17:22:04 2004 @@ -1,43 +1,63 @@ -<!-- $Revision: 1.1 $ --> -<!-- EN-Revision: 1.11 Maintainer: didou Status: ready --> +<?xml version="1.0" encoding="iso-8859-1" ?> +<!-- $Revision: 1.2 $ --> +<!-- EN-Revision: 1.19 Maintainer: didou Status: ready --> + <refentry id="package.database.db.db-result.free"> - <refnamediv> - <refname>DB_result::free()</refname> - <refpurpose>Libère un résultat</refpurpose> - </refnamediv> - <refsynopsisdiv> - <funcsynopsis> - <funcprototype> - <funcdef>boolean <function>free</function></funcdef> - <paramdef></paramdef> - </funcprototype> - </funcsynopsis> - </refsynopsisdiv> - <refsect1 id="package.database.db.db-result.free.desc"> - &title.desc; - <para> - Supprime le résultat et libère la mémoire occupée par celui-ci. - Cette fonction ne <emphasis>supprimer PAS</emphasis> l'objet &class.db-result; - lui-même. - </para> - </refsect1> - <refsect1 id="package.database.db.db-result.free.return"> - &title.returns; - <para> - <itemizedlist> - <listitem> - <para> - <parameter>boolean</parameter> - &return.success; - </para> - </listitem> - </itemizedlist> - </para> - </refsect1> - <refsect1 id="package.database.db.db-result.free.note"> - &title.note; - ¬e.notstatic; - </refsect1> - </refentry> + <refnamediv> + <refname>DB_result::free()</refname> + <refpurpose>Libère un résultat</refpurpose> + </refnamediv> + + <refsynopsisdiv> + <funcsynopsis> + <funcprototype> + <funcdef>boolean <function>free</function></funcdef> + <paramdef></paramdef> + </funcprototype> + </funcsynopsis> + </refsynopsisdiv> + + <refsect1 id="package.database.db.db-result.free.desc"> + &title.desc; + <para> + Supprime le résultat et libère la mémoire occupée par celui-ci. + Cette fonction ne <emphasis>supprime PAS</emphasis> l'objet &class.db-result; + lui-même. + </para> + </refsect1> + + <refsect1 id="package.database.db.db-result.free.return"> + &title.returns; + <para> + &type.bool; - &return.success; + </para> + </refsect1> + + <refsect1 id="package.database.db.db-result.free.example"> + &title.example; + <example> + <title>Utilisation de <function>free</function></title> + <programlisting role="php"> +<![CDATA[ +<?php +// On suppose que $db est un objet DB valide... +$res =& $db->query('SELECT name, address FROM clients'); +while ($row =& $res->fetchRow()) { + echo $row['name'] . ', ' . $row['address'] . "\n"; +} +$res->free(); +?> +]]> + </programlisting> + </example> + </refsect1> + + <refsect1 id="package.database.db.db-result.free.note"> + &title.note; + ¬e.notstatic; + </refsect1> +</refentry> + <!-- Keep this comment at the end of the file Local variables: mode: sgml http://cvs.php.net/diff.php/peardoc/fr/package/database/db/db-result/nextresult.xml?r1=1.1&r2=1.2&ty=u Index: peardoc/fr/package/database/db/db-result/nextresult.xml diff -u peardoc/fr/package/database/db/db-result/nextresult.xml:1.1 peardoc/fr/package/database/db/db-result/nextresult.xml:1.2 --- peardoc/fr/package/database/db/db-result/nextresult.xml:1.1 Sat Feb 21 21:33:41 2004 +++ peardoc/fr/package/database/db/db-result/nextresult.xml Wed Jul 7 17:22:04 2004 @@ -1,46 +1,53 @@ -<!-- $Revision: 1.1 $ --> -<!-- EN-Revision: 1.11 Maintainer: didou Status: ready --> +<?xml version="1.0" encoding="iso-8859-1" ?> +<!-- $Revision: 1.2 $ --> +<!-- EN-Revision: 1.18 Maintainer: didou Status: ready --> + <refentry id="package.database.db.db-result.nextresult"> - <refnamediv> - <refname>DB_result::nextResult()</refname> - <refpurpose>Retourne les résultats des requêtes multiple</refpurpose> - </refnamediv> - <refsynopsisdiv> - <funcsynopsis> - <funcprototype> - <funcdef>boolean <function>nextResult</function></funcdef> - <paramdef></paramdef> - </funcprototype> - </funcsynopsis> - </refsynopsisdiv> - <refsect1 id="package.database.db.db-result.nextresult.desc"> - &title.desc; + <refnamediv> + <refname>DB_result::nextResult()</refname> + <refpurpose>Retourne les résultats des requêtes multiple</refpurpose> + </refnamediv> + + <refsynopsisdiv> + <funcsynopsis> + <funcprototype> + <funcdef>boolean <function>nextResult</function></funcdef> + <paramdef></paramdef> + </funcprototype> + </funcsynopsis> + </refsynopsisdiv> + + <refsect1 id="package.database.db.db-result.nextresult.desc"> + &title.desc; + <para> + Quelques pilotes de base de données supportent l'exécution + simultanée de plusieurs requêtes. + Avec <function>nextResult</function>, vous pouvez traverser les résultats. + </para> + <warning> <para> - Quelques pilotes de base de données supportent l'exécution simultanée de - plusieurs requêtes. Avec <function>nextResult</function> vous pouvez - travaerser les résultats. + Cette fonction n'a rien à voir avec + <link linkend="package.database.db.db-common.executemultiple"> + <function>multipleExecute</function></link>. </para> - <warning> - <para> - Cette fonction n'a rien à voir avec - <link linkend="package.database.db.db-common.executemultiple"> - <function>multipleExecute</function></link>. - </para> - </warning> - </refsect1> - <refsect1 id="package.database.db.db-result.nextresult.return"> - &title.returns; - <para> - <parameter>boolean</parameter> - &true;, si - &class.db-result; contient le résultat suivant; - &false;, s'il n'y a plus de résultats à récupérer - </para> - </refsect1> - <refsect1 id="package.database.db.db-result.nextresult.note"> - &title.note; - ¬e.notstatic; - </refsect1> - </refentry> + </warning> + </refsect1> + + <refsect1 id="package.database.db.db-result.nextresult.return"> + &title.returns; + <para> + &type.bool; - &true;, si + &class.db-result; contient le résultat suivant ; + &false;, s'il n'y a plus de résultats à récupérer + </para> + </refsect1> + + <refsect1 id="package.database.db.db-result.nextresult.note"> + &title.note; + ¬e.notstatic; + </refsect1> +</refentry> + <!-- Keep this comment at the end of the file Local variables: mode: sgml http://cvs.php.net/diff.php/peardoc/fr/package/database/db/db-result/numcols.xml?r1=1.1&r2=1.2&ty=u Index: peardoc/fr/package/database/db/db-result/numcols.xml diff -u peardoc/fr/package/database/db/db-result/numcols.xml:1.1 peardoc/fr/package/database/db/db-result/numcols.xml:1.2 --- peardoc/fr/package/database/db/db-result/numcols.xml:1.1 Sat Feb 21 21:33:41 2004 +++ peardoc/fr/package/database/db/db-result/numcols.xml Wed Jul 7 17:22:04 2004 @@ -1,42 +1,67 @@ -<!-- $Revision: 1.1 $ --> -<!-- EN-Revision: 1.10 Maintainer: didou Status: ready --> +<?xml version="1.0" encoding="iso-8859-1" ?> +<!-- $Revision: 1.2 $ --> +<!-- EN-Revision: 1.19 Maintainer: didou Status: ready --> + <refentry id="package.database.db.db-result.numcols"> - <refnamediv> - <refname>DB_result::numCols()</refname> - <refpurpose>Retourne le nombre de colonnes</refpurpose> - </refnamediv> - <refsynopsisdiv> - <funcsynopsis> - <funcprototype> - <funcdef>integer <function>numCols</function></funcdef> - <paramdef></paramdef> - </funcprototype> - </funcsynopsis> - </refsynopsisdiv> - <refsect1 id="package.database.db.db-result.numcols.desc"> - &title.desc; - <para> - Retourne le nombre de colonnes de la ligne dans le résultat. - </para> - </refsect1> - <refsect1 id="package.database.db.db-result.numcols.return"> - &title.returns; - <para> - <parameter>integer</parameter> - nombre de colonnes - </para> - </refsect1> - <refsect1 id="package.database.db.db-result.numcols.note"> - &title.note; - ¬e.notstatic; - </refsect1> - <refsect1 id="package.database.db.db-result.numcols.see"> - &title.see; - <para> - <link linkend="package.database.db.db-result.numrows"> - <function>numRows</function></link> - </para> - </refsect1> - </refentry> + <refnamediv> + <refname>DB_result::numCols()</refname> + <refpurpose>Retourne le nombre de colonnes</refpurpose> + </refnamediv> + + <refsynopsisdiv> + <funcsynopsis> + <funcprototype> + <funcdef>integer <function>numCols</function></funcdef> + <paramdef></paramdef> + </funcprototype> + </funcsynopsis> + </refsynopsisdiv> + + <refsect1 id="package.database.db.db-result.numcols.desc"> + &title.desc; + <para> + Retourne le nombre de colonnes de la ligne dans le résultat. + </para> + </refsect1> + + <refsect1 id="package.database.db.db-result.numcols.return"> + &title.returns; + <para> + &type.int; - nombre de colonnes + ou un objet &class.db-error; en cas d'erreur + </para> + </refsect1> + + <refsect1 id="package.database.db.db-result.numcols.note"> + &title.note; + ¬e.notstatic; + </refsect1> + + <refsect1 id="package.database.db.db-result.numcols.example"> + &title.example; + <example> + <title>Utilisation de <function>numCols</function></title> + <programlisting role="php"> +<![CDATA[ +<?php +// On suppose que $db est un objet DB valide... +$res =& $db->query('SELECT * FROM phptest'); +echo $res->numCols(); +?> +]]> + </programlisting> + </example> + </refsect1> + + <refsect1 id="package.database.db.db-result.numcols.see"> + &title.see; + <para> + <link linkend="package.database.db.db-result.numrows"> + <function>numRows</function></link> + </para> + </refsect1> +</refentry> + <!-- Keep this comment at the end of the file Local variables: mode: sgml http://cvs.php.net/diff.php/peardoc/fr/package/database/db/db-result/numrows.xml?r1=1.1&r2=1.2&ty=u Index: peardoc/fr/package/database/db/db-result/numrows.xml diff -u peardoc/fr/package/database/db/db-result/numrows.xml:1.1 peardoc/fr/package/database/db/db-result/numrows.xml:1.2 --- peardoc/fr/package/database/db/db-result/numrows.xml:1.1 Sat Feb 21 21:33:41 2004 +++ peardoc/fr/package/database/db/db-result/numrows.xml Wed Jul 7 17:22:04 2004 @@ -1,42 +1,67 @@ -<!-- $Revision: 1.1 $ --> -<!-- EN-Revision: 1.11 Maintainer: didou Status: ready --> +<?xml version="1.0" encoding="iso-8859-1" ?> +<!-- $Revision: 1.2 $ --> +<!-- EN-Revision: 1.20 Maintainer: didou Status: ready --> + <refentry id="package.database.db.db-result.numrows"> - <refnamediv> - <refname>DB_result::numRows()</refname> - <refpurpose>Retourne le nombre de lignes</refpurpose> - </refnamediv> - <refsynopsisdiv> - <funcsynopsis> - <funcprototype> - <funcdef>integer <function>numRows</function></funcdef> - <paramdef></paramdef> - </funcprototype> - </funcsynopsis> - </refsynopsisdiv> - <refsect1 id="package.database.db.db-result.numrows.desc"> - &title.desc; - <para> - Retourne le nombre de lignes dans le résultat. - </para> - </refsect1> - <refsect1 id="package.database.db.db-result.numrows.return"> - &title.returns; - <para> - <parameter>integer</parameter> - nombre de lignes - </para> - </refsect1> - <refsect1 id="package.database.db.db-result.numrows.note"> - &title.note; - ¬e.notstatic; - </refsect1> - <refsect1 id="package.database.db.db-result.numrows.see"> - &title.see; - <para> - <link linkend="package.database.db.db-result.numcols"> - <function>numCols</function></link> - </para> - </refsect1> - </refentry> + <refnamediv> + <refname>DB_result::numRows()</refname> + <refpurpose>Retourne le nombre de lignes</refpurpose> + </refnamediv> + + <refsynopsisdiv> + <funcsynopsis> + <funcprototype> + <funcdef>integer <function>numRows</function></funcdef> + <paramdef></paramdef> + </funcprototype> + </funcsynopsis> + </refsynopsisdiv> + + <refsect1 id="package.database.db.db-result.numrows.desc"> + &title.desc; + <para> + Retourne le nombre de lignes dans le résultat. + </para> + </refsect1> + + <refsect1 id="package.database.db.db-result.numrows.return"> + &title.returns; + <para> + &type.int; - nombre de lignes + ou un objet &class.db-error; en cas d'erreur + </para> + </refsect1> + + <refsect1 id="package.database.db.db-result.numrows.note"> + &title.note; + ¬e.notstatic; + </refsect1> + + <refsect1 id="package.database.db.db-result.numrows.example"> + &title.example; + <example> + <title>Utilisation de <function>numRows</function></title> + <programlisting role="php"> +<![CDATA[ +<?php +// On suppose que $db est un objet DB valide... +$res =& $db->query('SELECT * FROM phptest'); +echo $res->numRows(); +?> +]]> + </programlisting> + </example> + </refsect1> + + <refsect1 id="package.database.db.db-result.numrows.see"> + &title.see; + <para> + <link linkend="package.database.db.db-result.numcols"> + <function>numCols</function></link> + </para> + </refsect1> +</refentry> + <!-- Keep this comment at the end of the file Local variables: mode: sgml