php-doc-en/reference/cubrid/functions/cubrid-schema.xml
2011-01-06 02:23:04 +00:00

121 lines
3.5 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<refentry xml:id="function.cubrid-schema" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
<refnamediv>
<refname>cubrid_schema</refname>
<refpurpose>Is used to get the requested schema information</refpurpose>
</refnamediv>
<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
<type>array</type><methodname>cubrid_schema</methodname>
<methodparam><type>resource</type><parameter>conn_identifier</parameter></methodparam>
<methodparam><type>int</type><parameter>schema_type</parameter></methodparam>
<methodparam choice="opt"><type>string</type><parameter>class_name</parameter></methodparam>
<methodparam choice="opt"><type>string</type><parameter>attr_name</parameter></methodparam>
</methodsynopsis>
<para>
The <function>cubrid_schema</function> function is used to get the requested schema information from database. You have to designate <parameter>class_name</parameter>, if you want to get information on certain class, <parameter>attr_name</parameter>, if you want to get information on certain attribute (can be used only with CUBRID_ SCH_ATTR_PRIVILEGE).
</para>
</refsect1>
<refsect1 role="parameters">
&reftitle.parameters;
<para>
<variablelist>
<varlistentry>
<term><parameter>conn_identifier</parameter></term>
<listitem><para>Connection identifier.</para></listitem>
</varlistentry>
<varlistentry>
<term><parameter>schema_type</parameter></term>
<listitem><para>Schema data that you want to know.</para></listitem>
</varlistentry>
<varlistentry>
<term><parameter>class_name</parameter></term>
<listitem><para>Class you want to know the schema of.</para></listitem>
</varlistentry>
<varlistentry>
<term><parameter>attr_name</parameter></term>
<listitem><para>Attribute you want to know the schema of.</para></listitem>
</varlistentry>
</variablelist>
</para>
</refsect1>
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
Array containing the schema information, when process is successful;
</para>
<para>
&false;, when process is unsuccessful
</para>
</refsect1>
<refsect1 role="changelog">
&reftitle.changelog;
<para>
<informaltable>
<tgroup cols="2">
<thead>
<row>
<entry>&Version;</entry>
<entry>&Description;</entry>
</row>
</thead>
<tbody>
<row>
<entry>8.3.1</entry>
<entry>
Change return value: when process is unsuccessful, return false, not -1.
</entry>
</row>
</tbody>
</tgroup>
</informaltable>
</para>
</refsect1>
<refsect1 role="examples">
&reftitle.examples;
<example>
<title><function>cubrid_schema</function> example</title>
<programlisting role="php">
<![CDATA[
<?php
$attrs = cubrid_schema ($con, CUBRID_SCH_ATTRIBUTE, "person");
while (list($key, $value) = each($attrs)) {
echo $value["NAME"];
echo $value["DOMAIN"];
}
?>
]]>
</programlisting>
</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:"~/.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
-->