source: www/manuals/PHP_manual/function.fbsql-read-blob.html@ 1

Last change on this file since 1 was 1, checked in by george, 17 years ago

Prvotní import všeho

File size: 4.2 KB
Line 
1<HTML
2><HEAD
3><TITLE
4>fbsql_read_blob</TITLE
5><META
6NAME="GENERATOR"
7CONTENT="Modular DocBook HTML Stylesheet Version 1.7"><LINK
8REL="HOME"
9TITLE="Manuál PHP"
10HREF="index.html"><LINK
11REL="UP"
12TITLE="FrontBase Functions"
13HREF="ref.fbsql.html"><LINK
14REL="PREVIOUS"
15TITLE="fbsql_query"
16HREF="function.fbsql-query.html"><LINK
17REL="NEXT"
18TITLE="fbsql_read_clob"
19HREF="function.fbsql-read-clob.html"><META
20HTTP-EQUIV="Content-type"
21CONTENT="text/html; charset=ISO-8859-2"></HEAD
22><BODY
23CLASS="refentry"
24BGCOLOR="#FFFFFF"
25TEXT="#000000"
26LINK="#0000FF"
27VLINK="#840084"
28ALINK="#0000FF"
29><DIV
30CLASS="NAVHEADER"
31><TABLE
32SUMMARY="Header navigation table"
33WIDTH="100%"
34BORDER="0"
35CELLPADDING="0"
36CELLSPACING="0"
37><TR
38><TH
39COLSPAN="3"
40ALIGN="center"
41>Manuál PHP</TH
42></TR
43><TR
44><TD
45WIDTH="10%"
46ALIGN="left"
47VALIGN="bottom"
48><A
49HREF="function.fbsql-query.html"
50ACCESSKEY="P"
51>Pøedcházející</A
52></TD
53><TD
54WIDTH="80%"
55ALIGN="center"
56VALIGN="bottom"
57></TD
58><TD
59WIDTH="10%"
60ALIGN="right"
61VALIGN="bottom"
62><A
63HREF="function.fbsql-read-clob.html"
64ACCESSKEY="N"
65>Dal¹í</A
66></TD
67></TR
68></TABLE
69><HR
70ALIGN="LEFT"
71WIDTH="100%"></DIV
72><H1
73><A
74NAME="function.fbsql-read-blob"
75></A
76>fbsql_read_blob</H1
77><DIV
78CLASS="refnamediv"
79><A
80NAME="AEN21204"
81></A
82><P
83> (PHP 4 &#62;= 4.2.0)</P
84>fbsql_read_blob&nbsp;--&nbsp;Read a BLOB from the database</DIV
85><DIV
86CLASS="refsect1"
87><A
88NAME="AEN21207"
89></A
90><H2
91>Description</H2
92>string <B
93CLASS="methodname"
94>fbsql_read_blob</B
95> ( string blob_handle [, resource link_identifier])<BR
96></BR
97><P
98>
99 Returns: A string containing the BLOB specified by blob_handle.
100 </P
101><P
102>
103 <B
104CLASS="function"
105>fbsql_read_blob()</B
106> reads BLOB data from the
107 database. If a select statement contains BLOB and/or BLOB
108 columns FrontBase will return the data directly when data is
109 fetched. This default behavior can be changed with
110 <A
111HREF="function.fbsql-set-lob-mode.html"
112><B
113CLASS="function"
114>fbsql_set_lob_mode()</B
115></A
116> so the fetch functions
117 will return handles to BLOB and CLOB data. If a handle is
118 fetched a user must call <B
119CLASS="function"
120>fbsql_read_blob()</B
121> to
122 get the actual BLOB data from the database.
123 </P
124><TABLE
125WIDTH="100%"
126BORDER="0"
127CELLPADDING="0"
128CELLSPACING="0"
129CLASS="EXAMPLE"
130><TR
131><TD
132><DIV
133CLASS="example"
134><A
135NAME="AEN21223"
136></A
137><P
138><B
139>Pøíklad 1. <B
140CLASS="function"
141>fbsql_read_blob()</B
142> example</B
143></P
144><TABLE
145BORDER="0"
146BGCOLOR="#E0E0E0"
147CELLPADDING="5"
148><TR
149><TD
150><PRE
151CLASS="php"
152>&#60;?php
153 $link = fbsql_pconnect ("localhost", "_SYSTEM", "secret")
154 or die ("Could not connect");
155 $sql = "SELECT BLOB_COLUMN FROM BLOB_TABLE;";
156 $rs = fbsql_query($sql, $link);
157 $row_data = fbsql_fetch_row($rs);
158 // $row_data[0] will now contain the blob data for teh first row
159 fbsql_free_result($rs);
160
161 $rs = fbsql_query($sql, $link);
162 fbsql_set_lob_mode($rs, FBSQL_LOB_HANDLE);
163 $row_data = fbsql_fetch_row($rs);
164 // $row_data[0] will now contain a handle to the BLOB data in the first row
165 $blob_data = fbsql_read_blob($row_data[0]);
166 fbsql_free_result($rs);
167
168?&#62;</PRE
169></TD
170></TR
171></TABLE
172></DIV
173></TD
174></TR
175></TABLE
176><P
177>&#13; See also: <A
178HREF="function.fbsql-create-blob.html"
179><B
180CLASS="function"
181>fbsql_create_blob()</B
182></A
183>,
184 <B
185CLASS="function"
186>fbsql_read_blob()</B
187>,
188 <A
189HREF="function.fbsql-read-clob.html"
190><B
191CLASS="function"
192>fbsql_read_clob()</B
193></A
194>, and
195 <A
196HREF="function.fbsql-set-lob-mode.html"
197><B
198CLASS="function"
199>fbsql_set_lob_mode()</B
200></A
201>.
202 </P
203></DIV
204><DIV
205CLASS="NAVFOOTER"
206><HR
207ALIGN="LEFT"
208WIDTH="100%"><TABLE
209SUMMARY="Footer navigation table"
210WIDTH="100%"
211BORDER="0"
212CELLPADDING="0"
213CELLSPACING="0"
214><TR
215><TD
216WIDTH="33%"
217ALIGN="left"
218VALIGN="top"
219><A
220HREF="function.fbsql-query.html"
221ACCESSKEY="P"
222>Pøedcházející</A
223></TD
224><TD
225WIDTH="34%"
226ALIGN="center"
227VALIGN="top"
228><A
229HREF="index.html"
230ACCESSKEY="H"
231>Domù</A
232></TD
233><TD
234WIDTH="33%"
235ALIGN="right"
236VALIGN="top"
237><A
238HREF="function.fbsql-read-clob.html"
239ACCESSKEY="N"
240>Dal¹í</A
241></TD
242></TR
243><TR
244><TD
245WIDTH="33%"
246ALIGN="left"
247VALIGN="top"
248>fbsql_query</TD
249><TD
250WIDTH="34%"
251ALIGN="center"
252VALIGN="top"
253><A
254HREF="ref.fbsql.html"
255ACCESSKEY="U"
256>Nahoru</A
257></TD
258><TD
259WIDTH="33%"
260ALIGN="right"
261VALIGN="top"
262>fbsql_read_clob</TD
263></TR
264></TABLE
265></DIV
266></BODY
267></HTML
268>
Note: See TracBrowser for help on using the repository browser.