cvs: phpdoc-fr /reference/maxdb/functions maxdb-stmt-errno.xml maxdb-stmt-error.xml maxdb-stmt-execute.xml maxdb-stmt-fetch.xml
maxdb-stmt-free-result.xml
| From: | Yannick Torres | Date: | Sat, 22 Jan 2005 13:17:30 +0000 |
| Subject: | cvs: phpdoc-fr /reference/maxdb/functions maxdb-stmt-errno.xml maxdb-stmt-error.xml maxdb-stmt-execute.xml maxdb-stmt-fetch.xml maxdb-stmt-free-result.xml |
||
| Groups: | php.doc.fr | ||
| Request: | Send a blank email to doc-fr+get-3844@lists.php.net to get a copy of this message | ||
yannick Sat Jan 22 08:17:30 2005 EDT
Added files:
/phpdoc-fr/reference/maxdb/functions maxdb-stmt-errno.xml
maxdb-stmt-error.xml
maxdb-stmt-execute.xml
maxdb-stmt-fetch.xml
maxdb-stmt-free-result.xml
Log:
initial translation
http://cvs.php.net/co.php/phpdoc-fr/reference/maxdb/functions/maxdb-stmt-errno.xml?r=1.1&p=1 Index: phpdoc-fr/reference/maxdb/functions/maxdb-stmt-errno.xml +++ phpdoc-fr/reference/maxdb/functions/maxdb-stmt-errno.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- $Revision: 1.1 $ --> <!-- EN-Revision: 1.1 Maintainer: yannick Status: ready --> <refentry id="function.maxdb-stmt-errno"> <refnamediv> <refname>maxdb_stmt_errno</refname> <refpurpose>Retourne le code erreur pour le dernier appel à une fonction de requête</refpurpose> </refnamediv> <refsect1> &reftitle.description; &title.procedural; <methodsynopsis> <type>int</type><methodname>maxdb_stmt_errno</methodname> <methodparam><type>resource</type><parameter>stmt</parameter></methodparam> </methodsynopsis> <para> Pour la requête spécifiée par le paramètre <parameter>stmt</parameter>, <function>maxdb_stmt_errno</function> retourne le code erreur pour l'appel le plus récent à une fonction de requête, qu'elle ait réussie ou échouée. </para> <note> <para> Pour une liste des codes erreurs possibles, lisez la documentation SQLDBC: <ulink url="http://dev.mysql.com/doc/maxdb/"></ulink>. </para> </note> </refsect1> <refsect1> &reftitle.returnvalues; <para> Un code erreur. Zéro signifie qu'aucune erreur n'est survenue. </para> </refsect1> <refsect1> &reftitle.examples; <example> <title>Style procédural</title> <programlisting role="php"> <![CDATA[ <?php /* Ouvre une connexion */ $link = maxdb_connect("localhost", "MONA", "RED"); /* Vérification de la connexion */ if (maxdb_connect_errno()) { printf("Echec de la connexion : %s\n", maxdb_connect_error()); exit(); } maxdb_query($link, "CREATE TABLE temp.mycity LIKE hotel.city"); maxdb_query($link, "INSERT INTO temp.mycity SELECT * FROM hotel.city"); $query = "SELECT name, zip FROM temp.mycity ORDER BY name"; if ($stmt = maxdb_prepare($link, $query)) { /* Efface une table */ maxdb_query($link, "DROP TABLE temp.mycity"); /* Exécute une requête */ maxdb_stmt_execute($stmt); printf("Erreur : %d.\n", maxdb_stmt_errno($stmt)); /* Fermeture de la requête */ maxdb_stmt_close($stmt); } /* Fermeture de la connexion */ maxdb_close($link); ?> ]]> </programlisting> &example.outputs; <screen> <![CDATA[ Warning: maxdb_stmt_execute(): -4004 POS(23) Unknown table name:MYCITY [42000] <...> Error: -4004. ]]> </screen> </example> </refsect1> <refsect1> &reftitle.seealso; <para> <function>maxdb_stmt_error</function> et <function>maxdb_stmt_sqlstate</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 --> http://cvs.php.net/co.php/phpdoc-fr/reference/maxdb/functions/maxdb-stmt-error.xml?r=1.1&p=1 Index: phpdoc-fr/reference/maxdb/functions/maxdb-stmt-error.xml +++ phpdoc-fr/reference/maxdb/functions/maxdb-stmt-error.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- $Revision: 1.1 $ --> <!-- EN-Revision: 1.1 Maintainer: yannick Status: ready --> <refentry id="function.maxdb-stmt-error"> <refnamediv> <refname>maxdb_stmt_error</refname> <refpurpose>Retourne une description de la dernière erreur</refpurpose> </refnamediv> <refsect1> &reftitle.description; &title.procedural; <methodsynopsis> <type>string</type><methodname>maxdb_stmt_error</methodname> <methodparam><type>resource</type><parameter>stmt</parameter></methodparam> </methodsynopsis> <para> Pour la requête spécifiée par le paramètre <parameter>stmt</parameter>, <function>maxdb_stmt_error</function> retourne un message d'erreur correspondant à la fonction de requête la plus récente, qu'elle ait échouée ou réussie. </para> </refsect1> <refsect1> &reftitle.returnvalues; <para> Une chaîne décrivant l'erreur. Une chaîne vide s'il n'y a aucune erreur. </para> </refsect1> <refsect1> &reftitle.examples; <example> <title>Style procédural</title> <programlisting role="php"> <![CDATA[ <?php /* Ouverture d'une connexion */ $link = maxdb_connect("localhost", "MONA", "RED"); /* Vérification de la connexion */ if (maxdb_connect_errno()) { printf("Echec de la connexion : %s\n", maxdb_connect_error()); exit(); } maxdb_query($link, "CREATE TABLE temp.mycity LIKE hotel.city"); maxdb_query($link, "INSERT INTO temp.mycity SELECT * FROM hotel.city"); $query = "SELECT name, zip FROM temp.mycity ORDER BY name"; if ($stmt = maxdb_prepare($link, $query)) { /* Effacement de la table */ maxdb_query($link, "DROP TABLE temp.mycity"); /* Exécute une requête */ maxdb_stmt_execute($stmt); printf("Erreur : %s.\n", maxdb_stmt_error($stmt)); /* Fermeture de la requête */ maxdb_stmt_close($stmt); } /* Fermeture de la connexion */ maxdb_close($link); ?> ]]> </programlisting> &example.outputs; <screen> <![CDATA[ Warning: maxdb_stmt_execute(): -4004 POS(23) Unknown table name:MYCITY [42000] <...> Erreur : POS(23) Unknown table name:MYCITY. ]]> </screen> </example> </refsect1> <refsect1> &reftitle.seealso; <para> <function>maxdb_stmt_errno</function> et <function>maxdb_stmt_sqlstate</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 --> http://cvs.php.net/co.php/phpdoc-fr/reference/maxdb/functions/maxdb-stmt-execute.xml?r=1.1&p=1 Index: phpdoc-fr/reference/maxdb/functions/maxdb-stmt-execute.xml +++ phpdoc-fr/reference/maxdb/functions/maxdb-stmt-execute.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- $Revision: 1.1 $ --> <!-- EN-Revision: 1.1 Maintainer: yannick Status: ready --> <refentry id="function.maxdb-stmt-execute"> <refnamediv> <refname>maxdb_stmt_execute</refname> <refpurpose>Exécute une requête préparée</refpurpose> </refnamediv> <refsect1> &reftitle.description; &title.procedural; <methodsynopsis> <type>bool</type><methodname>maxdb_stmt_execute</methodname> <methodparam><type>resource</type><parameter>stmt</parameter></methodparam> </methodsynopsis> <para> <function>maxdb_stmt_execute</function> exécute une requête qui a été préparée auparavant en utilisant la fonction <function>maxdb_prepare</function> représenté par la ressource <parameter>stmt</parameter>. Lors de l'exécution, tous les marqueurs existants seront automatiquement remplacés par les données appropriées. </para> <para> Si la requête est du type UPDATE, DELETE ou INSERT, le nombre total de lignes affectées peut être déterminé en utilisant la fonction <function>maxdb_stmt_affected_rows</function>. De même, si la requête rapporte un jeu de résultats, la fonction <function>maxdb_fetch</function> est utilisée. </para> <note> <para> Lors de l'utilisation de la fonction <function>maxdb_stmt_execute</function>, la fonction <function>maxdb_fetch</function> doit être utilisée pour récupérer les données avant d'effectuer toute autre requête additionnelle. </para> </note> </refsect1> <refsect1> &reftitle.returnvalues; <para>&return.success;</para> </refsect1> <refsect1> &reftitle.examples; <example> <title>Style procédural</title> <programlisting role="php"> <![CDATA[ <?php $link = maxdb_connect("localhost", "MONA", "RED"); /* Vérification de la connexion */ if (maxdb_connect_errno()) { printf("Echec de la connexion : %s\n", maxdb_connect_error()); exit(); } maxdb_query($link, "CREATE TABLE temp.mycity LIKE hotel.city"); /* Prépare une requête d'insertion */ $query = "INSERT INTO temp.mycity (zip, name, state) VALUES (?,?,?)"; $stmt = maxdb_prepare($link, $query); maxdb_stmt_bind_param($stmt, "sss", $val1, $val2, $val3); $val1 = '11111'; $val2 = 'Georgetown'; $val3 = 'NY'; /* Exécute la requête */ maxdb_stmt_execute($stmt); $val1 = '22222'; $val2 = 'Hubbatown'; $val3 = 'CA'; /* Exécute la requête */ maxdb_stmt_execute($stmt); /* Fermeture de la requête */ maxdb_stmt_close($stmt); /* Récupère toutes les lignes depuis myCity */ $query = "SELECT zip, name, state FROM temp.mycity"; if ($result = maxdb_query($link, $query)) { while ($row = maxdb_fetch_row($result)) { printf("%s (%s,%s)\n", $row[0], $row[1], $row[2]); } /* Libération du jeu de résultats */ maxdb_free_result($result); } /* Effacement de la table */ maxdb_query($link, "DROP TABLE temp.mycity"); /* Fermeture de la connexion */ maxdb_close($link); ?> ]]> </programlisting> &example.outputs; <screen> <![CDATA[ 11111 (Georgetown,NY) 22222 (Hubbatown,CA) ]]> </screen> </example> </refsect1> <refsect1> &reftitle.seealso; <para> <function>maxdb_prepare</function> et <function>maxdb_stmt_bind_param</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 --> http://cvs.php.net/co.php/phpdoc-fr/reference/maxdb/functions/maxdb-stmt-fetch.xml?r=1.1&p=1 Index: phpdoc-fr/reference/maxdb/functions/maxdb-stmt-fetch.xml +++ phpdoc-fr/reference/maxdb/functions/maxdb-stmt-fetch.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- $Revision: 1.1 $ --> <!-- EN-Revision: 1.1 Maintainer: yannick Status: ready --> <refentry id="function.maxdb-stmt-fetch"> <refnamediv> <refname>maxdb_stmt_fetch</refname> <refpurpose> Récupère les résultats depuis la requête préparée dans les variables liées </refpurpose> </refnamediv> <refsect1> &reftitle.description; &title.procedural; <methodsynopsis> <type>mixed</type><methodname>maxdb_stmt_fetch</methodname> <methodparam><type>resource</type><parameter>stmt</parameter></methodparam> </methodsynopsis> <para> <function>maxdb_stmt_fetch</function> retourne les données de lignes en utilisant les variables liées par la fonction <function>maxdb_stmt_bind_result</function>. </para> <note> <para> Notez que toutes les colonnes doivent être liées par l'application avant l'appel à la fonction <function>maxdb_stmt_fetch</function>. </para> </note> </refsect1> <refsect1> &reftitle.returnvalues; <table> <title>Valeurs retournées</title> <tgroup cols='2'> <thead> <row> <entry>Valeur</entry> <entry>Description</entry> </row> </thead> <tbody> <row> <entry>&true;</entry> <entry>Succès. Les données ont été récupérées</entry> </row> <row> <entry>&false;</entry> <entry>Une erreur est survenue</entry> </row> <row> <entry><literal>&null;</literal></entry> <entry>Il n'y a plus de lignes/données disponibles</entry> </row> </tbody> </tgroup> </table> </refsect1> <refsect1> &reftitle.examples; <example> <title>Style procédural</title> <programlisting role="php"> <![CDATA[ <?php $link = maxdb_connect("localhost", "MONA", "RED"); /* Vérification de la connexion */ if (maxdb_connect_errno()) { printf("Echec de la connexion : %s\n", maxdb_connect_error()); exit(); } $query = "SELECT zip, name FROM hotel.city ORDER by name"; if ($stmt = maxdb_prepare($link, $query)) { /* Exécution de la requête */ maxdb_stmt_execute($stmt); /* Lie les variables de résultats */ maxdb_stmt_bind_result($stmt, $name, $code); /* Récupération des valeurs */ while (maxdb_stmt_fetch($stmt)) { printf ("%s (%s)\n", $name, $code); } /* Fermeture de la requête */ maxdb_stmt_close($stmt); } /* Fermeture de la connexion */ maxdb_close($link); ?> ]]> </programlisting> &example.outputs; <screen> <![CDATA[ 12203 (Albany) 60601 (Chicago) 60615 (Chicago) 45211 (Cincinnati) 33575 (Clearwater) 75243 (Dallas) 32018 (Daytona Beach) 33441 (Deerfield Beach) 48226 (Detroit) 90029 (Hollywood) 92714 (Irvine) 90804 (Long Beach) 11788 (Long Island) 90018 (Los Angeles) 70112 (New Orleans) 10019 (New York) 10580 (New York) 92262 (Palm Springs) 97213 (Portland) 60018 (Rosemont) 95054 (Santa Clara) 20903 (Silver Spring) 20005 (Washington) 20019 (Washington) 20037 (Washington) ]]> </screen> </example> </refsect1> <refsect1> &reftitle.seealso; <para> <function>maxdb_prepare</function>, <function>maxdb_stmt_errno</function>, <function>maxdb_stmt_error</function> et <function>maxdb_stmt_bind_result</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 --> http://cvs.php.net/co.php/phpdoc-fr/reference/maxdb/functions/maxdb-stmt-free-result.xml?r=1.1&p=1 Index: phpdoc-fr/reference/maxdb/functions/maxdb-stmt-free-result.xml +++ phpdoc-fr/reference/maxdb/functions/maxdb-stmt-free-result.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- $Revision: 1.1 $ --> <!-- EN-Revision: 1.1 Maintainer: yannick Status: ready --> <refentry id="function.maxdb-stmt-free-result"> <refnamediv> <refname>maxdb_stmt_free_result</refname> <refpurpose>Libère la mémoire des résultats sotckés pour un gestionnaire de requête donné</refpurpose> </refnamediv> <refsect1> &reftitle.description; &title.procedural; <methodsynopsis> <type>void</type><methodname>maxdb_stmt_free_result</methodname> <methodparam><type>resource</type><parameter>stmt</parameter></methodparam> </methodsynopsis> <para> <function>maxdb_stmt_free_result</function> libère la mémoire des résultats associés avec la requête représentée par le paramètre <parameter>stmt</parameter>, qui a été alloué avec la fonction <function>maxdb_stmt_store_result</function>. </para> </refsect1> <refsect1> &reftitle.returnvalues; <para> Cette fonction ne retourne aucune valeur. </para> </refsect1> <refsect1> &reftitle.seealso; <para> <function>maxdb_stmt_store_result</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 -->
http://cvs.php.net/co.php/phpdoc-fr/reference/maxdb/functions/maxdb-stmt-errno.xml?r=1.1&p=1 Index: phpdoc-fr/reference/maxdb/functions/maxdb-stmt-errno.xml +++ phpdoc-fr/reference/maxdb/functions/maxdb-stmt-errno.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- $Revision: 1.1 $ --> <!-- EN-Revision: 1.1 Maintainer: yannick Status: ready --> <refentry id="function.maxdb-stmt-errno"> <refnamediv> <refname>maxdb_stmt_errno</refname> <refpurpose>Retourne le code erreur pour le dernier appel à une fonction de requête</refpurpose> </refnamediv> <refsect1> &reftitle.description; &title.procedural; <methodsynopsis> <type>int</type><methodname>maxdb_stmt_errno</methodname> <methodparam><type>resource</type><parameter>stmt</parameter></methodparam> </methodsynopsis> <para> Pour la requête spécifiée par le paramètre <parameter>stmt</parameter>, <function>maxdb_stmt_errno</function> retourne le code erreur pour l'appel le plus récent à une fonction de requête, qu'elle ait réussie ou échouée. </para> <note> <para> Pour une liste des codes erreurs possibles, lisez la documentation SQLDBC: <ulink url="http://dev.mysql.com/doc/maxdb/"></ulink>. </para> </note> </refsect1> <refsect1> &reftitle.returnvalues; <para> Un code erreur. Zéro signifie qu'aucune erreur n'est survenue. </para> </refsect1> <refsect1> &reftitle.examples; <example> <title>Style procédural</title> <programlisting role="php"> <![CDATA[ <?php /* Ouvre une connexion */ $link = maxdb_connect("localhost", "MONA", "RED"); /* Vérification de la connexion */ if (maxdb_connect_errno()) { printf("Echec de la connexion : %s\n", maxdb_connect_error()); exit(); } maxdb_query($link, "CREATE TABLE temp.mycity LIKE hotel.city"); maxdb_query($link, "INSERT INTO temp.mycity SELECT * FROM hotel.city"); $query = "SELECT name, zip FROM temp.mycity ORDER BY name"; if ($stmt = maxdb_prepare($link, $query)) { /* Efface une table */ maxdb_query($link, "DROP TABLE temp.mycity"); /* Exécute une requête */ maxdb_stmt_execute($stmt); printf("Erreur : %d.\n", maxdb_stmt_errno($stmt)); /* Fermeture de la requête */ maxdb_stmt_close($stmt); } /* Fermeture de la connexion */ maxdb_close($link); ?> ]]> </programlisting> &example.outputs; <screen> <![CDATA[ Warning: maxdb_stmt_execute(): -4004 POS(23) Unknown table name:MYCITY [42000] <...> Error: -4004. ]]> </screen> </example> </refsect1> <refsect1> &reftitle.seealso; <para> <function>maxdb_stmt_error</function> et <function>maxdb_stmt_sqlstate</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 --> http://cvs.php.net/co.php/phpdoc-fr/reference/maxdb/functions/maxdb-stmt-error.xml?r=1.1&p=1 Index: phpdoc-fr/reference/maxdb/functions/maxdb-stmt-error.xml +++ phpdoc-fr/reference/maxdb/functions/maxdb-stmt-error.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- $Revision: 1.1 $ --> <!-- EN-Revision: 1.1 Maintainer: yannick Status: ready --> <refentry id="function.maxdb-stmt-error"> <refnamediv> <refname>maxdb_stmt_error</refname> <refpurpose>Retourne une description de la dernière erreur</refpurpose> </refnamediv> <refsect1> &reftitle.description; &title.procedural; <methodsynopsis> <type>string</type><methodname>maxdb_stmt_error</methodname> <methodparam><type>resource</type><parameter>stmt</parameter></methodparam> </methodsynopsis> <para> Pour la requête spécifiée par le paramètre <parameter>stmt</parameter>, <function>maxdb_stmt_error</function> retourne un message d'erreur correspondant à la fonction de requête la plus récente, qu'elle ait échouée ou réussie. </para> </refsect1> <refsect1> &reftitle.returnvalues; <para> Une chaîne décrivant l'erreur. Une chaîne vide s'il n'y a aucune erreur. </para> </refsect1> <refsect1> &reftitle.examples; <example> <title>Style procédural</title> <programlisting role="php"> <![CDATA[ <?php /* Ouverture d'une connexion */ $link = maxdb_connect("localhost", "MONA", "RED"); /* Vérification de la connexion */ if (maxdb_connect_errno()) { printf("Echec de la connexion : %s\n", maxdb_connect_error()); exit(); } maxdb_query($link, "CREATE TABLE temp.mycity LIKE hotel.city"); maxdb_query($link, "INSERT INTO temp.mycity SELECT * FROM hotel.city"); $query = "SELECT name, zip FROM temp.mycity ORDER BY name"; if ($stmt = maxdb_prepare($link, $query)) { /* Effacement de la table */ maxdb_query($link, "DROP TABLE temp.mycity"); /* Exécute une requête */ maxdb_stmt_execute($stmt); printf("Erreur : %s.\n", maxdb_stmt_error($stmt)); /* Fermeture de la requête */ maxdb_stmt_close($stmt); } /* Fermeture de la connexion */ maxdb_close($link); ?> ]]> </programlisting> &example.outputs; <screen> <![CDATA[ Warning: maxdb_stmt_execute(): -4004 POS(23) Unknown table name:MYCITY [42000] <...> Erreur : POS(23) Unknown table name:MYCITY. ]]> </screen> </example> </refsect1> <refsect1> &reftitle.seealso; <para> <function>maxdb_stmt_errno</function> et <function>maxdb_stmt_sqlstate</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 --> http://cvs.php.net/co.php/phpdoc-fr/reference/maxdb/functions/maxdb-stmt-execute.xml?r=1.1&p=1 Index: phpdoc-fr/reference/maxdb/functions/maxdb-stmt-execute.xml +++ phpdoc-fr/reference/maxdb/functions/maxdb-stmt-execute.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- $Revision: 1.1 $ --> <!-- EN-Revision: 1.1 Maintainer: yannick Status: ready --> <refentry id="function.maxdb-stmt-execute"> <refnamediv> <refname>maxdb_stmt_execute</refname> <refpurpose>Exécute une requête préparée</refpurpose> </refnamediv> <refsect1> &reftitle.description; &title.procedural; <methodsynopsis> <type>bool</type><methodname>maxdb_stmt_execute</methodname> <methodparam><type>resource</type><parameter>stmt</parameter></methodparam> </methodsynopsis> <para> <function>maxdb_stmt_execute</function> exécute une requête qui a été préparée auparavant en utilisant la fonction <function>maxdb_prepare</function> représenté par la ressource <parameter>stmt</parameter>. Lors de l'exécution, tous les marqueurs existants seront automatiquement remplacés par les données appropriées. </para> <para> Si la requête est du type UPDATE, DELETE ou INSERT, le nombre total de lignes affectées peut être déterminé en utilisant la fonction <function>maxdb_stmt_affected_rows</function>. De même, si la requête rapporte un jeu de résultats, la fonction <function>maxdb_fetch</function> est utilisée. </para> <note> <para> Lors de l'utilisation de la fonction <function>maxdb_stmt_execute</function>, la fonction <function>maxdb_fetch</function> doit être utilisée pour récupérer les données avant d'effectuer toute autre requête additionnelle. </para> </note> </refsect1> <refsect1> &reftitle.returnvalues; <para>&return.success;</para> </refsect1> <refsect1> &reftitle.examples; <example> <title>Style procédural</title> <programlisting role="php"> <![CDATA[ <?php $link = maxdb_connect("localhost", "MONA", "RED"); /* Vérification de la connexion */ if (maxdb_connect_errno()) { printf("Echec de la connexion : %s\n", maxdb_connect_error()); exit(); } maxdb_query($link, "CREATE TABLE temp.mycity LIKE hotel.city"); /* Prépare une requête d'insertion */ $query = "INSERT INTO temp.mycity (zip, name, state) VALUES (?,?,?)"; $stmt = maxdb_prepare($link, $query); maxdb_stmt_bind_param($stmt, "sss", $val1, $val2, $val3); $val1 = '11111'; $val2 = 'Georgetown'; $val3 = 'NY'; /* Exécute la requête */ maxdb_stmt_execute($stmt); $val1 = '22222'; $val2 = 'Hubbatown'; $val3 = 'CA'; /* Exécute la requête */ maxdb_stmt_execute($stmt); /* Fermeture de la requête */ maxdb_stmt_close($stmt); /* Récupère toutes les lignes depuis myCity */ $query = "SELECT zip, name, state FROM temp.mycity"; if ($result = maxdb_query($link, $query)) { while ($row = maxdb_fetch_row($result)) { printf("%s (%s,%s)\n", $row[0], $row[1], $row[2]); } /* Libération du jeu de résultats */ maxdb_free_result($result); } /* Effacement de la table */ maxdb_query($link, "DROP TABLE temp.mycity"); /* Fermeture de la connexion */ maxdb_close($link); ?> ]]> </programlisting> &example.outputs; <screen> <![CDATA[ 11111 (Georgetown,NY) 22222 (Hubbatown,CA) ]]> </screen> </example> </refsect1> <refsect1> &reftitle.seealso; <para> <function>maxdb_prepare</function> et <function>maxdb_stmt_bind_param</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 --> http://cvs.php.net/co.php/phpdoc-fr/reference/maxdb/functions/maxdb-stmt-fetch.xml?r=1.1&p=1 Index: phpdoc-fr/reference/maxdb/functions/maxdb-stmt-fetch.xml +++ phpdoc-fr/reference/maxdb/functions/maxdb-stmt-fetch.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- $Revision: 1.1 $ --> <!-- EN-Revision: 1.1 Maintainer: yannick Status: ready --> <refentry id="function.maxdb-stmt-fetch"> <refnamediv> <refname>maxdb_stmt_fetch</refname> <refpurpose> Récupère les résultats depuis la requête préparée dans les variables liées </refpurpose> </refnamediv> <refsect1> &reftitle.description; &title.procedural; <methodsynopsis> <type>mixed</type><methodname>maxdb_stmt_fetch</methodname> <methodparam><type>resource</type><parameter>stmt</parameter></methodparam> </methodsynopsis> <para> <function>maxdb_stmt_fetch</function> retourne les données de lignes en utilisant les variables liées par la fonction <function>maxdb_stmt_bind_result</function>. </para> <note> <para> Notez que toutes les colonnes doivent être liées par l'application avant l'appel à la fonction <function>maxdb_stmt_fetch</function>. </para> </note> </refsect1> <refsect1> &reftitle.returnvalues; <table> <title>Valeurs retournées</title> <tgroup cols='2'> <thead> <row> <entry>Valeur</entry> <entry>Description</entry> </row> </thead> <tbody> <row> <entry>&true;</entry> <entry>Succès. Les données ont été récupérées</entry> </row> <row> <entry>&false;</entry> <entry>Une erreur est survenue</entry> </row> <row> <entry><literal>&null;</literal></entry> <entry>Il n'y a plus de lignes/données disponibles</entry> </row> </tbody> </tgroup> </table> </refsect1> <refsect1> &reftitle.examples; <example> <title>Style procédural</title> <programlisting role="php"> <![CDATA[ <?php $link = maxdb_connect("localhost", "MONA", "RED"); /* Vérification de la connexion */ if (maxdb_connect_errno()) { printf("Echec de la connexion : %s\n", maxdb_connect_error()); exit(); } $query = "SELECT zip, name FROM hotel.city ORDER by name"; if ($stmt = maxdb_prepare($link, $query)) { /* Exécution de la requête */ maxdb_stmt_execute($stmt); /* Lie les variables de résultats */ maxdb_stmt_bind_result($stmt, $name, $code); /* Récupération des valeurs */ while (maxdb_stmt_fetch($stmt)) { printf ("%s (%s)\n", $name, $code); } /* Fermeture de la requête */ maxdb_stmt_close($stmt); } /* Fermeture de la connexion */ maxdb_close($link); ?> ]]> </programlisting> &example.outputs; <screen> <![CDATA[ 12203 (Albany) 60601 (Chicago) 60615 (Chicago) 45211 (Cincinnati) 33575 (Clearwater) 75243 (Dallas) 32018 (Daytona Beach) 33441 (Deerfield Beach) 48226 (Detroit) 90029 (Hollywood) 92714 (Irvine) 90804 (Long Beach) 11788 (Long Island) 90018 (Los Angeles) 70112 (New Orleans) 10019 (New York) 10580 (New York) 92262 (Palm Springs) 97213 (Portland) 60018 (Rosemont) 95054 (Santa Clara) 20903 (Silver Spring) 20005 (Washington) 20019 (Washington) 20037 (Washington) ]]> </screen> </example> </refsect1> <refsect1> &reftitle.seealso; <para> <function>maxdb_prepare</function>, <function>maxdb_stmt_errno</function>, <function>maxdb_stmt_error</function> et <function>maxdb_stmt_bind_result</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 --> http://cvs.php.net/co.php/phpdoc-fr/reference/maxdb/functions/maxdb-stmt-free-result.xml?r=1.1&p=1 Index: phpdoc-fr/reference/maxdb/functions/maxdb-stmt-free-result.xml +++ phpdoc-fr/reference/maxdb/functions/maxdb-stmt-free-result.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- $Revision: 1.1 $ --> <!-- EN-Revision: 1.1 Maintainer: yannick Status: ready --> <refentry id="function.maxdb-stmt-free-result"> <refnamediv> <refname>maxdb_stmt_free_result</refname> <refpurpose>Libère la mémoire des résultats sotckés pour un gestionnaire de requête donné</refpurpose> </refnamediv> <refsect1> &reftitle.description; &title.procedural; <methodsynopsis> <type>void</type><methodname>maxdb_stmt_free_result</methodname> <methodparam><type>resource</type><parameter>stmt</parameter></methodparam> </methodsynopsis> <para> <function>maxdb_stmt_free_result</function> libère la mémoire des résultats associés avec la requête représentée par le paramètre <parameter>stmt</parameter>, qui a été alloué avec la fonction <function>maxdb_stmt_store_result</function>. </para> </refsect1> <refsect1> &reftitle.returnvalues; <para> Cette fonction ne retourne aucune valeur. </para> </refsect1> <refsect1> &reftitle.seealso; <para> <function>maxdb_stmt_store_result</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 -->