mirror of
https://github.com/fofolee/uTools-Manuals.git
synced 2025-06-17 21:16:57 +08:00
120 lines
5.9 KiB
HTML
120 lines
5.9 KiB
HTML
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
|
<html>
|
|
<head>
|
|
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
|
|
<title>Read data from a GLO instance and save it in a file</title>
|
|
</head>
|
|
<body class="docs"><div id="layout">
|
|
<div id="layout-content"><div id="function.cubrid-load-from-glo" class="refentry">
|
|
<div class="refnamediv">
|
|
<h1 class="refname">cubrid_load_from_glo</h1>
|
|
<p class="verinfo">(PECL CUBRID >= 8.3.0)</p><p class="refpurpose"><span class="refname">cubrid_load_from_glo</span> — <span class="dc-title">Read data from a GLO instance and save it in a file</span></p>
|
|
|
|
</div>
|
|
|
|
<div class="refsect1 description" id="refsect1-function.cubrid-load-from-glo-description">
|
|
<h3 class="title">说明</h3>
|
|
<div class="methodsynopsis dc-description">
|
|
<span class="methodname"><strong>cubrid_load_from_glo</strong></span>
|
|
( <span class="methodparam"><span class="type">resource</span> <code class="parameter">$conn_identifier</code></span>
|
|
, <span class="methodparam"><span class="type">string</span> <code class="parameter">$oid</code></span>
|
|
, <span class="methodparam"><span class="type">string</span> <code class="parameter">$file_name</code></span>
|
|
) : <span class="type">int</span></div>
|
|
|
|
<p class="para rdfs-comment">
|
|
The <span class="function"><strong>cubrid_load_from_glo()</strong></span> function is used to read a
|
|
data from a glo instance, and saves it in a designated file.
|
|
</p>
|
|
</div>
|
|
|
|
|
|
<div class="refsect1 parameters" id="refsect1-function.cubrid-load-from-glo-parameters">
|
|
<h3 class="title">参数</h3>
|
|
<p class="para">
|
|
<dl>
|
|
|
|
|
|
<dt>
|
|
<code class="parameter">conn_identifier</code></dt>
|
|
|
|
<dd>
|
|
<p class="para">Connection identifier.</p></dd>
|
|
|
|
|
|
|
|
<dt>
|
|
<code class="parameter">oid</code></dt>
|
|
|
|
<dd>
|
|
<p class="para">Oid of the glo instance that you want to read the data from.</p></dd>
|
|
|
|
|
|
|
|
<dt>
|
|
<code class="parameter">file_name</code></dt>
|
|
|
|
<dd>
|
|
<p class="para">Name of the file where you want to save the data in.</p></dd>
|
|
|
|
|
|
</dl>
|
|
|
|
</p>
|
|
</div>
|
|
|
|
|
|
<div class="refsect1 returnvalues" id="refsect1-function.cubrid-load-from-glo-returnvalues">
|
|
<h3 class="title">返回值</h3>
|
|
<p class="para">
|
|
<strong><code>TRUE</code></strong>, when process is successful.
|
|
</p>
|
|
<p class="para">
|
|
<strong><code>FALSE</code></strong>, when process is unsuccessful.
|
|
</p>
|
|
</div>
|
|
|
|
|
|
<div class="refsect1 examples" id="refsect1-function.cubrid-load-from-glo-examples">
|
|
<h3 class="title">范例</h3>
|
|
<div class="example" id="example-1180">
|
|
<p><strong>Example #1 <span class="function"><strong>cubrid_load_from_glo()</strong></span> example</strong></p>
|
|
<div class="example-contents">
|
|
<div class="phpcode"><pre><span style="color: #000000">
|
|
<span style="color: #0000BB"><?php<br />$req </span><span style="color: #007700">= </span><span style="color: #0000BB">cubrid_execute </span><span style="color: #007700">(</span><span style="color: #0000BB">$con</span><span style="color: #007700">, </span><span style="color: #DD0000">"select image from person where id=1"</span><span style="color: #007700">);<br />if (</span><span style="color: #0000BB">$req</span><span style="color: #007700">) {<br /> list (</span><span style="color: #0000BB">$oid</span><span style="color: #007700">) = </span><span style="color: #0000BB">cubrid_fetch</span><span style="color: #007700">(</span><span style="color: #0000BB">$req</span><span style="color: #007700">);<br /> </span><span style="color: #0000BB">cubrid_close_request</span><span style="color: #007700">(</span><span style="color: #0000BB">$req</span><span style="color: #007700">);<br /> </span><span style="color: #0000BB">$res </span><span style="color: #007700">= </span><span style="color: #0000BB">cubrid_load_from_glo </span><span style="color: #007700">(</span><span style="color: #0000BB">$con</span><span style="color: #007700">, </span><span style="color: #0000BB">$oid</span><span style="color: #007700">, </span><span style="color: #DD0000">"output.jpg"</span><span style="color: #007700">);<br /> if (</span><span style="color: #0000BB">$res</span><span style="color: #007700">) {<br /> echo </span><span style="color: #DD0000">"image changed successfully"</span><span style="color: #007700">;<br /> }<br />}<br /></span><span style="color: #0000BB">?></span>
|
|
</span>
|
|
</pre></div>
|
|
</div>
|
|
|
|
</div>
|
|
</div>
|
|
|
|
|
|
<div class="refsect1 notes" id="refsect1-function.cubrid-load-from-glo-notes">
|
|
<h3 class="title">注释</h3>
|
|
<blockquote class="note"><p><strong class="note">Note</strong>:
|
|
<p class="para">
|
|
为了向下兼容,可以使用下列已废弃的别名:
|
|
<span class="function"><strong>cubrid_load_from_glo()</strong></span>
|
|
</p>
|
|
</p></blockquote>
|
|
<blockquote class="note"><p><strong class="note">Note</strong>:
|
|
<p class="para">
|
|
This function is removed from CUBRID 3.1.
|
|
</p>
|
|
</p></blockquote>
|
|
</div>
|
|
|
|
|
|
<div class="refsect1 seealso" id="refsect1-function.cubrid-load-from-glo-seealso">
|
|
<h3 class="title">参见</h3>
|
|
<p class="para">
|
|
<ul class="simplelist">
|
|
<li class="member"><span class="function"><a href="cubrid_new_glo.html" class="function" rel="rdfs-seeAlso">cubrid_new_glo()</a> - Create a glo instance</span></li>
|
|
<li class="member"><span class="function"><a href="cubrid_save_to_glo.html" class="function" rel="rdfs-seeAlso">cubrid_save_to_glo()</a> - Save requested file in a GLO instance</span></li>
|
|
<li class="member"><span class="function"><a href="cubrid_send_glo.html" class="function" rel="rdfs-seeAlso">cubrid_send_glo()</a> - Read data from glo and send it to std output</span></li>
|
|
</ul>
|
|
</p>
|
|
</div>
|
|
|
|
|
|
</div></div></div></body></html> |