cvs: phpdoc-fr /reference/maxdb/functions maxdb-query.xml maxdb-real-connect.xml maxdb-real-escape-string.xml maxdb-real-query.xml maxdb-report.xml
maxdb-rollback.xml maxdb-rpl-parse-enabled.xml maxdb-rpl-probe.xml maxdb-rpl-query-type.xml maxdb-select-db.xml maxdb-send-long-data.xml
maxdb-send-query.xml maxdb-server-end.xml maxdb-server-init.xml maxdb-set-opt.xml maxdb-sqlstate.xml maxdb-ssl-set.xml maxdb-stat.xml
maxdb-stmt-affected-rows.xml maxdb-stmt-bind-param.xml maxdb-stmt-bind-result.xml maxdb-stmt-close-long-data.xml maxdb-stmt-close.xml
maxdb-stmt-data-seek.xml

From: Date: Sat, 22 Jan 2005 16:06:30 +0000
Subject: cvs: phpdoc-fr /reference/maxdb/functions maxdb-query.xml maxdb-real-connect.xml maxdb-real-escape-string.xml maxdb-real-query.xml maxdb-report.xml
maxdb-rollback.xml maxdb-rpl-parse-enabled.xml maxdb-rpl-probe.xml maxdb-rpl-query-type.xml maxdb-select-db.xml maxdb-send-long-data.xml
maxdb-send-query.xml maxdb-server-end.xml maxdb-server-init.xml maxdb-set-opt.xml maxdb-sqlstate.xml maxdb-ssl-set.xml maxdb-stat.xml
maxdb-stmt-affected-rows.xml maxdb-stmt-bind-param.xml maxdb-stmt-bind-result.xml maxdb-stmt-close-long-data.xml maxdb-stmt-close.xml
maxdb-stmt-data-seek.xml
Groups: php.doc.fr 
Request: Send a blank email to doc-fr+get-3846@lists.php.net to get a copy of this message
yannick Sat Jan 22 11:06:30 2005 EDT Added files: /phpdoc-fr/reference/maxdb/functions maxdb-query.xml maxdb-real-connect.xml maxdb-real-escape-string.xml maxdb-real-query.xml maxdb-report.xml maxdb-rollback.xml maxdb-rpl-parse-enabled.xml maxdb-rpl-probe.xml maxdb-rpl-query-type.xml maxdb-select-db.xml maxdb-send-long-data.xml maxdb-send-query.xml maxdb-server-end.xml maxdb-server-init.xml maxdb-set-opt.xml maxdb-sqlstate.xml maxdb-ssl-set.xml maxdb-stat.xml maxdb-stmt-affected-rows.xml maxdb-stmt-bind-param.xml maxdb-stmt-bind-result.xml maxdb-stmt-close-long-data.xml maxdb-stmt-close.xml maxdb-stmt-data-seek.xml Log: initial translation

