mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-27 06:18:56 +00:00

git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@330762 c90b9560-bf6c-de11-be94-00142212c4b1
110 lines
3.2 KiB
XML
110 lines
3.2 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<!-- $Revision$ -->
|
|
|
|
<refentry xml:id="function.cubrid-lob-get" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
|
<refnamediv>
|
|
<refname>cubrid_lob_get</refname>
|
|
<refpurpose>Get BLOB/CLOB data</refpurpose>
|
|
</refnamediv>
|
|
|
|
<refsect1 role="description">
|
|
&reftitle.description;
|
|
<methodsynopsis>
|
|
<type>array</type><methodname>cubrid_lob_get</methodname>
|
|
<methodparam><type>resource</type><parameter>conn_identifier</parameter></methodparam>
|
|
<methodparam><type>string</type><parameter>sql</parameter></methodparam>
|
|
</methodsynopsis>
|
|
<para>
|
|
<function>cubrid_lob_get</function> is used to get BLOB/CLOB meta info from CUBRID database,
|
|
CUBRID gets BLOB/CLOB by executing the SQL statement, and returns all LOBs as a resource array.
|
|
Be sure that the SQL retrieves only one column and its data type is BLOB or CLOB.
|
|
</para>
|
|
<para>
|
|
Remember to use <function>cubrid_lob_close</function> to release the LOBs if you don't need it any more.
|
|
</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>sql</parameter></term>
|
|
<listitem><para>SQL statement to be executed.</para></listitem>
|
|
</varlistentry>
|
|
</variablelist>
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1 role="returnvalues">
|
|
&reftitle.returnvalues;
|
|
<para>
|
|
Return an array of LOB resources, when process is successful.
|
|
</para>
|
|
<para>
|
|
&false;, when process is unsuccessful.
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1 role="examples">
|
|
&reftitle.examples;
|
|
<example>
|
|
<title><function>cubrid_lob_get</function> example</title>
|
|
<programlisting role="php">
|
|
<![CDATA[
|
|
<?php
|
|
$conn = cubrid_connect ("localhost", 33000, "demodb", "dba");
|
|
|
|
cubrid_execute($conn,"DROP TABLE if exists doc");
|
|
cubrid_execute($conn,"CREATE TABLE doc (id INT, doc_content CLOB)");
|
|
cubrid_execute($conn,"INSERT INTO doc VALUES (5,'hello,cubrid')");
|
|
|
|
$lobs = cubrid_lob_get($conn, "SELECT doc_content FROM doc WHERE id=5");
|
|
echo "Doc size: ".cubrid_lob_size($lobs[0])." bytes";
|
|
cubrid_lob_export($conn, $lobs[0], "doc_5.txt");
|
|
cubrid_lob_close($lobs);
|
|
cubrid_disconnect($conn);
|
|
?>
|
|
]]>
|
|
</programlisting>
|
|
</example>
|
|
</refsect1>
|
|
|
|
<refsect1 role="seealso">
|
|
&reftitle.seealso;
|
|
<para>
|
|
<simplelist>
|
|
<member><function>cubrid_lob_close</function></member>
|
|
<member><function>cubrid_lob_size</function></member>
|
|
<member><function>cubrid_lob_export</function></member>
|
|
<member><function>cubrid_lob_send</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
|
|
-->
|