mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-28 23:08:55 +00:00

Document false and null return types Cf. <https://news-web.php.net/php.doc.cvs/17645>. git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@351730 c90b9560-bf6c-de11-be94-00142212c4b1
121 lines
2.7 KiB
XML
121 lines
2.7 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<!-- $Revision$ -->
|
|
|
|
<refentry xml:id="function.cubrid-fetch-lengths" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
|
<refnamediv>
|
|
<refname>cubrid_fetch_lengths</refname>
|
|
<refpurpose>Return an array with the lengths of the values of each field from the current row</refpurpose>
|
|
</refnamediv>
|
|
|
|
<refsect1 role="description">
|
|
&reftitle.description;
|
|
<methodsynopsis>
|
|
<type>array</type><methodname>cubrid_fetch_lengths</methodname>
|
|
<methodparam><type>resource</type><parameter>result</parameter></methodparam>
|
|
</methodsynopsis>
|
|
<para>
|
|
This function returns an numeric array with the lengths of the values of
|
|
each field from the current row of the result set or it returns FALSE on
|
|
failure.
|
|
</para>
|
|
<note>
|
|
<para>
|
|
If field data type is BLOB/CLOB, you should get its length by using
|
|
<function>cubrid_lob_size</function>.
|
|
</para>
|
|
</note>
|
|
|
|
</refsect1>
|
|
|
|
<refsect1 role="parameters">
|
|
&reftitle.parameters;
|
|
<para>
|
|
<variablelist>
|
|
<varlistentry>
|
|
<term><parameter>result</parameter></term>
|
|
<listitem><para><parameter>result</parameter> comes from a call to <function>cubrid_execute</function></para></listitem>
|
|
</varlistentry>
|
|
</variablelist>
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1 role="returnvalues">
|
|
&reftitle.returnvalues;
|
|
<para>
|
|
An numeric array, when process is successful.
|
|
</para>
|
|
<para>
|
|
&false; on failure.
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1 role="examples">
|
|
&reftitle.examples;
|
|
<example>
|
|
<title><function>cubrid_fetch_lengths</function> example</title>
|
|
<programlisting role="php">
|
|
<![CDATA[
|
|
<?php
|
|
$conn = cubrid_connect("localhost", 33000, "demodb");
|
|
$result = cubrid_execute($conn, "SELECT * FROM game WHERE host_year=2004 AND nation_code='AUS' AND medal='G'");
|
|
|
|
$row = cubrid_fetch_row($result);
|
|
print_r($row);
|
|
|
|
$lens = cubrid_fetch_lengths($result);
|
|
print_r($lens);
|
|
|
|
cubrid_disconnect($conn);
|
|
?>
|
|
]]>
|
|
</programlisting>
|
|
&example.outputs;
|
|
<screen>
|
|
<![CDATA[
|
|
Array
|
|
(
|
|
[0] => 2004
|
|
[1] => 20085
|
|
[2] => 15118
|
|
[3] => 30134
|
|
[4] => AUS
|
|
[5] => G
|
|
[6] => 2004-8-20
|
|
)
|
|
Array
|
|
(
|
|
[0] => 4
|
|
[1] => 5
|
|
[2] => 5
|
|
[3] => 5
|
|
[4] => 3
|
|
[5] => 1
|
|
[6] => 10
|
|
)
|
|
]]>
|
|
</screen>
|
|
</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
|
|
-->
|