http://cvs.php.net/co.php/phpdoc-fr/reference/maxdb/functions/maxdb-query.xml?r=1.1&p=1 Index: phpdoc-fr/reference/maxdb/functions/maxdb-query.xml +++ phpdoc-fr/reference/maxdb/functions/maxdb-query.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- $Revision: 1.1 $ --> <!-- EN-Revision: 1.1 Maintainer: yannick Status: ready --> <refentry id="function.maxdb-query"> <refnamediv> <refname>maxdb_query</refname> <refpurpose>Exécute une requête sur une base de données</refpurpose> </refnamediv> <refsect1> &reftitle.description; &title.procedural; <methodsynopsis> <type>mixed</type><methodname>maxdb_query</methodname> <methodparam><type>resource</type><parameter>link</parameter></methodparam> <methodparam><type>string</type><parameter>query</parameter></methodparam> <methodparam choice='opt'><type>int</type><parameter>resultmode</parameter></methodparam> </methodsynopsis> <para> <function>maxdb_query</function> est utilisé pour simplifier l'exécution d'une requête sur une base de données représentée par le paramètre <parameter>link</parameter>. </para> </refsect1> <refsect1> &reftitle.returnvalues; <para> &return.success; Pour les requêtes <literal>SELECT, SHOW, DESCRIBE</literal> ou <literal>EXPLAIN</literal>, <function>maxdb_query</function> retourne une ressource de résultats. </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(); } /* La création d'une table ne retourne pas de jeu de résultats */ if (maxdb_query($link, "CREATE TABLE temp.mycity LIKE hotel.city") === TRUE) { printf("La table mycity a été créée avec succès.\n"); } /* Les requêtes SELECT retournent un jeu de résultats */ if ($result = maxdb_query($link, "SELECT name FROM hotel.city")) { printf("SELECT a retourné %d lignes.\n", maxdb_num_rows($result)); /* Libération des résultats */ maxdb_free_result($result); } /* Si nous devons récupérer une grosse quantité de données, nous utilisons MAXDB_USE_RESULT */ if ($result = maxdb_query($link, "SELECT * FROM hotel.city", MAXDB_USE_RESULT)) { maxdb_free_result($result); } maxdb_close($link); ?> ]]> </programlisting> &example.outputs; <screen> <![CDATA[ La table mycity a été créée avec succès. SELECT a retourné -1 lignes. ]]> </screen> </example> </refsect1> <refsect1> &reftitle.seealso; <para> <function>maxdb_real_query</function>, <function>maxdb_multi_query</function> et <function>maxdb_free_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-real-connect.xml?r=1.1&p=1 Index: phpdoc-fr/reference/maxdb/functions/maxdb-real-connect.xml +++ phpdoc-fr/reference/maxdb/functions/maxdb-real-connect.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- $Revision: 1.1 $ --> <!-- EN-Revision: 1.1 Maintainer: yannick Status: ready --> <refentry id="function.maxdb-real-connect"> <refnamediv> <refname>maxdb_real_connect</refname> <refpurpose>Ouvre une connexion sur un serveur MaxDB</refpurpose> </refnamediv> <refsect1> &reftitle.description; &title.procedural; <methodsynopsis> <type>bool</type><methodname>maxdb_real_connect</methodname> <methodparam><type>resource</type><parameter>link</parameter></methodparam> <methodparam choice='opt'><type>string</type><parameter>hostname</parameter></methodparam> <methodparam choice='opt'><type>string</type><parameter>username</parameter></methodparam> <methodparam choice='opt'><type>string</type><parameter>passwd</parameter></methodparam> <methodparam choice='opt'><type>string</type><parameter>dbname</parameter></methodparam> <methodparam choice='opt'><type>int</type><parameter>port</parameter></methodparam> <methodparam choice='opt'><type>string</type><parameter>socket</parameter></methodparam> </methodsynopsis> <para> <function>maxdb_real_connect</function> tente d'ouvrir une connexion sur un serveur MaxDB fonctionnant sur l'hôte <parameter>hostname</parameter>. </para> <para> Cette fonction diffère de <function>maxdb_connect</function> : </para> <itemizedlist> <listitem> <para> <function>maxdb_real_connect</function> nécessite une ressource valide créée par la fonction <function>maxdb_init</function>. </para> </listitem> <listitem> <para> Avec la fonction <function>maxdb_options</function>, vous pouvez définir plusieurs options pour la connexion. </para> </listitem> </itemizedlist> </refsect1> <refsect1> &reftitle.returnvalues; <para>&return.success;</para> </refsect1> <refsect1> &reftitle.examples; <example> <title>Style procédural</title> <programlisting role="php"> <![CDATA[ <?php /* Création d'un objet de connexion qui n'est pas connecté */ $link = maxdb_init(); /* Définission des options de connexions */ maxdb_options($link, MAXDB_UNICODE, "FALSE"); maxdb_options($link, MAXDB_TIMEOUT, 5); /* Connexion au serveur */ maxdb_real_connect($link, 'localhost', 'MONA', 'RED'); /* Vérification de la connexion */ if (maxdb_connect_errno()) { printf("Echec de la connexion : %s\n", maxdb_connect_error()); exit(); } printf ("Connexion : %s\n.", maxdb_get_host_info($link)); maxdb_close($link); ?> ]]> </programlisting> &example.outputs; <screen> <![CDATA[ Connexion: localhost <...> ]]> </screen> </example> </refsect1> <refsect1> &reftitle.seealso; <para> <function>maxdb_connect</function>, <function>maxdb_init</function>, <function>maxdb_options</function>, <function>maxdb_ssl_set</function> et <function>maxdb_close</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-real-escape-string.xml?r=1.1&p=1 Index: phpdoc-fr/reference/maxdb/functions/maxdb-real-escape-string.xml +++ phpdoc-fr/reference/maxdb/functions/maxdb-real-escape-string.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- $Revision: 1.1 $ --> <!-- EN-Revision: 1.1 Maintainer: yannick Status: ready --> <refentry id="function.maxdb-real-escape-string"> <refnamediv> <refname>maxdb_real_escape_string</refname> <refpurpose> Echappe les caractères spéciaux d'une chaîne afin de l'utiliser dans une requpête SQL, en tenant compte du jeu de caractères courant de la connexion </refpurpose> </refnamediv> <refsect1> &reftitle.description; &title.procedural; <methodsynopsis> <type>string</type><methodname>maxdb_real_escape_string</methodname> <methodparam><type>resource</type><parameter>link</parameter></methodparam> <methodparam><type>string</type><parameter>escapestr</parameter></methodparam> </methodsynopsis> <para> Cette fonction est utilisée pour créer une chaîne SQL légale que vous pouvez utiliser dans une requête SQL. La chaîne <literal>escapestr</literal> est encodée en une chaîne échappée SQL, en tenant compte du jeu de caractères courant de la connexion. </para> <para> Les caractères encodés sont <literal>', "</literal>. </para> </refsect1> <refsect1> &reftitle.returnvalues; <para> Retourne une chaîne échappée. </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"); $city = "'s Hertogenbosch"; /* Cette requête échouera, car nous n'avons pas échappé $city */ if (!maxdb_query($link, "INSERT into temp.mycity VALUES ('11111','$city','NY')")) { printf("Erreur : %s\n", maxdb_sqlstate($link)); } $city = maxdb_real_escape_string($link, $city); /* Cette requête, avec $city échappé, fonctionnera */ if (maxdb_query($link, "INSERT into temp.mycity VALUES ('22222','$city','NY')")) { printf("%d ligne insérée.\n", maxdb_affected_rows($link)); } maxdb_close($link); ?> ]]> </programlisting> &example.outputs; <screen> <![CDATA[ Warning: maxdb_query(): -5016 POS(43) Missing delimiter: ) <...> Erreur : 42000 1 ligne insérée. ]]> </screen> </example> </refsect1> <refsect1> &reftitle.seealso; <para> <function>maxdb_character_set_name</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-real-query.xml?r=1.1&p=1 Index: phpdoc-fr/reference/maxdb/functions/maxdb-real-query.xml +++ phpdoc-fr/reference/maxdb/functions/maxdb-real-query.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- $Revision: 1.1 $ --> <!-- EN-Revision: 1.1 Maintainer: yannick Status: ready --> <refentry id="function.maxdb-real-query"> <refnamediv> <refname>maxdb_real_query</refname> <refpurpose>Exécute une requête SQL</refpurpose> </refnamediv> <refsect1> &reftitle.description; &title.procedural; <methodsynopsis> <type>bool</type><methodname>maxdb_real_query</methodname> <methodparam><type>resource</type><parameter>link</parameter></methodparam> <methodparam><type>string</type><parameter>query</parameter></methodparam> </methodsynopsis> <para> <function>maxdb_real_query</function> est identique au niveau fonctionnalité que la fonction <function>maxdb_query</function>. </para> <note> <para> Pour déterminer si une requête donnée doit retourner un jeu de résultats ou non, référez-vous à la fonction <function>maxdb_field_count</function>. </para> </note> </refsect1> <refsect1> &reftitle.returnvalues; <para> &return.success; </para> </refsect1> <refsect1> &reftitle.seealso; <para> <function>maxdb_query</function>, <function>maxdb_store_result</function> et <function>maxdb_use_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-report.xml?r=1.1&p=1 Index: phpdoc-fr/reference/maxdb/functions/maxdb-report.xml +++ phpdoc-fr/reference/maxdb/functions/maxdb-report.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- $Revision: 1.1 $ --> <!-- EN-Revision: 1.1 Maintainer: yannick Status: ready --> <refentry id="function.maxdb-report"> <refnamediv> <refname>maxdb_report</refname> <refpurpose>Active ou désactive le rapport interne des fonctions</refpurpose> </refnamediv> <refsect1> &reftitle.description; <methodsynopsis> <type>bool</type><methodname>maxdb_report</methodname> <methodparam><type>int</type><parameter>flags</parameter></methodparam> </methodsynopsis> </refsect1> <refsect1> &reftitle.examples; <example> <title>Style procédural</title> <programlisting role="php"> <![CDATA[ <?php /* Active les rapports */ maxdb_report(MAXDB_REPORT_ERROR); $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(); } /* Cette requête doit rapporter une erreur */ $result = maxdb_query($link,"SELECT Name FROM Nonexistingtable WHERE population > 50000"); maxdb_close($link); ?> ]]> </programlisting> &example.outputs; <screen> <![CDATA[ Warning: maxdb_query(): -4004 POS(18) Unknown table name:NONEXISTINGTABLE <...> ]]> </screen> </example> </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 --> http://cvs.php.net/co.php/phpdoc-fr/reference/maxdb/functions/maxdb-rollback.xml?r=1.1&p=1 Index: phpdoc-fr/reference/maxdb/functions/maxdb-rollback.xml +++ phpdoc-fr/reference/maxdb/functions/maxdb-rollback.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- $Revision: 1.1 $ --> <!-- EN-Revision: 1.1 Maintainer: yannick Status: ready --> <refentry id="function.maxdb-rollback"> <refnamediv> <refname>maxdb_rollback</refname> <refpurpose>Annule la transaction courante</refpurpose> </refnamediv> <refsect1> &reftitle.description; <methodsynopsis> <type>bool</type><methodname>maxdb_rollback</methodname> <methodparam><type>resource</type><parameter>link</parameter></methodparam> </methodsynopsis> <para> Annule la transaction courante pour la base de données spécifiée par le paramètre <parameter>link</parameter>. </para> </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(); } /* Désactive l'autocommit */ maxdb_autocommit($link, FALSE); maxdb_query($link, "CREATE TABLE temp.mycity LIKE hotel.city"); maxdb_query($link, "INSERT INTO temp.mycity SELECT * FROM hotel.city"); /* Exécution */ maxdb_commit($link); /* Efface toutes les lignes */ maxdb_query($link, "DELETE FROM temp.mycity"); if ($result = maxdb_query($link, "SELECT COUNT(*) FROM temp.mycity")) { $row = maxdb_fetch_row($result); printf("%d ligne dans la table mycity.\n", $row[0]); /* Libération du résultats */ maxdb_free_result($result); } /* Annulation */ maxdb_rollback($link); if ($result = maxdb_query($link, "SELECT COUNT(*) FROM temp.mycity")) { $row = maxdb_fetch_row($result); printf("%d lignes dans la table mycity (après annulation).\n", $row[0]); /* Libération du résultat */ maxdb_free_result($result); } /* Effacement de la table myCity */ maxdb_query($link, "DROP TABLE temp.mycity"); maxdb_close($link); ?> ]]> </programlisting> &example.outputs; <screen> <![CDATA[ 0 ligne dans la table mycity. 25 lignes dans la table mycity (après annulation). ]]> </screen> </example> </refsect1> <refsect1> &reftitle.seealso; <para> <function>maxdb_commit</function> <function>maxdb_autocommit</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-rpl-parse-enabled.xml?r=1.1&p=1 Index: phpdoc-fr/reference/maxdb/functions/maxdb-rpl-parse-enabled.xml +++ phpdoc-fr/reference/maxdb/functions/maxdb-rpl-parse-enabled.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- $Revision: 1.1 $ --> <!-- EN-Revision: 1.1 Maintainer: yannick Status: ready --> <refentry id="function.maxdb-rpl-parse-enabled"> <refnamediv> <refname>maxdb_rpl_parse_enabled</refname> <refpurpose>Vérifie si l'analyseur RPL est activé</refpurpose> </refnamediv> <refsect1> &reftitle.description; <methodsynopsis> <type>int</type><methodname>maxdb_rpl_parse_enabled</methodname> <methodparam><type>resource</type><parameter>link</parameter></methodparam> </methodsynopsis> &warn.experimental.func; </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-rpl-probe.xml?r=1.1&p=1 Index: phpdoc-fr/reference/maxdb/functions/maxdb-rpl-probe.xml +++ phpdoc-fr/reference/maxdb/functions/maxdb-rpl-probe.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- $Revision: 1.1 $ --> <!-- EN-Revision: 1.1 Maintainer: yannick Status: ready --> <refentry id="function.maxdb-rpl-probe"> <refnamediv> <refname>maxdb_rpl_probe</refname> <refpurpose>Test RPL</refpurpose> </refnamediv> <refsect1> &reftitle.description; <methodsynopsis> <type>bool</type><methodname>maxdb_rpl_probe</methodname> <methodparam><type>resource</type><parameter>link</parameter></methodparam> </methodsynopsis> &warn.experimental.func; </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-rpl-query-type.xml?r=1.1&p=1 Index: phpdoc-fr/reference/maxdb/functions/maxdb-rpl-query-type.xml +++ phpdoc-fr/reference/maxdb/functions/maxdb-rpl-query-type.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- $Revision: 1.1 $ --> <!-- EN-Revision: 1.1 Maintainer: yannick Status: ready --> <refentry id="function.maxdb-rpl-query-type"> <refnamediv> <refname>maxdb_rpl_query_type</refname> <refpurpose>Retourne une requête de type RPL</refpurpose> </refnamediv> <refsect1> &reftitle.description; <methodsynopsis> <type>int</type><methodname>maxdb_rpl_query_type</methodname> <methodparam><type>string</type><parameter>query</parameter></methodparam> </methodsynopsis> &warn.experimental.func; </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-select-db.xml?r=1.1&p=1 Index: phpdoc-fr/reference/maxdb/functions/maxdb-select-db.xml +++ phpdoc-fr/reference/maxdb/functions/maxdb-select-db.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- $Revision: 1.1 $ --> <!-- EN-Revision: 1.1 Maintainer: yannick Status: ready --> <refentry id="function.maxdb-select-db"> <refnamediv> <refname>maxdb_select_db</refname> <refpurpose>Sélectionne une base de données pour les requêtes</refpurpose> </refnamediv> <refsect1> &reftitle.description; <methodsynopsis> <type>bool</type><methodname>maxdb_select_db</methodname> <methodparam><type>resource</type><parameter>link</parameter></methodparam> <methodparam><type>string</type><parameter>dbname</parameter></methodparam> </methodsynopsis> <para> <function>maxdb_select_db</function> sélectionne la base de données (spécifiée par le paramètre <parameter>dbname</parameter>) a être utilisée lors de l'exécution de requête sur la connexion représentée par le paramètre <parameter>link</parameter>. </para> <note> <para> Cette fonction ne doit être utilisée que pour changer de base de données pour une connexion donnée. Vous pouvez sélectionner une base de données par défaut en utilisant le quatrième paramètres dans la fonction <function>maxdb_connect</function>. </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("Connect failed: %s\n", maxdb_connect_error()); exit(); } /* Retourne le nom de la base de données courante */ if ($result = maxdb_query($link, "SELECT SERVERDB FROM USERS WHERE USERNAME='MONA'")) { $row = maxdb_fetch_row($result); printf("La base de données par défaut est %s.\n", $row[0]); maxdb_free_result($result); } /* Changement de base de données en world */ maxdb_select_db($link, "XXXXXXXX"); /* Retourne le nom de la base de données courante */ if ($result = maxdb_query($link, "SELECT SERVERDB FROM USERS WHERE USERNAME='MONA'")) { $row = maxdb_fetch_row($result); printf("La base de données courante est %s.\n", $row[0]); maxdb_free_result($result); } maxdb_close($link); ?> ]]> </programlisting> &example.outputs; <screen> <![CDATA[ La base de données courante est DB76. Warning: maxdb_select_db(): -10709 Connection failed (RTE:database not running) <...> Warning: maxdb_query(): -10821 Session not connected [] <...> Warning: maxdb_close(): -10821 Session not connected [] <...> ]]> </screen> </example> </refsect1> <refsect1> &reftitle.seealso; <para> <function>maxdb_connect</function> et <function>maxdb_real_connect</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-send-long-data.xml?r=1.1&p=1 Index: phpdoc-fr/reference/maxdb/functions/maxdb-send-long-data.xml +++ phpdoc-fr/reference/maxdb/functions/maxdb-send-long-data.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- $Revision: 1.1 $ --> <!-- EN-Revision: 1.1 Maintainer: yannick Status: ready --> <refentry id="function.maxdb-send-long-data"> <refnamediv> <refname>maxdb_send_long_data</refname> <refpurpose>Alias de <function>maxdb_stmt_send_long_data</function></refpurpose> </refnamediv> <refsect1> &reftitle.description; <para> <function>maxdb_send_long_data</function> &isalias;<function>maxdb_stmt_send_long_data</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-send-query.xml?r=1.1&p=1 Index: phpdoc-fr/reference/maxdb/functions/maxdb-send-query.xml +++ phpdoc-fr/reference/maxdb/functions/maxdb-send-query.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- $Revision: 1.1 $ --> <!-- EN-Revision: 1.1 Maintainer: yannick Status: ready --> <refentry id="function.maxdb-send-query"> <refnamediv> <refname>maxdb_send_query</refname> <refpurpose>Envoi une requête et retourne</refpurpose> </refnamediv> <refsect1> &reftitle.description; <methodsynopsis> <type>bool</type><methodname>maxdb_send_query</methodname> <methodparam><type>resource</type><parameter>link</parameter></methodparam> <methodparam><type>string</type><parameter>query</parameter></methodparam> </methodsynopsis> &warn.experimental.func; </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-server-end.xml?r=1.1&p=1 Index: phpdoc-fr/reference/maxdb/functions/maxdb-server-end.xml +++ phpdoc-fr/reference/maxdb/functions/maxdb-server-end.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- $Revision: 1.1 $ --> <!-- EN-Revision: 1.1 Maintainer: yannick Status: ready --> <refentry id="function.maxdb-server-end"> <refnamediv> <refname>maxdb_server_end</refname> <refpurpose>Eteint un serveur embarqué</refpurpose> </refnamediv> <refsect1> &reftitle.description; <methodsynopsis> <type>void</type><methodname>maxdb_server_end</methodname> <void/> </methodsynopsis> &warn.experimental.func; </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-server-init.xml?r=1.1&p=1 Index: phpdoc-fr/reference/maxdb/functions/maxdb-server-init.xml +++ phpdoc-fr/reference/maxdb/functions/maxdb-server-init.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- $Revision: 1.1 $ --> <!-- EN-Revision: 1.1 Maintainer: yannick Status: ready --> <refentry id="function.maxdb-server-init"> <refnamediv> <refname>maxdb_server_init</refname> <refpurpose>Initialise un serveur embarqué</refpurpose> </refnamediv> <refsect1> &reftitle.description; <methodsynopsis> <type>bool</type><methodname>maxdb_server_init</methodname> <methodparam choice="opt"><type>array</type><parameter>server</parameter></methodparam> <methodparam choice="opt"><type>array</type><parameter>groups</parameter></methodparam> </methodsynopsis> &warn.experimental.func; </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-set-opt.xml?r=1.1&p=1 Index: phpdoc-fr/reference/maxdb/functions/maxdb-set-opt.xml +++ phpdoc-fr/reference/maxdb/functions/maxdb-set-opt.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- $Revision: 1.1 $ --> <!-- EN-Revision: 1.1 Maintainer: yannick Status: ready --> <refentry id="function.maxdb-set-opt"> <refnamediv> <refname>maxdb_set_opt</refname> <refpurpose>Alias de <function>maxdb_options</function></refpurpose> </refnamediv> <refsect1> &reftitle.description; <para> <function>maxdb_set_opt</function> &isalias;<function>maxdb_options</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-sqlstate.xml?r=1.1&p=1 Index: phpdoc-fr/reference/maxdb/functions/maxdb-sqlstate.xml +++ phpdoc-fr/reference/maxdb/functions/maxdb-sqlstate.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- $Revision: 1.1 $ --> <!-- EN-Revision: 1.1 Maintainer: yannick Status: ready --> <refentry id="function.maxdb-sqlstate"> <refnamediv> <refname>maxdb_sqlstate</refname> <refpurpose>Retourne l'erreur SQLSTATE depuis la dernière opération MaxDB</refpurpose> </refnamediv> <refsect1> &reftitle.description; &title.procedural; <methodsynopsis> <type>string</type><methodname>maxdb_sqlstate</methodname> <methodparam><type>resource</type><parameter>link</parameter></methodparam> </methodsynopsis> <para> Retourne une chaîne contenant le code erreur SQLSTATE pour la dernière erreur. Le code erreur est composé de cinq caractères. <literal>'00000'</literal> signifie aucune erreur. Les valeurs sont spécifiées par ANSI SQL et ODBC. </para> <note> <para> Notez que toutes les erreurs MaxDB ne sont pas encore implémentées dans SQLSTATE. La valeur <literal>HY000</literal> (erreur générale) est utilisée pour les erreurs non implémentées. </para> </note> </refsect1> <refsect1> &reftitle.returnvalues; <para> Retourne une chaîne contenant le code erreur SQLSTATE pour la dernière erreur. Le code erreur est composé de cinq caractères. <literal>'00000'</literal> signifie aucune erreur. </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(); } /* La table City existe déjà, donc nous devrions avoir une erreur */ if (!maxdb_query($link, "CREATE TABLE hotel.city (ID INT, Name VARCHAR(30))")) { printf("Erreur - SQLSTATE %s.\n", maxdb_sqlstate($link)); } maxdb_close($link); ?> ]]> </programlisting> &example.outputs; <screen> <![CDATA[ Warning: maxdb_query(): -6000 POS(20) Duplicate table name:CITY [I6000] <...> Erreur - SQLSTATE I6000. ]]> </screen> </example> </refsect1> <refsect1> &reftitle.seealso; <para> <function>maxdb_errno</function>, <function>maxdb_error</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-ssl-set.xml?r=1.1&p=1 Index: phpdoc-fr/reference/maxdb/functions/maxdb-ssl-set.xml +++ phpdoc-fr/reference/maxdb/functions/maxdb-ssl-set.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- $Revision: 1.1 $ --> <!-- EN-Revision: 1.1 Maintainer: yannick Status: ready --> <refentry id="function.maxdb-ssl-set"> <refnamediv> <refname>maxdb_ssl_set</refname> <refpurpose>Utilisé pour établir une connexion sécurisée utilisant SSL</refpurpose> </refnamediv> <refsect1> &reftitle.description; &title.procedural; <methodsynopsis> <type>bool</type><methodname>maxdb_ssl_set</methodname> <methodparam><type>resource</type><parameter>link</parameter></methodparam> <methodparam choice='opt'><type>string</type><parameter>key</parameter></methodparam> <methodparam choice='opt'><type>string</type><parameter>cert</parameter></methodparam> <methodparam choice='opt'><type>string</type><parameter>ca</parameter></methodparam> <methodparam choice='opt'><type>string</type><parameter>capath</parameter></methodparam> <methodparam choice='opt'><type>string</type><parameter>cipher</parameter></methodparam> </methodsynopsis> &warn.experimental.func; </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-stat.xml?r=1.1&p=1 Index: phpdoc-fr/reference/maxdb/functions/maxdb-stat.xml +++ phpdoc-fr/reference/maxdb/functions/maxdb-stat.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- $Revision: 1.1 $ --> <!-- EN-Revision: 1.1 Maintainer: yannick Status: ready --> <refentry id="function.maxdb-stat"> <refnamediv> <refname>maxdb_stat</refname> <refpurpose>Récupère le statut courant du système</refpurpose> </refnamediv> <refsect1> &reftitle.description; &title.procedural; <methodsynopsis> <type>mixed</type><methodname>maxdb_stat</methodname> <methodparam><type>resource</type><parameter>link</parameter></methodparam> </methodsynopsis> <para> <function>maxdb_stat</function> retourne une chaîne contenant plusieurs informations concernant le serveur MaxDB. </para> </refsect1> <refsect1> &reftitle.returnvalues; <para> Une chaîne décrivant le statut du serveur ou &false; si une erreur survient. </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(); } printf("Statut du système : %s\n", maxdb_stat($link)); maxdb_close($link); ?> ]]> </programlisting> &example.outputs; <screen> <![CDATA[ Statut du système : Kernel 7<...> ]]> </screen> </example> </refsect1> <refsect1> &reftitle.seealso; <para> <function>maxdb_get_server_info</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-affected-rows.xml?r=1.1&p=1 Index: phpdoc-fr/reference/maxdb/functions/maxdb-stmt-affected-rows.xml +++ phpdoc-fr/reference/maxdb/functions/maxdb-stmt-affected-rows.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-affected-rows"> <refnamediv> <refname>maxdb_stmt_affected_rows</refname> <refpurpose>Retourne le nombre total de lignes modifiées, effacées ou insérées par la dernière requête </refpurpose> </refnamediv> <refsect1> &reftitle.description; &title.procedural; <methodsynopsis> <type>mixed</type><methodname>maxdb_stmt_affected_rows</methodname> <methodparam><type>resource</type><parameter>stmt</parameter></methodparam> </methodsynopsis> <para> <function>maxdb_stmt_affected_rows</function> retourne le nombre de lignes affectées par la dernière requête INSERT, UPDATE ou DELETE. Si la dernière requête est invalide ou si le nombre de lignes ne peut être déterminé, cette fonction retournera -1. </para> </refsect1> <refsect1> &reftitle.returnvalues; <para> Un entier plus grand que zéro indique le nombre de lignes affectées ou récupérées. Zéro indique qu'aucun enregistrement n'a été mis à jour pour une requête UPDATE/DELETE; aucune ligne ne correspond à la clause WHERE d'une requête ou bien qu'aucun requête n'a été exécutée pour le moment. -1 indique que la requête a retournée une erreur ou bien que le nombre de lignes n'a pu être déterminé. </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(); } /* Création d'une table temporaire */ maxdb_query($link, "CREATE TABLE temp.mycity LIKE hotel.city"); $query = "INSERT INTO temp.mycity SELECT * FROM hotel.city WHERE state LIKE ?"; /* Prépare une requête */ if ($stmt = maxdb_prepare($link, $query)) { /* Lie les variables à un endroit */ $code = 'N%'; maxdb_stmt_bind_param($stmt, "s", $code); /* Exécute la requête */ maxdb_stmt_execute($stmt); printf("Lignes insérées : %d\n", maxdb_stmt_affected_rows($stmt)); /* Fermeture de la requête */ maxdb_stmt_close($stmt); } /* Fermeture de la connexion */ maxdb_close($link); ?> ]]> </programlisting> &example.outputs; <screen> <![CDATA[ Lignes insérées : 4 ]]> </screen> </example> </refsect1> <refsect1> &reftitle.seealso; <para> <function>maxdb_stmt_num_rows</function> et <function>maxdb_prepare</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-bind-param.xml?r=1.1&p=1 Index: phpdoc-fr/reference/maxdb/functions/maxdb-stmt-bind-param.xml +++ phpdoc-fr/reference/maxdb/functions/maxdb-stmt-bind-param.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-bind-param"> <refnamediv> <refname>maxdb_stmt_bind_param</refname> <refpurpose>Lie les variables à une requête préparée en tant que paramètres</refpurpose> </refnamediv> <refsect1> &reftitle.description; &title.procedural; <methodsynopsis> <type>bool</type><methodname>maxdb_stmt_bind_param</methodname> <methodparam><type>resource</type><parameter>stmt</parameter></methodparam> <methodparam><type>string</type><parameter>types</parameter></methodparam> <methodparam><type>mixed</type><parameter>&amp;var1</parameter></methodparam> <methodparam choice="opt"><type>mixed</type><parameter>&amp;...</parameter></methodparam> </methodsynopsis> <para> <function>maxdb_stmt_bind_param</function> est utilisé pour lier les variables pour les marqueurs dans la requête SQL qui a été passée à <function>maxdb_prepare</function>. La chaîne <parameter>types</parameter> contient un ou plusieurs caractères qui spécifient le(s) type(s) correspondant aux variables liées. <table> <title>Caractères spécifiant les types</title> <tgroup cols='2'> <thead> <row> <entry>Caractères</entry> <entry>Description</entry> </row> </thead> <tbody> <row> <entry>i</entry> <entry>correspond à une variable de type &integer;</entry> </row> <row> <entry>d</entry> <entry>correspond à une variable de type &double;</entry> </row> <row> <entry>s</entry> <entry>correspond à une variable de type &string;</entry> </row> <row> <entry>b</entry> <entry>correspond à une variable de type &blob; et sera envoyé dans le paquet</entry> </row> </tbody> </tgroup> </table> </para> </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 (!$link) { 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"); $stmt = maxdb_prepare($link, "INSERT INTO temp.mycity VALUES (?, ?, ?)"); maxdb_stmt_bind_param($stmt, 'sss', $zip, $name, $state); $zip = '11111'; $name = 'Georgetown'; $state = 'NY'; /* Exécution de la requête préparée */ maxdb_stmt_execute($stmt); printf("%d ligne insérée.\n", maxdb_stmt_affected_rows($stmt)); /* Fermeture de la requête */ maxdb_stmt_close($stmt); /* Nettoyage de la table CountryLanguage */ maxdb_query($link, "DELETE FROM temp.mycity WHERE name='Georgetown'"); printf("%d ligne effacée.\n", maxdb_affected_rows($link)); /* Fermeture de la connexion */ maxdb_close($link); ?> ]]> </programlisting> &example.outputs; <screen> <![CDATA[ 1 ligne insérée. 1 ligne effacée. ]]> </screen> </example> </refsect1> <refsect1> &reftitle.seealso; <para> <function>maxdb_stmt_bind_result</function>, <function>maxdb_stmt_execute</function>, <function>maxdb_stmt_fetch</function>, <function>maxdb_prepare</function>, <function>maxdb_stmt_send_long_data</function>, <function>maxdb_stmt_errno</function> et <function>maxdb_stmt_error</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-bind-result.xml?r=1.1&p=1 Index: phpdoc-fr/reference/maxdb/functions/maxdb-stmt-bind-result.xml +++ phpdoc-fr/reference/maxdb/functions/maxdb-stmt-bind-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-bind-result"> <refnamediv> <refname>maxdb_stmt_bind_result</refname> <refpurpose>Lie les variables à une requête préparée pour stockage du résultat</refpurpose> </refnamediv> <refsect1> &reftitle.description; &title.procedural; <methodsynopsis> <type>bool</type><methodname>maxdb_stmt_bind_result</methodname> <methodparam><type>resource</type><parameter>stmt</parameter></methodparam> <methodparam><type>mixed</type><parameter>&amp;var1</parameter></methodparam> <methodparam choice="opt"><type>mixed</type><parameter>&amp;...</parameter></methodparam> </methodsynopsis> <para> <function>maxdb_stmt_bind_result</function> est utilisé pour associer (lier) les colonnes du jeu de résultats à des variables. Lorsque <function>maxdb_stmt_fetch</function> est appelé pour récupérer les données, Le protocole client/serveur MaxDB place les données pour les colonnes liées dans les variables spécifiées <parameter>var1, ...</parameter>. </para> <note> <para> Notez que toutes les colonnes doivent être liées avant l'appel à <function>maxdb_stmt_fetch</function>. Les variables liées peuvent être modifiées en leur type &php; correspondant suivant le type des colonnes. </para> <para> Une colonne peut être liée ou reliée à n'importe quel moment, y compris après la récupération d'une partie du jeu de résultats. La nouvelle association prend effet au prochain appel à <function>maxdb_stmt_fetch</function>. </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 (!$link) { printf("Connect failed: %s\n", maxdb_connect_error()); exit(); } /* Préparation de la requête */ if ($stmt = maxdb_prepare($link, "SELECT zip, name FROM hotel.city ORDER BY name")) { maxdb_stmt_execute($stmt); /* Lie les variables à la requête préparée */ maxdb_stmt_bind_result($stmt, $col1, $col2); /* Récupération des valeurs */ while (maxdb_stmt_fetch($stmt)) { printf("%s %s\n", $col1, $col2); } /* 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_stmt_bind_param</function>, <function>maxdb_stmt_execute</function>, <function>maxdb_stmt_fetch</function>, <function>maxdb_prepare</function>, <function>maxdb_stmt_prepare</function>, <function>maxdb_stmt_init</function>, <function>maxdb_stmt_errno</function> et <function>maxdb_stmt_error</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-close-long-data.xml?r=1.1&p=1 Index: phpdoc-fr/reference/maxdb/functions/maxdb-stmt-close-long-data.xml +++ phpdoc-fr/reference/maxdb/functions/maxdb-stmt-close-long-data.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-close-long-data"> <refnamediv> <refname>maxdb_stmt_close_long_data</refname> <refpurpose>Termine une séquence <function>maxdb_stmt_send_long_data</function></refpurpose> </refnamediv> <refsect1> &reftitle.description; &title.procedural; <methodsynopsis> <type>bool</type><methodname>maxdb_stmt_send_long_data</methodname> <methodparam><type>resource</type><parameter>stmt</parameter></methodparam> <methodparam><type>int</type><parameter>param_nr</parameter></methodparam> </methodsynopsis> <para> Cette fonction doit être appelée après une séquence de <function>maxdb_stmt_send_long_data</function>, qui a été commencée après <function>maxdb_execute</function>. </para> <para> <parameter>param_nr</parameter> indique quel paramètre à associer avec la fin des données. Les paramètres sont numérotés en commençant à 0. </para> </refsect1> <refsect1> &reftitle.returnvalues; <para>&return.success;</para> </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-close.xml?r=1.1&p=1 Index: phpdoc-fr/reference/maxdb/functions/maxdb-stmt-close.xml +++ phpdoc-fr/reference/maxdb/functions/maxdb-stmt-close.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-close"> <refnamediv> <refname>maxdb_stmt_close</refname> <refpurpose>Ferme une requête préparée</refpurpose> </refnamediv> <refsect1> &reftitle.description; &title.procedural; <methodsynopsis> <type>bool</type><methodname>maxdb_stmt_close</methodname> <methodparam><type>resource</type><parameter>stmt</parameter></methodparam> </methodsynopsis> <para> Ferme une requête préparée. <function>maxdb_stmt_close</function> désalloue également le gestionnaire de requête représenté par <parameter>stmt</parameter>. Si la requête courante est en attente ou à des résultats non lus, cette fonction s'interrompt et ainsi, la prochaine requête peut être exécutée. </para> </refsect1> <refsect1> &reftitle.returnvalues; <para>&return.success;</para> </refsect1> <refsect1> &reftitle.seealso; <para> <function>maxdb_prepare</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-data-seek.xml?r=1.1&p=1 Index: phpdoc-fr/reference/maxdb/functions/maxdb-stmt-data-seek.xml +++ phpdoc-fr/reference/maxdb/functions/maxdb-stmt-data-seek.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-data-seek"> <refnamediv> <refname>maxdb_stmt_data_seek</refname> <refpurpose>Se positionne sur une ligne arbitraire dans le jeu de résultats</refpurpose> </refnamediv> <refsect1> &reftitle.description; &title.procedural; <methodsynopsis> <type>bool</type><methodname>maxdb_stmt_data_seek</methodname> <methodparam><type>resource</type><parameter>statement</parameter></methodparam> <methodparam><type>int</type><parameter>offset</parameter></methodparam> </methodsynopsis> <para> <function>maxdb_stmt_data_seek</function> déplace le pointeur sur une ligne arbitraire <parameter>offset</parameter> du jeu de résultat <parameter>statement</parameter>. Le paramètre <parameter>offset</parameter> doit être compris entre zéro et le nombre total de lignes moins un (0..<function>maxdb_stmt_num_rows</function> - 1). </para> </refsect1> <refsect1> &reftitle.returnvalues; <para> &return.success; </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(); } $query = "SELECT name, zip FROM hotel.city ORDER BY name"; if ($stmt = maxdb_prepare($link, $query)) { /* Exécute une requête */ maxdb_stmt_execute($stmt); /* Lie les variables de résultats */ maxdb_stmt_bind_result($stmt, $name, $code); /* Stock le résultat */ maxdb_stmt_store_result($stmt); /* Se place sur la ligne no. 400 */ maxdb_stmt_data_seek($stmt, 5); /* Récupère les valeurs */ maxdb_stmt_fetch($stmt); printf ("Ville : %s Code postal : %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[ Ville : Dallas Code postal : 75243 ]]> </screen> </example> </refsect1> <refsect1> &reftitle.seealso; <para> <function>maxdb_prepare</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 -->
« previous php.doc.fr (#3846) next »