source: www/manuals/PHP_manual/function.ovrimos-fetch-into.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.4 KB
Line 
1<HTML
2><HEAD
3><TITLE
4>ovrimos_fetch_into</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="Ovrimos SQL functions"
13HREF="ref.ovrimos.html"><LINK
14REL="PREVIOUS"
15TITLE="ovrimos_execute"
16HREF="function.ovrimos-execute.html"><LINK
17REL="NEXT"
18TITLE="ovrimos_fetch_row"
19HREF="function.ovrimos-fetch-row.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.ovrimos-execute.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.ovrimos-fetch-row.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.ovrimos-fetch-into"
75></A
76>ovrimos_fetch_into</H1
77><DIV
78CLASS="refnamediv"
79><A
80NAME="AEN64493"
81></A
82><P
83> (PHP 4 &#62;= 4.0.3)</P
84>ovrimos_fetch_into&nbsp;--&nbsp;Fetches a row from the result set</DIV
85><DIV
86CLASS="refsect1"
87><A
88NAME="AEN64496"
89></A
90><H2
91>Description</H2
92>bool <B
93CLASS="methodname"
94>ovrimos_fetch_into</B
95> ( int result_id, array result_array [, string how [, int rownumber]])<BR
96></BR
97><P
98>&#13; <B
99CLASS="function"
100>ovrimos_fetch_into()</B
101> is used to fetch a row
102 from the result set.
103 </P
104><P
105>&#13; <B
106CLASS="function"
107>ovrimos_fetch_into()</B
108> fetches a row from the
109 result set into 'result_array', which should be passed by
110 reference. Which row is fetched is determined by the two last
111 parameters. 'how' is one of 'Next' (default), 'Prev', 'First',
112 'Last', 'Absolute', corresponding to forward direction from
113 current position, backward direction from current position,
114 forward direction from the start, backward direction from the end
115 and absolute position from the start (essentially equivalent to
116 'first' but needs 'rownumber'). Case is not
117 significant. 'Rownumber' is optional except for absolute
118 positioning. Returns <TT
119CLASS="constant"
120><B
121>TRUE</B
122></TT
123> or <TT
124CLASS="constant"
125><B
126>FALSE</B
127></TT
128>.
129 </P
130><P
131>&#13; <TABLE
132WIDTH="100%"
133BORDER="0"
134CELLPADDING="0"
135CELLSPACING="0"
136CLASS="EXAMPLE"
137><TR
138><TD
139><DIV
140CLASS="example"
141><A
142NAME="AEN64520"
143></A
144><P
145><B
146>Pøíklad 1. A fetch into example</B
147></P
148><TABLE
149BORDER="0"
150BGCOLOR="#E0E0E0"
151CELLPADDING="5"
152><TR
153><TD
154><PRE
155CLASS="php"
156>&#60;?php
157$conn=ovrimos_connect ("neptune", "8001", "admin", "password");
158if ($conn!=0) {
159 echo "Connection ok!";
160 $res=ovrimos_exec ($conn,"select table_id, table_name from sys.tables");
161 if ($res != 0) {
162 echo "Statement ok!";
163 if (ovrimos_fetch_into ($res, &#38;$row)) {
164 list ($table_id, $table_name) = $row;
165 echo "table_id=".$table_id.", table_name=".$table_name."\n";
166 if (ovrimos_fetch_into ($res, &#38;$row)) {
167 list ($table_id, $table_name) = $row;
168 echo "table_id=".$table_id.", table_name=".$table_name."\n";
169 } else {
170 echo "Next: error\n";
171 }
172 } else {
173 echo "First: error\n";
174 }
175 ovrimos_free_result ($res);
176 }
177 ovrimos_close($conn);
178}
179?&#62;</PRE
180></TD
181></TR
182></TABLE
183></DIV
184></TD
185></TR
186></TABLE
187>
188 This example will fetch a row.
189 </P
190></DIV
191><DIV
192CLASS="NAVFOOTER"
193><HR
194ALIGN="LEFT"
195WIDTH="100%"><TABLE
196SUMMARY="Footer navigation table"
197WIDTH="100%"
198BORDER="0"
199CELLPADDING="0"
200CELLSPACING="0"
201><TR
202><TD
203WIDTH="33%"
204ALIGN="left"
205VALIGN="top"
206><A
207HREF="function.ovrimos-execute.html"
208ACCESSKEY="P"
209>Pøedcházející</A
210></TD
211><TD
212WIDTH="34%"
213ALIGN="center"
214VALIGN="top"
215><A
216HREF="index.html"
217ACCESSKEY="H"
218>Domù</A
219></TD
220><TD
221WIDTH="33%"
222ALIGN="right"
223VALIGN="top"
224><A
225HREF="function.ovrimos-fetch-row.html"
226ACCESSKEY="N"
227>Dal¹í</A
228></TD
229></TR
230><TR
231><TD
232WIDTH="33%"
233ALIGN="left"
234VALIGN="top"
235>ovrimos_execute</TD
236><TD
237WIDTH="34%"
238ALIGN="center"
239VALIGN="top"
240><A
241HREF="ref.ovrimos.html"
242ACCESSKEY="U"
243>Nahoru</A
244></TD
245><TD
246WIDTH="33%"
247ALIGN="right"
248VALIGN="top"
249>ovrimos_fetch_row</TD
250></TR
251></TABLE
252></DIV
253></BODY
254></HTML
255>
Note: See TracBrowser for help on using the repository browser.