cvs: phpdoc-fr /reference/maxdb/functions maxdb-affected-rows.xml maxdb-autocommit.xml maxdb-bind-param.xml maxdb-bind-result.xml
maxdb-change-user.xml maxdb-character-set-name.xml maxdb-client-encoding.xml maxdb-close-long-data.xml maxdb-close.xml maxdb-commit.xml
maxdb-connect-errno.xml maxdb-connect-error.xml maxdb-connect.xml

From: Date: Sun, 16 Jan 2005 21:32:53 +0000
Subject: cvs: phpdoc-fr /reference/maxdb/functions maxdb-affected-rows.xml maxdb-autocommit.xml maxdb-bind-param.xml maxdb-bind-result.xml
maxdb-change-user.xml maxdb-character-set-name.xml maxdb-client-encoding.xml maxdb-close-long-data.xml maxdb-close.xml maxdb-commit.xml
maxdb-connect-errno.xml maxdb-connect-error.xml maxdb-connect.xml
Groups: php.doc.fr 
Request: Send a blank email to doc-fr+get-3826@lists.php.net to get a copy of this message
yannick Sun Jan 16 16:32:53 2005 EDT Added files: /phpdoc-fr/reference/maxdb/functions maxdb-affected-rows.xml maxdb-autocommit.xml maxdb-bind-param.xml maxdb-bind-result.xml maxdb-change-user.xml maxdb-character-set-name.xml maxdb-client-encoding.xml maxdb-close-long-data.xml maxdb-close.xml maxdb-commit.xml maxdb-connect-errno.xml maxdb-connect-error.xml maxdb-connect.xml Log: initial translation

