mirror of
https://github.com/macintoshplus/doc-fr.git
synced 2026-04-25 01:28:02 +02:00
141 lines
3.8 KiB
XML
141 lines
3.8 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<!-- $Revision$ -->
|
|
<!-- EN-Revision: b95d28e6ec86e4a71e012737d36ebdc1cf009180 Maintainer: yannick Status: ready -->
|
|
<!-- Reviewed: no -->
|
|
|
|
<refentry xml:id="function.mysql-field-flags" xmlns="http://docbook.org/ns/docbook">
|
|
<refnamediv>
|
|
<refname>mysql_field_flags</refname>
|
|
<refpurpose>Retourne des détails sur une colonne MySQL</refpurpose>
|
|
</refnamediv>
|
|
|
|
<refsynopsisdiv>
|
|
<warning>
|
|
&mysql.alternative.note;
|
|
<simplelist role="alternatives">
|
|
<member><function>mysqli_fetch_field_direct</function> [flags]</member>
|
|
<member><methodname>PDOStatement::getColumnMeta</methodname> [flags]</member>
|
|
</simplelist>
|
|
</warning>
|
|
</refsynopsisdiv>
|
|
|
|
<refsect1 role="description">
|
|
&reftitle.description;
|
|
<methodsynopsis>
|
|
<type class="union"><type>string</type><type>false</type></type><methodname>mysql_field_flags</methodname>
|
|
<methodparam><type>resource</type><parameter>result</parameter></methodparam>
|
|
<methodparam><type>int</type><parameter>field_offset</parameter></methodparam>
|
|
</methodsynopsis>
|
|
<para>
|
|
<function>mysql_field_flags</function> retourne le sémaphore
|
|
associé au champ spécifié par <parameter>field_offset</parameter>,
|
|
dans le résultat <parameter>result</parameter>. Les sémaphores sont retournés
|
|
comme des mots, séparés par des espaces, ce qui les
|
|
rend faciles à séparer, avec la commande <function>explode</function>.
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1 role="parameters">
|
|
&reftitle.parameters;
|
|
<para>
|
|
<variablelist>
|
|
&mysql.result.description;
|
|
&mysql.field-offset.req.description;
|
|
</variablelist>
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1 role="returnvalues">
|
|
&reftitle.returnvalues;
|
|
<para>
|
|
Retourne les sémaphores sous la forme d'une chaîne associés avec le résultat&return.falseforfailure;.
|
|
</para>
|
|
<para>
|
|
Les valeurs suivantes (pour une version suffisamment récente de MySQL) sont
|
|
disponibles : <literal>"not_null"</literal>, <literal>"primary_key"</literal>,
|
|
<literal>"unique_key"</literal>, <literal>"multiple_key"</literal>,
|
|
<literal>"blob"</literal>, <literal>"unsigned"</literal>, <literal>"zerofill"</literal>,
|
|
<literal>"binary"</literal>, <literal>"enum"</literal>,
|
|
<literal>"auto_increment"</literal> et <literal>"timestamp"</literal>.
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1 role="examples">
|
|
&reftitle.examples;
|
|
<para>
|
|
<example>
|
|
<title>Exemple avec <function>mysql_field_flags</function></title>
|
|
<programlisting role="php">
|
|
<![CDATA[
|
|
<?php
|
|
$result = mysql_query("SELECT id,email FROM people WHERE id = '42'");
|
|
if (!$result) {
|
|
echo 'Impossible d\'exécuter la requête : ' . mysql_error();
|
|
exit;
|
|
}
|
|
$flags = mysql_field_flags($result, 0);
|
|
|
|
echo $flags;
|
|
print_r(explode(' ', $flags));
|
|
?>
|
|
]]>
|
|
</programlisting>
|
|
&example.outputs.similar;
|
|
<screen>
|
|
<![CDATA[
|
|
not_null primary_key auto_increment
|
|
Array
|
|
(
|
|
[0] => not_null
|
|
[1] => primary_key
|
|
[2] => auto_increment
|
|
)
|
|
]]>
|
|
</screen>
|
|
</example>
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1 role="notes">
|
|
&reftitle.notes;
|
|
<note>
|
|
<para>
|
|
&info.deprecated.alias;
|
|
<function>mysql_fieldflags</function>
|
|
</para>
|
|
</note>
|
|
</refsect1>
|
|
|
|
<refsect1 role="seealso">
|
|
&reftitle.seealso;
|
|
<para>
|
|
<simplelist>
|
|
<member><function>mysql_field_type</function></member>
|
|
<member><function>mysql_field_len</function></member>
|
|
</simplelist>
|
|
</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:"~/.phpdoc/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
|
|
-->
|