php-doc-en/reference/cubrid/functions/cubrid-col-get.xml
2010-09-08 01:27:51 +00:00

93 lines
2.8 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<refentry xml:id="function.cubrid-col-get" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
<refnamediv>
<refname>cubrid_col_get</refname>
<refpurpose>Is used to get contents of the elements</refpurpose>
</refnamediv>
<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
<type>array</type><methodname>cubrid_col_get</methodname>
<methodparam><type>resource</type><parameter>conn_identifier</parameter></methodparam>
<methodparam><type>string</type><parameter>oid</parameter></methodparam>
<methodparam><type>string</type><parameter>attr_name</parameter></methodparam>
</methodsynopsis>
<para>
The <function>cubrid_col_get</function> function is used to get contents of the elements of the collection type (set, multiset, sequence) attribute you requested as an array.
</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>oid</parameter></term>
<listitem><para>Oid of the instance that you want to read.</para></listitem>
</varlistentry>
<varlistentry>
<term><parameter>attr_name</parameter></term>
<listitem><para>Attribute name that you want to read from the instance.</para></listitem>
</varlistentry>
</variablelist>
</para>
</refsect1>
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
Array (0-based numerical array) containing the elements you requested, when process is successful;
</para>
<para>
&false; (to distinguish the error from the situation of attribute having empty collection or NULL, in case of error, a warning message is shown; in such case you can check the error by using <function>cubrid_error_code</function>), when process is unsuccessful.
</para>
</refsect1>
<refsect1 role="examples">
&reftitle.examples;
<example>
<title><function>cubrid_col_get</function> example</title>
<programlisting role="php">
<![CDATA[
<?php
$elem_array = cubrid_col_get ($con, $oid, "tel");
while (list ($key, $val) = each ($elem_array)) {
echo "tel: $val\n";
}
?>
]]>
</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
-->