mirror of
https://github.com/php/doc-fr.git
synced 2026-03-29 18:42:07 +02:00
git-svn-id: https://svn.php.net/repository/phpdoc/fr/trunk@158710 c90b9560-bf6c-de11-be94-00142212c4b1
114 lines
2.5 KiB
XML
114 lines
2.5 KiB
XML
<?xml version="1.0" encoding="iso-8859-1"?>
|
|
<!-- $Revision: 1.7 $ -->
|
|
<!-- EN-Revision: 1.4 Maintainer: yannick Status: ready -->
|
|
<refentry id="function.pg-meta-data">
|
|
<refnamediv>
|
|
<refname>pg_meta_data</refname>
|
|
<refpurpose>Lit les données méta de la table PostGreSQL</refpurpose>
|
|
</refnamediv>
|
|
<refsect1>
|
|
<title>Description</title>
|
|
<methodsynopsis>
|
|
<type>array</type><methodname>pg_meta_data</methodname>
|
|
<methodparam><type>resource</type><parameter>connection</parameter></methodparam>
|
|
<methodparam><type>string</type><parameter>table_name</parameter></methodparam>
|
|
</methodsynopsis>
|
|
<para>
|
|
<function>pg_meta_data</function> retourne la définition de la table
|
|
<literal>table_name</literal> sous forme de tableau. Si une erreur survient,
|
|
<function>pg_meta_data</function> retourne &false;.
|
|
</para>
|
|
<para>
|
|
<example>
|
|
<title>Exemple avec <function>pg_meta_data</function></title>
|
|
<programlisting role="php">
|
|
<![CDATA[
|
|
<?php
|
|
$dbconn = pg_connect("dbname=publisher") or die("Impossible de se connecter");
|
|
|
|
$meta = pg_meta_data($dbconn,'authors');
|
|
if (is_array ($meta)) {
|
|
echo '<pre>';
|
|
var_dump ($meta);
|
|
echo '</pre>';
|
|
}
|
|
?>
|
|
]]>
|
|
</programlisting>
|
|
&example.outputs;
|
|
<screen>
|
|
<![CDATA[
|
|
array(3) {
|
|
["author"]=>
|
|
array(5) {
|
|
["num"]=>
|
|
int(1)
|
|
["type"]=>
|
|
string(7) "varchar"
|
|
["len"]=>
|
|
int(-1)
|
|
["not null"]=>
|
|
bool(false)
|
|
["has default"]=>
|
|
bool(false)
|
|
}
|
|
["year"]=>
|
|
array(5) {
|
|
["num"]=>
|
|
int(2)
|
|
["type"]=>
|
|
string(4) "int2"
|
|
["len"]=>
|
|
int(2)
|
|
["not null"]=>
|
|
bool(false)
|
|
["has default"]=>
|
|
bool(false)
|
|
}
|
|
["title"]=>
|
|
array(5) {
|
|
["num"]=>
|
|
int(3)
|
|
["type"]=>
|
|
string(7) "varchar"
|
|
["len"]=>
|
|
int(-1)
|
|
["not null"]=>
|
|
bool(false)
|
|
["has default"]=>
|
|
bool(false)
|
|
}
|
|
}
|
|
]]>
|
|
</screen>
|
|
</example>
|
|
</para>
|
|
&warn.experimental.func;
|
|
<para>
|
|
Voir aussi
|
|
<function>pg_convert</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
|
|
-->
|