cvs: phpdoc-fr /reference/mssql/functions mssql-field-name.xml

From: Date: Thu, 29 Jan 2009 05:54:55 +0000
Subject: cvs: phpdoc-fr /reference/mssql/functions mssql-field-name.xml
Groups: php.doc.fr 
Request: Send a blank email to doc-fr+get-6525@lists.php.net to get a copy of this message
yannick Thu Jan 29 05:54:55 2009 UTC Modified files: /phpdoc-fr/reference/mssql/functions mssql-field-name.xml Log: sync with EN http://cvs.php.net/viewvc.cgi/phpdoc-fr/reference/mssql/functions/mssql-field-name.xml?r1=1.13&r2=1.14&diff_format=u Index: phpdoc-fr/reference/mssql/functions/mssql-field-name.xml diff -u phpdoc-fr/reference/mssql/functions/mssql-field-name.xml:1.13 phpdoc-fr/reference/mssql/functions/mssql-field-name.xml:1.14 --- phpdoc-fr/reference/mssql/functions/mssql-field-name.xml:1.13 Sat May 24 12:15:58 2008 +++ phpdoc-fr/reference/mssql/functions/mssql-field-name.xml Thu Jan 29 05:54:55 2009 @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.13 $ --> -<!-- EN-Revision: 1.7 Maintainer: yannick Status: ready --> +<!-- $Revision: 1.14 $ --> +<!-- EN-Revision: 1.9 Maintainer: yannick Status: ready --> <!-- Reviewed: yes --> <refentry xml:id="function.mssql-field-name" xmlns="http://docbook.org/ns/docbook"> @@ -14,7 +14,7 @@ <methodsynopsis> <type>string</type><methodname>mssql_field_name</methodname> <methodparam><type>resource</type><parameter>result</parameter></methodparam> - <methodparam choice="opt"><type>int</type><parameter>offset</parameter></methodparam> + <methodparam choice="opt"><type>int</type><parameter>offset</parameter><initializer>-1</initializer></methodparam> </methodsynopsis> <para> Retourne le nom du champ numéro <parameter>offset</parameter> du résultat @@ -56,6 +56,43 @@ </para> </refsect1> + <refsect1 role="examples"> + &reftitle.examples; + <para> + <example> + <title>Exemple avec <function>mssql_field_name</function></title> + <programlisting role="php"> +<![CDATA[ +<?php +// Envoi une requête de type SELECT à MSSQL +$query = mssql_query('SELECT [username], [name], [email] FROM [php].[dbo].[userlist]'); + +echo 'Le jeu de résultat contient le(s) champ(s) suivant(s) :', PHP_EOL; + +// Affiche le nom de tous les champs du jeu de résultats +for($i = 0; $i < mssql_num_fields($query); ++$i) +{ + echo ' - ' . mssql_field_name($query, $i), PHP_EOL; +} + +// Libère le jeu de résultats +mssql_free_result($query); +?> +]]> + </programlisting> + &example.outputs.similar; + <screen> +<![CDATA[ +Le jeu de résultat contient le(s) champ(s) suivant(s) : + - username + - name + - email +]]> + </screen> + </example> + </para> + </refsect1> + <refsect1 role="seealso"> &reftitle.seealso; <para>

« previous php.doc.fr (#6525) next »