http://cvs.php.net/co.php/phpdoc-fr/reference/maxdb/functions/maxdb-affected-rows.xml?r=1.1&p=1 Index: phpdoc-fr/reference/maxdb/functions/maxdb-affected-rows.xml +++ phpdoc-fr/reference/maxdb/functions/maxdb-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-affected-rows"> <refnamediv> <refname>maxdb_affected_rows</refname> <refpurpose> Récupère le nombre de lignes affectées par la dernière opération MaxDB </refpurpose> </refnamediv> <refsect1> &reftitle.description; &title.procedural; <methodsynopsis> <type>mixed</type><methodname>maxdb_affected_rows</methodname> <methodparam><type>resource</type><parameter>link</parameter></methodparam> </methodsynopsis> <para> <function>maxdb_affected_rows</function> retourne le nombre de lignes affectées par la dernière requête INSERT, UPDATE ou DELETE associée avec le paramètre <parameter>link</parameter> fourni. Si ce nombre ne peut pas être déterminé, cette fonction retournera -1. </para> <note> <para> Pour les requêtes SELECT, <function>maxdb_affected_rows</function> fonctionne comme la fonction <function>maxdb_num_rows</function>. </para> </note> <para> La fonction <function>maxdb_affected_rows</function> ne fonctionne qu'avec les requêtes qui modifient une table. Pour récupérer le nombre de lignes depuis une requête SELECT, utilisez plutôt la fonction <function>maxdb_num_rows</function>. </para> </refsect1> <refsect1> &reftitle.returnvalues; <para> Un entier plus grand que 0 indique le nombre de lignes affectées ou récupérées. Zéro indique qu'aucune ligne n'a été mise à jour pour une requête de type SELECT, qu'aucun ligne ne correspond à une clause WHERE dans une requête ou bien qu'aucune requête n'a été exécutée. -1 indique que le nombre de lignes affectées n'a pû ê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"); if (!$link) { printf("Impossible de se connecter à localhost. Erreur : %s\n", maxdb_connect_error()); exit(); } maxdb_report (MAXDB_REPORT_OFF); maxdb_query($link,"DROP TABLE mycustomer"); maxdb_report (MAXDB_REPORT_ERROR); /* Insertion de lignes */ maxdb_query($link, "CREATE TABLE mycustomer AS SELECT * from hotel.customer"); printf("Nombres de lignes affectées (INSERT): %d\n", maxdb_affected_rows($link)); maxdb_query($link, "ALTER TABLE mycustomer ADD Status int default 0"); /* Mise à jour de lignes */ maxdb_query($link, "UPDATE mycustomer SET Status=1 WHERE cno > 50"); printf("Nombres de lignes affectées (UPDATE): %d\n", maxdb_affected_rows($link)); /* Effacement de lignes */ maxdb_query($link, "DELETE FROM mycustomer WHERE cno < 50"); printf("Nombres de lignes affectées (DELETE): %d\n", maxdb_affected_rows($link)); /* Sélectionne toutes les lignes */ $result = maxdb_query($link, "SELECT title FROM mycustomer"); printf("Nombres de lignes affectées (SELECT): %d\n", maxdb_affected_rows($link)); maxdb_free_result($result); /* Effacement d'une table */ maxdb_query($link, "DROP TABLE mycustomer"); /* Fermeture de la connexion */ maxdb_close($link); ?> ]]> </programlisting> </example> &example.outputs; <screen> <![CDATA[ Affected rows (INSERT): 15 Affected rows (UPDATE): 15 Affected rows (DELETE): 0 Affected rows (SELECT): -1 ]]> </screen> </refsect1> <refsect1> &reftitle.seealso; <para> <function>maxdb_num_rows</function> et <function>maxdb_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-autocommit.xml?r=1.1&p=1 Index: phpdoc-fr/reference/maxdb/functions/maxdb-autocommit.xml +++ phpdoc-fr/reference/maxdb/functions/maxdb-autocommit.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- $Revision: 1.1 $ --> <!-- EN-Revision: 1.1 Maintainer: yannick Status: ready --> <refentry id="function.maxdb-autocommit"> <refnamediv> <refname>maxdb_autocommit</refname> <refpurpose> Active ou désactive l'auto-commit des modifications de la base de données </refpurpose> </refnamediv> <refsect1> &reftitle.description; &title.procedural; <methodsynopsis> <type>bool</type><methodname>maxdb_autocommit</methodname> <methodparam><type>resource</type><parameter>link</parameter></methodparam> <methodparam><type>bool</type><parameter>mode</parameter></methodparam> </methodsynopsis> <para> <function>maxdb_autocommit</function> est utilisé pour activer ou désactiver le mode auto-commit sur les requêtes pour la connexion à la base de données représentée par la ressource <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"); if (!$link) { printf("Impossible de se connecter à localhost. Erreur : %s\n", maxdb_connect_error()); exit(); } /* Active l'auto-commit */ maxdb_autocommit($link, TRUE); /* Fermeture de la connexion */ maxdb_close($link); ?> ]]> </programlisting> </example> <para> L'exemple ci-dessus ne produit aucun affichage. </para> </refsect1> <refsect1> &reftitle.seealso; <para> <function>maxdb_commit</function> et <function>maxdb_rollback</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-bind-param.xml?r=1.1&p=1 Index: phpdoc-fr/reference/maxdb/functions/maxdb-bind-param.xml +++ phpdoc-fr/reference/maxdb/functions/maxdb-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-bind-param"> <refnamediv> <refname>maxdb_bind_param</refname> <refpurpose>Alias de <function>maxdb_stmt_bind_param</function></refpurpose> </refnamediv> <refsect1> &reftitle.description; <para> <function>maxdb_bind_param</function> &isalias; <function>maxdb_stmt_bind_param</function>. Pour une description détaillée, référez-vous à la description de la fonction <function>maxdb_stmt_bind_param</function>. </para> <note> <para> <function>maxdb_bind_param</function> est déprécié et sera supprimé. </para> </note> </refsect1> <refsect1> &reftitle.seealso; <para> <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-bind-result.xml?r=1.1&p=1 Index: phpdoc-fr/reference/maxdb/functions/maxdb-bind-result.xml +++ phpdoc-fr/reference/maxdb/functions/maxdb-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-bind-result"> <refnamediv> <refname>maxdb_bind_result</refname> <refpurpose>Alias de <function>maxdb_stmt_bind_result</function></refpurpose> </refnamediv> <refsect1> &reftitle.description; <para> <function>maxdb_bind_result</function> &isalias; <function>maxdb_stmt_bind_result</function>. Pour une description détaillée, référez-vous à la description de la fonction <function>maxdb_stmt_bind_result</function>. </para> <note> <para> <function>maxdb_bind_result</function> est déprécié et sera supprimé. </para> </note> </refsect1> <refsect1> &reftitle.seealso; <para> <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-change-user.xml?r=1.1&p=1 Index: phpdoc-fr/reference/maxdb/functions/maxdb-change-user.xml +++ phpdoc-fr/reference/maxdb/functions/maxdb-change-user.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- $Revision: 1.1 $ --> <!-- EN-Revision: 1.1 Maintainer: yannick Status: ready --> <refentry id="function.maxdb-change-user"> <refnamediv> <refname>maxdb_change_user</refname> <refpurpose> Modifie l'utilisateur de la connexion à la base de données spécifiée </refpurpose> </refnamediv> <refsect1> &reftitle.description; &title.procedural; <methodsynopsis> <type>bool</type><methodname>maxdb_change_user</methodname> <methodparam><type>resource</type><parameter>link</parameter></methodparam> <methodparam><type>string</type><parameter>user</parameter></methodparam> <methodparam><type>string</type><parameter>password</parameter></methodparam> <methodparam><type>string</type><parameter>database</parameter></methodparam> </methodsynopsis> <para> <function>maxdb_change_user</function> est utilisé pour modifier l'utilisateur de la connexion à la base de données spécifiée par le paramètre <parameter>link</parameter> et pour définir la base de données courant à celle spécifiée par le paramètre <parameter>database</parameter>. </para> <para> Pour modifier avec succès un utilisateur, les paramètres <parameter>username</parameter> et <parameter>password</parameter> doivent être fournis et cet utilisateur doit avoir des permissions suffisantes pour accéder à la base de données désirées. Si pour une raison quelconque l'identification échoue, l'utilisateur courant sera conservé. </para> <note> <para> L'utilisation de cette commande fera que la connexion courante à la base de données sera renouvellée, comme si l'on avait fait une nouvelle connexion, indépendamment du succès de l'opération. Cette réinitialisation effectue un rollback sur toutes les transactions actives, ferme toutes les tables temporaires et déverrouille toutes les tables verrouillées. </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("Echec de la connexion : %s\n", maxdb_connect_error()); exit(); } if ($result = maxdb_query($link, "SELECT * FROM dual")) { $row = maxdb_fetch_row($result); printf("Result: %s\n", $row[0]); maxdb_free_result($result); } /* réinitialisation de tout et sélection d'une nouvelle base de données */ if (!maxdb_change_user($link, $user, $passwd, "XXXXXXX")) { printf("La base de données ne fonctionne pas\n"); } else { printf("La base de données fonctionne\n"); } /* Fermeture de la connexion */ maxdb_close($link); ?> ]]> </programlisting> </example> &example.outputs; <screen> <![CDATA[ Result: a PHP Warning: maxdb_change_user(): -10709 Connection failed <...> Database not running PHP Warning: maxdb_close(): -10821 Session not connected <...> ]]> </screen> </refsect1> <refsect1> &reftitle.seealso; <para> <function>maxdb_connect</function> et <function>maxdb_select_db</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-character-set-name.xml?r=1.1&p=1 Index: phpdoc-fr/reference/maxdb/functions/maxdb-character-set-name.xml +++ phpdoc-fr/reference/maxdb/functions/maxdb-character-set-name.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- $Revision: 1.1 $ --> <!-- EN-Revision: 1.1 Maintainer: yannick Status: ready --> <refentry id="function.maxdb-character-set-name"> <refnamediv> <refname>maxdb_character_set_name</refname> <refpurpose> Retourne le jeu de caractères par défaut pour la connexion à la base de données </refpurpose> </refnamediv> <refsect1> &reftitle.description; &title.procedural; <methodsynopsis> <type>string</type><methodname>maxdb_character_set_name</methodname> <methodparam><type>resource</type><parameter>link</parameter></methodparam> </methodsynopsis> <para> Retourne le jeu de caractères courant défini pour la connexion à la base de données spécifiée par le paramètre <parameter>link</parameter>. </para> </refsect1> <refsect1> &reftitle.returnvalues; <para> Le jeu de caractères par défaut défini pour la connexion courante, soit ascii, soit unicode. </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(); } /* Affiche le jeu de caractères courant */ $charset = maxdb_character_set_name($link); printf ("Le jeu de caractères courant est %s\n",$charset); /* Fermeture de la connexion */ maxdb_close($link); ?> ]]> </programlisting> </example> &example.outputs; <screen> <![CDATA[ Le jeu de caractères courant est ascii ]]> </screen> </refsect1> <refsect1> &reftitle.seealso; <para> <function>maxdb_client_encoding</function>. <function>maxdb_real_escape_string</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-client-encoding.xml?r=1.1&p=1 Index: phpdoc-fr/reference/maxdb/functions/maxdb-client-encoding.xml +++ phpdoc-fr/reference/maxdb/functions/maxdb-client-encoding.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- $Revision: 1.1 $ --> <!-- EN-Revision: 1.1 Maintainer: yannick Status: ready --> <refentry id="function.maxdb-client-encoding"> <refnamediv> <refname>maxdb_client_encoding</refname> <refpurpose>Alias de <function>maxdb_character_set_name</function></refpurpose> </refnamediv> <refsect1> &reftitle.description; <para> <function>maxdb_client_encoding</function> &isalias; <function>maxdb_character_set_name</function>. Pour une description détaillée, référez-vous à la documentation de la fonction <function>maxdb_character_set_name</function>. </para> </refsect1> <refsect1> &reftitle.seealso; <para> <function>maxdb_client_encoding</function> et <function>maxdb_real_escape_string</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-close-long-data.xml?r=1.1&p=1 Index: phpdoc-fr/reference/maxdb/functions/maxdb-close-long-data.xml +++ phpdoc-fr/reference/maxdb/functions/maxdb-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-close-long-data"> <refnamediv> <refname>maxdb_close_long_data</refname> <refpurpose>Alias de <function>maxdb_stmt_close_long_data</function></refpurpose> </refnamediv> <refsect1> &reftitle.description; <para> <function>maxdb_close_long_data</function> &isalias; <function>maxdb_stmt_close_long_data</function>. Pour une description détaillée, référez-vous à la documentation de la fonction <function>maxdb_stmt_close_long_data</function>. </para> <note> <para> <function>maxdb_close_long_data</function> est déprécié et sera supprimé. </para> </note> </refsect1> <refsect1> &reftitle.seealso; <para> <function>maxdb_stmt_close_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-close.xml?r=1.1&p=1 Index: phpdoc-fr/reference/maxdb/functions/maxdb-close.xml +++ phpdoc-fr/reference/maxdb/functions/maxdb-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-close"> <refnamediv> <refname>maxdb_close</refname> <refpurpose> Ferme une connexion à une base de données</refpurpose> </refnamediv> <refsect1> &reftitle.description; &title.procedural; <methodsynopsis> <type>bool</type><methodname>maxdb_close</methodname> <methodparam><type>resource</type><parameter>link</parameter></methodparam> </methodsynopsis> <para> <function>maxdb_close</function> ferme une connexion à une 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.seealso; <para> <function>maxdb_connect</function>, <function>maxdb_init</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-commit.xml?r=1.1&p=1 Index: phpdoc-fr/reference/maxdb/functions/maxdb-commit.xml +++ phpdoc-fr/reference/maxdb/functions/maxdb-commit.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- $Revision: 1.1 $ --> <!-- EN-Revision: 1.1 Maintainer: yannick Status: ready --> <refentry id="function.maxdb-commit"> <refnamediv> <refname>maxdb_commit</refname> <refpurpose>Valide la transaction courante</refpurpose> </refnamediv> <refsect1> &reftitle.description; &title.procedural; <methodsynopsis> <type>bool</type><methodname>maxdb_commit</methodname> <methodparam><type>resource</type><parameter>link</parameter></methodparam> </methodsynopsis> <para> <function>maxdb_commit</function> valide la transaction courante pour la connexion à 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 (!$link) { printf("Connect failed: %s\n", maxdb_connect_error()); exit(); } /* Désactive l'auto-commit */ maxdb_autocommit($link, FALSE); maxdb_report (MAXDB_REPORT_OFF); maxdb_query($link,"DROP TABLE mycustomer"); maxdb_report (MAXDB_REPORT_ERROR); maxdb_query($link, "CREATE TABLE mycustomer LIKE hotel.customer"); /* Insertion de quelques lignes */ maxdb_query($link, "INSERT INTO mycustomer VALUES (3000,'Mrs','Jenny','Porter','10580','1340 N.Ash Street, #3')"); maxdb_query($link, "INSERT INTO mycustomer VALUES (3100,'Mr','Peter','Brown','48226','1001 34th Str., APT.3')"); /* Valide la transaction */ maxdb_commit($link); /* Fermeture de la connexion */ maxdb_close($link); ?> ]]> </programlisting> </example> <para> L'exemple ci-dessus ne produit aucun affichage. </para> </refsect1> <refsect1> &reftitle.seealso; <para> <function>maxdb_autocommit</function>, <function>maxdb_rollback</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-connect-errno.xml?r=1.1&p=1 Index: phpdoc-fr/reference/maxdb/functions/maxdb-connect-errno.xml +++ phpdoc-fr/reference/maxdb/functions/maxdb-connect-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-connect-errno"> <refnamediv> <refname>maxdb_connect_errno</refname> <refpurpose>Retourne le code erreur du dernier appel à la connexion</refpurpose> </refnamediv> <refsect1> &reftitle.description; <methodsynopsis> <type>int</type><methodname>maxdb_connect_errno</methodname> <void /> </methodsynopsis> <para> <function>maxdb_connect_errno</function> retourne le dernier code erreur du dernier appel à <function>maxdb_connect</function>. Si aucune erreur n'est survenue, cette fonction retournera zéro. </para> </refsect1> <refsect1> &reftitle.returnvalues; <para> Un code erreur pour le dernier appel à <function>maxdb_connect</function>, si elle a échouée. Zéro signifie qu'aucune erreur n'est survenue. </para> </refsect1> <refsect1> &reftitle.examples; <para> <example> <title>Exemple avec <function>maxdb_connect_errno</function></title> <programlisting role="php"> <![CDATA[ <?php $link = maxdb_connect("localhost", "MONA", "RED"); if (!$link) { printf("Impossible de se connecter à locahost. Code erreur : %d\n", maxdb_connect_errno()); } ?> ]]> </programlisting> &example.outputs; <screen> <![CDATA[ Affected rows (INSERT): 15 Affected rows (UPDATE): 15 Affected rows (DELETE): 0 Affected rows (SELECT): -1 ]]> </screen> </example> </para> </refsect1> <refsect1> &reftitle.seealso; <para> <function>maxdb_connect</function>, <function>maxdb_connect_error</function>, <function>maxdb_errno</function>, <function>maxdb_error</function> et <function>maxdb_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-connect-error.xml?r=1.1&p=1 Index: phpdoc-fr/reference/maxdb/functions/maxdb-connect-error.xml +++ phpdoc-fr/reference/maxdb/functions/maxdb-connect-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-connect-error"> <refnamediv> <refname>maxdb_connect_error</refname> <refpurpose>Retourne une chaîne descriptive de la dernière erreur</refpurpose> </refnamediv> <refsect1> &reftitle.description; <methodsynopsis> <type>string</type><methodname>maxdb_connect_error</methodname> <void /> </methodsynopsis> <para> <function>maxdb_connect_error</function> est identique à la fonction <function>maxdb_connect_errno</function>, excepté qu'au lieu de retourner un code erreur, <function>maxdb_connect_error</function> retourne une chaîne représentative de la dernière erreur survenue lors du dernier appel à <function>maxdb_connect</function>. Si aucune erreur n'est survenue, cette fonction retournera une chaîne vide. </para> </refsect1> <refsect1> &reftitle.returnvalues; <para> Une chaîne décrivant l'erreur. Une chaîne vide si aucune erreur n'est survenue. </para> </refsect1> <refsect1> &reftitle.examples; <para> <example> <title>Exemple avec <function>maxdb_connect_error</function></title> <programlisting role="php"> <![CDATA[ <?php $link = maxdb_connect("localhost", "nonexisting_user", ""); if (!$link) { printf("Impossible de se connecter à localhost. Erreur : %s\n", maxdb_connect_error()); } ?> ]]> </programlisting> &example.outputs; <screen> <![CDATA[ PHP Warning: maxdb_connect(): -4008 POS(1) Unknown user name/password combination <...> Impossible de se connecter à localhost. Error: POS(1) Unknown user name/password combination ]]> </screen> </example> </para> </refsect1> <refsect1> &reftitle.seealso; <para> <function>maxdb_connect</function>, <function>maxdb_connect_errno</function>, <function>maxdb_errno</function>, <function>maxdb_error</function> et <function>maxdb_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-connect.xml?r=1.1&p=1 Index: phpdoc-fr/reference/maxdb/functions/maxdb-connect.xml +++ phpdoc-fr/reference/maxdb/functions/maxdb-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-connect"> <refnamediv> <refname>maxdb_connect</refname> <refpurpose>Open a new connection to the MaxDB server</refpurpose> </refnamediv> <refsect1> &reftitle.description; &title.procedural; <methodsynopsis> <type>resource</type><methodname>maxdb_connect</methodname> <methodparam choice='opt'><type>string</type><parameter>host</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_connect</function> tente d'ouvrir une connexion sur un serveur MaxDB fonctionnant sur l'hôte <parameter>host</parameter> qui peut être soit un nom d'hôte, soit une adresse IP. Passer la chaîne "localhost" à ce paramètre, l'hôte local sera assumé. En cas de succès, <function>maxdb_connect</function> retournera une ressource représentant la connexion à la base de données, ou &false; si une erreur survient. </para> <para> Les paramètres <parameter>username</parameter> et <parameter>password</parameter> spécifient le nom de l'utilisateur ainsi que le mot de passe utilisés pour la connexion au serveur MaxDB. Si le mot de passe n'est pas fourni (la valeur &null; est passée), le serveur MaxDB tentera d'identifier l'utilisateur encore une fois en utilisant la valeur de l'option de configuration <parameter>maxdb.default_pw</parameter> du &php.ini;. </para> <para> Le paramètre <parameter>dbname</parameter>, si fourni, spécifie la base de données par défaut à utiliser lors de l'exécution de requêtes. S'il n'est pas fourni, l'option de configuration <parameter>maxdb.default_db</parameter> du &php.ini; est utilisée. </para> <para> Les paramètres <parameter>port</parameter> et <parameter>socket</parameter> sont ignorés par le serveur MaxDB. </para> </refsect1> <refsect1> &reftitle.returnvalues; <para> Retourne une ressource représentant la connexion au serveur MaxDB ou &false; si la connexion échoue. </para> </refsect1> <refsect1> &reftitle.examples; <example> <title>Style procédural</title> <programlisting role="php"> <![CDATA[ <?php $link = maxdb_connect("localhost", "MONA", "RED"); /* Vérifie la connexion */ if (!$link) { printf("Echec de la connexion : %s\n", maxdb_connect_error()); exit(); } printf("Information sur l'hôte : %s\n", maxdb_get_host_info($link)); /* Fermeture de la connexion */ maxdb_close($link); ?> ]]> </programlisting> &example.outputs; <screen> <![CDATA[ Host information: localhost ]]> </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 vi: ts=1 sw=1 -->
« previous php.doc.fr (#3826) next »