Debian Codegraph @

doc/programmers-guide/reference-field-idx.html

raw
1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
2 <HTML
3 ><HEAD
4 ><TITLE
5 >Retrieving Field Data by Index</TITLE
6 ><META
7 NAME="GENERATOR"
8 CONTENT="Modular DocBook HTML Stylesheet Version 1.79"><LINK
9 REL="HOME"
10 TITLE="Database Independent Abstraction Layer for C"
11 HREF="index.html"><LINK
12 REL="UP"
13 TITLE="libdbi API Reference"
14 HREF="reference.html"><LINK
15 REL="PREVIOUS"
16 TITLE="Retrieving Field Data by Name"
17 HREF="reference-field.html"><LINK
18 REL="NEXT"
19 TITLE="GNU Free Documentation License"
20 HREF="copying-fdl.html"></HEAD
21 ><BODY
22 CLASS="SECTION"
23 BGCOLOR="#FFFFFF"
24 TEXT="#000000"
25 LINK="#0000FF"
26 VLINK="#840084"
27 ALINK="#0000FF"
28 ><DIV
29 CLASS="NAVHEADER"
30 ><TABLE
31 SUMMARY="Header navigation table"
32 WIDTH="100%"
33 BORDER="0"
34 CELLPADDING="0"
35 CELLSPACING="0"
36 ><TR
37 ><TH
38 COLSPAN="3"
39 ALIGN="center"
40 >Database Independent Abstraction Layer for C: libdbi Programmer's Guide</TH
41 ></TR
42 ><TR
43 ><TD
44 WIDTH="10%"
45 ALIGN="left"
46 VALIGN="bottom"
47 ><A
48 HREF="reference-field.html"
49 ACCESSKEY="P"
50 >Prev</A
51 ></TD
52 ><TD
53 WIDTH="80%"
54 ALIGN="center"
55 VALIGN="bottom"
56 >Chapter 7. libdbi API Reference</TD
57 ><TD
58 WIDTH="10%"
59 ALIGN="right"
60 VALIGN="bottom"
61 ><A
62 HREF="copying-fdl.html"
63 ACCESSKEY="N"
64 >Next</A
65 ></TD
66 ></TR
67 ></TABLE
68 ><HR
69 ALIGN="LEFT"
70 WIDTH="100%"></DIV
71 ><DIV
72 CLASS="SECTION"
73 ><H1
74 CLASS="SECTION"
75 ><A
76 NAME="REFERENCE-FIELD-IDX"
77 >7.9. Retrieving Field Data by Index</A
78 ></H1
79 ><DIV
80 CLASS="SECTION"
81 ><H2
82 CLASS="SECTION"
83 ><A
84 NAME="DBI-RESULT-GET-CHAR-IDX"
85 >7.9.1. dbi_result_get_char_idx</A
86 ></H2
87 ><DIV
88 CLASS="FUNCSYNOPSIS"
89 ><P
90 ></P
91 ><A
92 NAME="AEN3829"
93 ></A
94 ><P
95 ><CODE
96 ><CODE
97 CLASS="FUNCDEF"
98 >signed char <B
99 CLASS="FSFUNC"
100 >dbi_result_get_char_idx</B
101 ></CODE
102 >(dbi_result <VAR
103 CLASS="PDPARAM"
104 >Result</VAR
105 >, unsigned int <VAR
106 CLASS="PDPARAM"
107 >fieldidx</VAR
108 >);</CODE
109 ></P
110 ><P
111 ></P
112 ></DIV
113 ><P
114 >Fetch the data stored in the speficied field, which contains a character (a 1-byte signed integer). This is the default for the "char" type on the x86 platform, as well as on Mac OS X.</P
115 ><P
116 ></P
117 ><DIV
118 CLASS="VARIABLELIST"
119 ><DL
120 ><DT
121 >Arguments</DT
122 ><DD
123 ><P
124 ><TT
125 CLASS="LITERAL"
126 >Result</TT
127 >: The target query result.</P
128 ><P
129 ><TT
130 CLASS="LITERAL"
131 >fieldidx</TT
132 >: The index of the target field (starting at 1).</P
133 ></DD
134 ><DT
135 >Returns</DT
136 ><DD
137 ><P
138 >The data stored in the specified field, or 0 (zero) if an error occurs. In the latter case the <A
139 HREF="errornumbers.html"
140 >error number</A
141 > is DBI_ERROR_BADTYPE or DBI_ERROR_BADIDX.</P
142 ></DD
143 ></DL
144 ></DIV
145 ></DIV
146 ><DIV
147 CLASS="SECTION"
148 ><H2
149 CLASS="SECTION"
150 ><A
151 NAME="DBI-RESULT-GET-UCHAR-IDX"
152 >7.9.2. dbi_result_get_uchar_idx</A
153 ></H2
154 ><DIV
155 CLASS="FUNCSYNOPSIS"
156 ><P
157 ></P
158 ><A
159 NAME="AEN3853"
160 ></A
161 ><P
162 ><CODE
163 ><CODE
164 CLASS="FUNCDEF"
165 >unsigned char <B
166 CLASS="FSFUNC"
167 >dbi_result_get_uchar_idx</B
168 ></CODE
169 >(dbi_result <VAR
170 CLASS="PDPARAM"
171 >Result</VAR
172 >, unsigned int <VAR
173 CLASS="PDPARAM"
174 >fieldidx</VAR
175 >);</CODE
176 ></P
177 ><P
178 ></P
179 ></DIV
180 ><P
181 >Fetch the data stored in the speficied field, which contains an unsigned character (1-byte unsigned integer). This is the default for the "char" type on Linux for PowerPC.</P
182 ><P
183 ></P
184 ><DIV
185 CLASS="VARIABLELIST"
186 ><DL
187 ><DT
188 >Arguments</DT
189 ><DD
190 ><P
191 ><TT
192 CLASS="LITERAL"
193 >Result</TT
194 >: The target query result.</P
195 ><P
196 ><TT
197 CLASS="LITERAL"
198 >fieldidx</TT
199 >: The index of the target field (starting at 1).</P
200 ></DD
201 ><DT
202 >Returns</DT
203 ><DD
204 ><P
205 >The data stored in the specified field, or 0 (zero) if an error occurs. In the latter case the <A
206 HREF="errornumbers.html"
207 >error number</A
208 > is DBI_ERROR_BADTYPE or DBI_ERROR_BADIDX.</P
209 ></DD
210 ></DL
211 ></DIV
212 ></DIV
213 ><DIV
214 CLASS="SECTION"
215 ><H2
216 CLASS="SECTION"
217 ><A
218 NAME="DBI-RESULT-GET-SHORT-IDX"
219 >7.9.3. dbi_result_get_short_idx</A
220 ></H2
221 ><DIV
222 CLASS="FUNCSYNOPSIS"
223 ><P
224 ></P
225 ><A
226 NAME="AEN3877"
227 ></A
228 ><P
229 ><CODE
230 ><CODE
231 CLASS="FUNCDEF"
232 >short <B
233 CLASS="FSFUNC"
234 >dbi_result_get_short_idx</B
235 ></CODE
236 >(dbi_result <VAR
237 CLASS="PDPARAM"
238 >Result</VAR
239 >, unsigned int <VAR
240 CLASS="PDPARAM"
241 >fieldidx</VAR
242 >);</CODE
243 ></P
244 ><P
245 ></P
246 ></DIV
247 ><P
248 >Fetch the data stored in the speficied field, which contains a short integer (2-byte signed integer).</P
249 ><P
250 ></P
251 ><DIV
252 CLASS="VARIABLELIST"
253 ><DL
254 ><DT
255 >Arguments</DT
256 ><DD
257 ><P
258 ><TT
259 CLASS="LITERAL"
260 >Result</TT
261 >: The target query result.</P
262 ><P
263 ><TT
264 CLASS="LITERAL"
265 >fieldidx</TT
266 >: The index of the target field (starting at 1).</P
267 ></DD
268 ><DT
269 >Returns</DT
270 ><DD
271 ><P
272 >The data stored in the specified field, or 0 (zero) if an error occurs. In the latter case the <A
273 HREF="errornumbers.html"
274 >error number</A
275 > is DBI_ERROR_BADTYPE or DBI_ERROR_BADIDX.</P
276 ></DD
277 ></DL
278 ></DIV
279 ></DIV
280 ><DIV
281 CLASS="SECTION"
282 ><H2
283 CLASS="SECTION"
284 ><A
285 NAME="DBI-RESULT-GET-USHORT-IDX"
286 >7.9.4. dbi_result_get_ushort_idx</A
287 ></H2
288 ><DIV
289 CLASS="FUNCSYNOPSIS"
290 ><P
291 ></P
292 ><A
293 NAME="AEN3901"
294 ></A
295 ><P
296 ><CODE
297 ><CODE
298 CLASS="FUNCDEF"
299 >unsigned short <B
300 CLASS="FSFUNC"
301 >dbi_result_get_ushort_idx</B
302 ></CODE
303 >(dbi_result <VAR
304 CLASS="PDPARAM"
305 >Result</VAR
306 >, unsigned int <VAR
307 CLASS="PDPARAM"
308 >fieldidx</VAR
309 >);</CODE
310 ></P
311 ><P
312 ></P
313 ></DIV
314 ><P
315 >Fetch the data stored in the speficied field, which contains an unsigned short integer (2-byte unsigned integer).</P
316 ><P
317 ></P
318 ><DIV
319 CLASS="VARIABLELIST"
320 ><DL
321 ><DT
322 >Arguments</DT
323 ><DD
324 ><P
325 ><TT
326 CLASS="LITERAL"
327 >Result</TT
328 >: The target query result.</P
329 ><P
330 ><TT
331 CLASS="LITERAL"
332 >fieldidx</TT
333 >: The index of the target field (starting at 1).</P
334 ></DD
335 ><DT
336 >Returns</DT
337 ><DD
338 ><P
339 >The data stored in the specified field, or 0 (zero) if an error occurs. In the latter case the <A
340 HREF="errornumbers.html"
341 >error number</A
342 > is DBI_ERROR_BADTYPE or DBI_ERROR_BADIDX.</P
343 ></DD
344 ></DL
345 ></DIV
346 ></DIV
347 ><DIV
348 CLASS="SECTION"
349 ><H2
350 CLASS="SECTION"
351 ><A
352 NAME="DBI-RESULT-GET-INT-IDX"
353 >7.9.5. dbi_result_get_int_idx</A
354 ></H2
355 ><DIV
356 CLASS="FUNCSYNOPSIS"
357 ><P
358 ></P
359 ><A
360 NAME="AEN3925"
361 ></A
362 ><P
363 ><CODE
364 ><CODE
365 CLASS="FUNCDEF"
366 >int <B
367 CLASS="FSFUNC"
368 >dbi_result_get_int_idx</B
369 ></CODE
370 >(dbi_result <VAR
371 CLASS="PDPARAM"
372 >Result</VAR
373 >, unsigned int <VAR
374 CLASS="PDPARAM"
375 >fieldidx</VAR
376 >);</CODE
377 ></P
378 ><P
379 ></P
380 ></DIV
381 ><P
382 >Fetch the data stored in the speficied field, which contains an integer (4-byte signed integer).</P
383 ><P
384 ></P
385 ><DIV
386 CLASS="VARIABLELIST"
387 ><DL
388 ><DT
389 >Arguments</DT
390 ><DD
391 ><P
392 ><TT
393 CLASS="LITERAL"
394 >Result</TT
395 >: The target query result.</P
396 ><P
397 ><TT
398 CLASS="LITERAL"
399 >fieldidx</TT
400 >: The index of the target field (starting at 1).</P
401 ></DD
402 ><DT
403 >Returns</DT
404 ><DD
405 ><P
406 >The data stored in the specified field, or 0 (zero) if an error occurs. In the latter case the <A
407 HREF="errornumbers.html"
408 >error number</A
409 > is DBI_ERROR_BADTYPE or DBI_ERROR_BADIDX.</P
410 ></DD
411 ><DT
412 >Availability</DT
413 ><DD
414 ><P
415 >0.8.0</P
416 ></DD
417 ></DL
418 ></DIV
419 ></DIV
420 ><DIV
421 CLASS="SECTION"
422 ><H2
423 CLASS="SECTION"
424 ><A
425 NAME="DBI-RESULT-GET-UINT-IDX"
426 >7.9.6. dbi_result_get_uint_idx</A
427 ></H2
428 ><DIV
429 CLASS="FUNCSYNOPSIS"
430 ><P
431 ></P
432 ><A
433 NAME="AEN3953"
434 ></A
435 ><P
436 ><CODE
437 ><CODE
438 CLASS="FUNCDEF"
439 >unsigned int <B
440 CLASS="FSFUNC"
441 >dbi_result_get_uint_idx</B
442 ></CODE
443 >(dbi_result <VAR
444 CLASS="PDPARAM"
445 >Result</VAR
446 >, unsigned int <VAR
447 CLASS="PDPARAM"
448 >fieldidx</VAR
449 >);</CODE
450 ></P
451 ><P
452 ></P
453 ></DIV
454 ><P
455 >Fetch the data stored in the speficied field, which contains an unsigned integer (4-byte signed integer).</P
456 ><P
457 ></P
458 ><DIV
459 CLASS="VARIABLELIST"
460 ><DL
461 ><DT
462 >Arguments</DT
463 ><DD
464 ><P
465 ><TT
466 CLASS="LITERAL"
467 >Result</TT
468 >: The target query result.</P
469 ><P
470 ><TT
471 CLASS="LITERAL"
472 >fieldidx</TT
473 >: The index of the target field (starting at 1).</P
474 ></DD
475 ><DT
476 >Returns</DT
477 ><DD
478 ><P
479 >The data stored in the specified field, or 0 (zero) if an error occurs. In the latter case the <A
480 HREF="errornumbers.html"
481 >error number</A
482 > is DBI_ERROR_BADTYPE or DBI_ERROR_BADIDX.</P
483 ></DD
484 ><DT
485 >Availability</DT
486 ><DD
487 ><P
488 >0.8.0</P
489 ></DD
490 ></DL
491 ></DIV
492 ></DIV
493 ><DIV
494 CLASS="SECTION"
495 ><H2
496 CLASS="SECTION"
497 ><A
498 NAME="DBI-RESULT-GET-LONG-IDX"
499 >7.9.7. dbi_result_get_long_idx</A
500 ></H2
501 ><DIV
502 CLASS="FUNCSYNOPSIS"
503 ><P
504 ></P
505 ><A
506 NAME="AEN3981"
507 ></A
508 ><P
509 ><CODE
510 ><CODE
511 CLASS="FUNCDEF"
512 >int <B
513 CLASS="FSFUNC"
514 >dbi_result_get_long_idx</B
515 ></CODE
516 >(dbi_result <VAR
517 CLASS="PDPARAM"
518 >Result</VAR
519 >, unsigned int <VAR
520 CLASS="PDPARAM"
521 >fieldidx</VAR
522 >);</CODE
523 ></P
524 ><P
525 ></P
526 ></DIV
527 ><P
528 >Same as <A
529 HREF="reference-field-idx.html#DBI-RESULT-GET-INT-IDX"
530 >dbi_result_get_int_idx</A
531 >. This function is deprecated as the name implies the wrong return type on 64bit platforms.</P
532 ></DIV
533 ><DIV
534 CLASS="SECTION"
535 ><H2
536 CLASS="SECTION"
537 ><A
538 NAME="DBI-RESULT-GET-ULONG-IDX"
539 >7.9.8. dbi_result_get_ulong_idx</A
540 ></H2
541 ><DIV
542 CLASS="FUNCSYNOPSIS"
543 ><P
544 ></P
545 ><A
546 NAME="AEN3993"
547 ></A
548 ><P
549 ><CODE
550 ><CODE
551 CLASS="FUNCDEF"
552 >unsigned int <B
553 CLASS="FSFUNC"
554 >dbi_result_get_ulong_idx</B
555 ></CODE
556 >(dbi_result <VAR
557 CLASS="PDPARAM"
558 >Result</VAR
559 >, unsigned int <VAR
560 CLASS="PDPARAM"
561 >fieldidx</VAR
562 >);</CODE
563 ></P
564 ><P
565 ></P
566 ></DIV
567 ><P
568 >Same as <A
569 HREF="reference-field-idx.html#DBI-RESULT-GET-UINT-IDX"
570 >dbi_result_get_uint_idx</A
571 >. This function is deprecated as the name implies the wrong return type on 64bit platforms.</P
572 ></DIV
573 ><DIV
574 CLASS="SECTION"
575 ><H2
576 CLASS="SECTION"
577 ><A
578 NAME="DBI-RESULT-GET-LONGLONG-IDX"
579 >7.9.9. dbi_result_get_longlong_idx</A
580 ></H2
581 ><DIV
582 CLASS="FUNCSYNOPSIS"
583 ><P
584 ></P
585 ><A
586 NAME="AEN4005"
587 ></A
588 ><P
589 ><CODE
590 ><CODE
591 CLASS="FUNCDEF"
592 >long long <B
593 CLASS="FSFUNC"
594 >dbi_result_get_longlong_idx</B
595 ></CODE
596 >(dbi_result <VAR
597 CLASS="PDPARAM"
598 >Result</VAR
599 >, unsigned int <VAR
600 CLASS="PDPARAM"
601 >fieldidx</VAR
602 >);</CODE
603 ></P
604 ><P
605 ></P
606 ></DIV
607 ><P
608 >Fetch the data stored in the speficied field, which contains a long long integer (8-byte signed integer).</P
609 ><P
610 ></P
611 ><DIV
612 CLASS="VARIABLELIST"
613 ><DL
614 ><DT
615 >Arguments</DT
616 ><DD
617 ><P
618 ><TT
619 CLASS="LITERAL"
620 >Result</TT
621 >: The target query result.</P
622 ><P
623 ><TT
624 CLASS="LITERAL"
625 >fieldidx</TT
626 >: The index of the target field (starting at 1).</P
627 ></DD
628 ><DT
629 >Returns</DT
630 ><DD
631 ><P
632 >The data stored in the specified field, or 0 (zero) if an error occurs. In the latter case the <A
633 HREF="errornumbers.html"
634 >error number</A
635 > is DBI_ERROR_BADTYPE or DBI_ERROR_BADIDX.</P
636 ></DD
637 ></DL
638 ></DIV
639 ></DIV
640 ><DIV
641 CLASS="SECTION"
642 ><H2
643 CLASS="SECTION"
644 ><A
645 NAME="DBI-RESULT-GET-ULONGLONG-IDX"
646 >7.9.10. dbi_result_get_ulonglong_idx</A
647 ></H2
648 ><DIV
649 CLASS="FUNCSYNOPSIS"
650 ><P
651 ></P
652 ><A
653 NAME="AEN4029"
654 ></A
655 ><P
656 ><CODE
657 ><CODE
658 CLASS="FUNCDEF"
659 >unsigned long long <B
660 CLASS="FSFUNC"
661 >dbi_result_get_ulonglong_idx</B
662 ></CODE
663 >(dbi_result <VAR
664 CLASS="PDPARAM"
665 >Result</VAR
666 >, unsigned int <VAR
667 CLASS="PDPARAM"
668 >fieldidx</VAR
669 >);</CODE
670 ></P
671 ><P
672 ></P
673 ></DIV
674 ><P
675 >Fetch the data stored in the speficied field, which contains an unsigned long long integer (8-byte unsigned integer).</P
676 ><P
677 ></P
678 ><DIV
679 CLASS="VARIABLELIST"
680 ><DL
681 ><DT
682 >Arguments</DT
683 ><DD
684 ><P
685 ><TT
686 CLASS="LITERAL"
687 >Result</TT
688 >: The target query result.</P
689 ><P
690 ><TT
691 CLASS="LITERAL"
692 >fieldidx</TT
693 >: The index of the target field (starting at 1).</P
694 ></DD
695 ><DT
696 >Returns</DT
697 ><DD
698 ><P
699 >The data stored in the specified field, or 0 (zero) if an error occurs. In the latter case the <A
700 HREF="errornumbers.html"
701 >error number</A
702 > is DBI_ERROR_BADTYPE or DBI_ERROR_BADIDX.</P
703 ></DD
704 ></DL
705 ></DIV
706 ></DIV
707 ><DIV
708 CLASS="SECTION"
709 ><H2
710 CLASS="SECTION"
711 ><A
712 NAME="DBI-RESULT-GET-FLOAT-IDX"
713 >7.9.11. dbi_result_get_float_idx</A
714 ></H2
715 ><DIV
716 CLASS="FUNCSYNOPSIS"
717 ><P
718 ></P
719 ><A
720 NAME="AEN4053"
721 ></A
722 ><P
723 ><CODE
724 ><CODE
725 CLASS="FUNCDEF"
726 >float <B
727 CLASS="FSFUNC"
728 >dbi_result_get_float_idx</B
729 ></CODE
730 >(dbi_result <VAR
731 CLASS="PDPARAM"
732 >Result</VAR
733 >, unsigned int <VAR
734 CLASS="PDPARAM"
735 >fieldidx</VAR
736 >);</CODE
737 ></P
738 ><P
739 ></P
740 ></DIV
741 ><P
742 >Fetch the data stored in the speficied field, which contains a floating-point number.</P
743 ><P
744 ></P
745 ><DIV
746 CLASS="VARIABLELIST"
747 ><DL
748 ><DT
749 >Arguments</DT
750 ><DD
751 ><P
752 ><TT
753 CLASS="LITERAL"
754 >Result</TT
755 >: The target query result.</P
756 ><P
757 ><TT
758 CLASS="LITERAL"
759 >fieldidx</TT
760 >: The index of the target field (starting at 1).</P
761 ></DD
762 ><DT
763 >Returns</DT
764 ><DD
765 ><P
766 >The data stored in the specified field, or 0 (zero) if an error occurs. In the latter case the <A
767 HREF="errornumbers.html"
768 >error number</A
769 > is DBI_ERROR_BADTYPE or DBI_ERROR_BADIDX.</P
770 ></DD
771 ></DL
772 ></DIV
773 ></DIV
774 ><DIV
775 CLASS="SECTION"
776 ><H2
777 CLASS="SECTION"
778 ><A
779 NAME="DBI-RESULT-GET-DOUBLE-IDX"
780 >7.9.12. dbi_result_get_double_idx</A
781 ></H2
782 ><DIV
783 CLASS="FUNCSYNOPSIS"
784 ><P
785 ></P
786 ><A
787 NAME="AEN4077"
788 ></A
789 ><P
790 ><CODE
791 ><CODE
792 CLASS="FUNCDEF"
793 >double <B
794 CLASS="FSFUNC"
795 >dbi_result_get_double_idx</B
796 ></CODE
797 >(dbi_result <VAR
798 CLASS="PDPARAM"
799 >Result</VAR
800 >, unsigned int <VAR
801 CLASS="PDPARAM"
802 >fieldidx</VAR
803 >);</CODE
804 ></P
805 ><P
806 ></P
807 ></DIV
808 ><P
809 >Fetch the data stored in the speficied field, which contains a double-precision fractional number.</P
810 ><P
811 ></P
812 ><DIV
813 CLASS="VARIABLELIST"
814 ><DL
815 ><DT
816 >Arguments</DT
817 ><DD
818 ><P
819 ><TT
820 CLASS="LITERAL"
821 >Result</TT
822 >: The target query result.</P
823 ><P
824 ><TT
825 CLASS="LITERAL"
826 >fieldidx</TT
827 >: The index of the target field (starting at 1).</P
828 ></DD
829 ><DT
830 >Returns</DT
831 ><DD
832 ><P
833 >The data stored in the specified field, or 0 (zero) if an error occurs. In the latter case the <A
834 HREF="errornumbers.html"
835 >error number</A
836 > is DBI_ERROR_BADTYPE or DBI_ERROR_BADIDX.</P
837 ></DD
838 ></DL
839 ></DIV
840 ></DIV
841 ><DIV
842 CLASS="SECTION"
843 ><H2
844 CLASS="SECTION"
845 ><A
846 NAME="DBI-RESULT-GET-STRING-IDX"
847 >7.9.13. dbi_result_get_string_idx</A
848 ></H2
849 ><DIV
850 CLASS="FUNCSYNOPSIS"
851 ><P
852 ></P
853 ><A
854 NAME="AEN4101"
855 ></A
856 ><P
857 ><CODE
858 ><CODE
859 CLASS="FUNCDEF"
860 >const char *<B
861 CLASS="FSFUNC"
862 >dbi_result_get_string_idx</B
863 ></CODE
864 >(dbi_result <VAR
865 CLASS="PDPARAM"
866 >Result</VAR
867 >, unsigned int <VAR
868 CLASS="PDPARAM"
869 >fieldidx</VAR
870 >);</CODE
871 ></P
872 ><P
873 ></P
874 ></DIV
875 ><P
876 >Fetch the data stored in the speficied field, which contains a zero-terminated string.</P
877 ><P
878 ></P
879 ><DIV
880 CLASS="VARIABLELIST"
881 ><DL
882 ><DT
883 >Arguments</DT
884 ><DD
885 ><P
886 ><TT
887 CLASS="LITERAL"
888 >Result</TT
889 >: The target query result.</P
890 ><P
891 ><TT
892 CLASS="LITERAL"
893 >fieldidx</TT
894 >: The index of the target field (starting at 1).</P
895 ></DD
896 ><DT
897 >Returns</DT
898 ><DD
899 ><P
900 >The data stored in the specified field. If the field contains a NULL value, the function returns a NULL pointer. The string may not be modified, and may not necessairly persist between row fetches. In case of an error, this function returns the string "ERROR". In the latter case the <A
901 HREF="errornumbers.html"
902 >error number</A
903 > is DBI_ERROR_BADTYPE, DBI_ERROR_BADIDX, or DBI_ERROR_BADNAME.</P
904 ></DD
905 ></DL
906 ></DIV
907 ></DIV
908 ><DIV
909 CLASS="SECTION"
910 ><H2
911 CLASS="SECTION"
912 ><A
913 NAME="DBI-RESULT-GET-STRING-COPY-IDX"
914 >7.9.14. dbi_result_get_string_copy_idx</A
915 ></H2
916 ><DIV
917 CLASS="FUNCSYNOPSIS"
918 ><P
919 ></P
920 ><A
921 NAME="AEN4125"
922 ></A
923 ><P
924 ><CODE
925 ><CODE
926 CLASS="FUNCDEF"
927 >char *<B
928 CLASS="FSFUNC"
929 >dbi_result_get_string_copy_idx</B
930 ></CODE
931 >(dbi_result <VAR
932 CLASS="PDPARAM"
933 >Result</VAR
934 >, unsigned int <VAR
935 CLASS="PDPARAM"
936 >fieldidx</VAR
937 >);</CODE
938 ></P
939 ><P
940 ></P
941 ></DIV
942 ><P
943 >Fetch the data stored in the speficied field, which contains a zero-terminated string, and return it in an allocated buffer.</P
944 ><P
945 ></P
946 ><DIV
947 CLASS="VARIABLELIST"
948 ><DL
949 ><DT
950 >Arguments</DT
951 ><DD
952 ><P
953 ><TT
954 CLASS="LITERAL"
955 >Result</TT
956 >: The target query result.</P
957 ><P
958 ><TT
959 CLASS="LITERAL"
960 >fieldidx</TT
961 >: The index of the target field (starting at 1).</P
962 ></DD
963 ><DT
964 >Returns</DT
965 ><DD
966 ><P
967 >The data stored in the specified field. If the field contains a NULL value, the function returns a NULL pointer, and no memory is allocated. The newly allocated string may be modified by the host program, but the program is responsible for freeing the string. In case of an error, this function returns an allocated string reading "ERROR". In the latter case the <A
968 HREF="errornumbers.html"
969 >error number</A
970 > is DBI_ERROR_BADTYPE, DBI_ERROR_BADIDX, or DBI_ERROR_BADNAME.</P
971 ></DD
972 ></DL
973 ></DIV
974 ></DIV
975 ><DIV
976 CLASS="SECTION"
977 ><H2
978 CLASS="SECTION"
979 ><A
980 NAME="DBI-RESULT-GET-BINARY-IDX"
981 >7.9.15. dbi_result_get_binary_idx</A
982 ></H2
983 ><DIV
984 CLASS="FUNCSYNOPSIS"
985 ><P
986 ></P
987 ><A
988 NAME="AEN4149"
989 ></A
990 ><P
991 ><CODE
992 ><CODE
993 CLASS="FUNCDEF"
994 >const unsigned char *<B
995 CLASS="FSFUNC"
996 >dbi_result_get_binary_idx</B
997 ></CODE
998 >(dbi_result <VAR
999 CLASS="PDPARAM"
1000 >Result</VAR
1001 >, unsigned int <VAR
1002 CLASS="PDPARAM"
1003 >fieldidx</VAR
1004 >);</CODE
1005 ></P
1006 ><P
1007 ></P
1008 ></DIV
1009 ><P
1010 >Fetch the data stored in the speficied field, which contains binary data. The data may not be modified, and may not necessarily persist between row fetches. If the field contains a NULL value, the function returns a NULL pointer. In case of an error, this function returns the string "ERROR".</P
1011 ><P
1012 ></P
1013 ><DIV
1014 CLASS="VARIABLELIST"
1015 ><DL
1016 ><DT
1017 >Arguments</DT
1018 ><DD
1019 ><P
1020 ><TT
1021 CLASS="LITERAL"
1022 >Result</TT
1023 >: The target query result.</P
1024 ><P
1025 ><TT
1026 CLASS="LITERAL"
1027 >fieldidx</TT
1028 >: The index of the target field (starting at 1).</P
1029 ></DD
1030 ><DT
1031 >Returns</DT
1032 ><DD
1033 ><P
1034 >The data stored in the specified field. The binary data may contain zero bytes and non-printable characters. Use <A
1035 HREF="reference-field-meta.html#DBI-RESULT-GET-FIELD-LENGTH"
1036 >dbi_result_get_field_length</A
1037 > or <A
1038 HREF="reference-field-meta.html#DBI-RESULT-GET-FIELD-LENGTH-IDX"
1039 >dbi_result_get_field_length_idx</A
1040 > to determine the number of bytes contained in the resulting binary string. The data may not be modified, and may not necessarily persist between row fetches. If the field contains a NULL value, the function returns a NULL pointer. In case of an error, this function returns the string "ERROR". In the latter case the <A
1041 HREF="errornumbers.html"
1042 >error number</A
1043 > is DBI_ERROR_BADTYPE, DBI_ERROR_BADIDX, or DBI_ERROR_BADNAME.</P
1044 ></DD
1045 ></DL
1046 ></DIV
1047 ></DIV
1048 ><DIV
1049 CLASS="SECTION"
1050 ><H2
1051 CLASS="SECTION"
1052 ><A
1053 NAME="DBI-RESULT-GET-BINARY-COPY-IDX"
1054 >7.9.16. dbi_result_get_binary_copy_idx</A
1055 ></H2
1056 ><DIV
1057 CLASS="FUNCSYNOPSIS"
1058 ><P
1059 ></P
1060 ><A
1061 NAME="AEN4175"
1062 ></A
1063 ><P
1064 ><CODE
1065 ><CODE
1066 CLASS="FUNCDEF"
1067 >unsigned char *<B
1068 CLASS="FSFUNC"
1069 >dbi_result_get_binary_copy_idx</B
1070 ></CODE
1071 >(dbi_result <VAR
1072 CLASS="PDPARAM"
1073 >Result</VAR
1074 >, unsigned int <VAR
1075 CLASS="PDPARAM"
1076 >fieldidx</VAR
1077 >);</CODE
1078 ></P
1079 ><P
1080 ></P
1081 ></DIV
1082 ><P
1083 >Fetch the data stored in the speficied field, which contains binary data, and return it in an allocated buffer. The newly allocated memory may be modified by the host program, but the program is responsible for freeing the data. If the field contains a NULL value, the function returns a NULL pointer. In case of an error, this function returns the string "ERROR".</P
1084 ><P
1085 ></P
1086 ><DIV
1087 CLASS="VARIABLELIST"
1088 ><DL
1089 ><DT
1090 >Arguments</DT
1091 ><DD
1092 ><P
1093 ><TT
1094 CLASS="LITERAL"
1095 >Result</TT
1096 >: The target query result.</P
1097 ><P
1098 ><TT
1099 CLASS="LITERAL"
1100 >fieldidx</TT
1101 >: The index of the target field (starting at 1).</P
1102 ></DD
1103 ><DT
1104 >Returns</DT
1105 ><DD
1106 ><P
1107 >The data stored in the specified field. The newly allocated memory may be modified by the host program, but the program is responsible for freeing the data. If the field contains a NULL value, the function returns a NULL pointer. In case of an error, this function returns the string "ERROR". In the latter case the <A
1108 HREF="errornumbers.html"
1109 >error number</A
1110 > is DBI_ERROR_BADTYPE, DBI_ERROR_BADIDX, or DBI_ERROR_BADNAME.</P
1111 ></DD
1112 ></DL
1113 ></DIV
1114 ></DIV
1115 ><DIV
1116 CLASS="SECTION"
1117 ><H2
1118 CLASS="SECTION"
1119 ><A
1120 NAME="DBI-RESULT-GET-DATETIME-IDX"
1121 >7.9.17. dbi_result_get_datetime_idx</A
1122 ></H2
1123 ><DIV
1124 CLASS="FUNCSYNOPSIS"
1125 ><P
1126 ></P
1127 ><A
1128 NAME="AEN4199"
1129 ></A
1130 ><P
1131 ><CODE
1132 ><CODE
1133 CLASS="FUNCDEF"
1134 >time_t <B
1135 CLASS="FSFUNC"
1136 >dbi_result_get_datetime_idx</B
1137 ></CODE
1138 >(dbi_result <VAR
1139 CLASS="PDPARAM"
1140 >Result</VAR
1141 >, unsigned int <VAR
1142 CLASS="PDPARAM"
1143 >fieldidx</VAR
1144 >);</CODE
1145 ></P
1146 ><P
1147 ></P
1148 ></DIV
1149 ><P
1150 >Fetch the data stored in the specified field, which contains a DATE and/or TIME value.</P
1151 ><P
1152 ></P
1153 ><DIV
1154 CLASS="VARIABLELIST"
1155 ><DL
1156 ><DT
1157 >Arguments</DT
1158 ><DD
1159 ><P
1160 ><TT
1161 CLASS="LITERAL"
1162 >Result</TT
1163 >: The target query result.</P
1164 ><P
1165 ><TT
1166 CLASS="LITERAL"
1167 >fieldidx</TT
1168 >: The index of the target field (starting at 1).</P
1169 ></DD
1170 ><DT
1171 >Returns</DT
1172 ><DD
1173 ><P
1174 >The data stored in the specified field as a time_t value. To convert this into human-readable dates or times, use the C library functions gmtime (3) and localtime (3). In case of an error this function returns 0 (zero) which resolves to the Unix epoch when converted. In case of an error the <A
1175 HREF="errornumbers.html"
1176 >error number</A
1177 > is DBI_ERROR_BADTYPE, DBI_ERROR_BADIDX, or DBI_ERROR_BADNAME.</P
1178 ></DD
1179 ></DL
1180 ></DIV
1181 ></DIV
1182 ><DIV
1183 CLASS="SECTION"
1184 ><H2
1185 CLASS="SECTION"
1186 ><A
1187 NAME="DBI-RESULT-GET-AS-LONGLONG-IDX"
1188 >7.9.18. dbi_result_get_as_longlong_idx</A
1189 ></H2
1190 ><DIV
1191 CLASS="FUNCSYNOPSIS"
1192 ><P
1193 ></P
1194 ><A
1195 NAME="AEN4223"
1196 ></A
1197 ><P
1198 ><CODE
1199 ><CODE
1200 CLASS="FUNCDEF"
1201 >long long <B
1202 CLASS="FSFUNC"
1203 >dbi_result_get_as_longlong_idx</B
1204 ></CODE
1205 >(dbi_result <VAR
1206 CLASS="PDPARAM"
1207 >Result</VAR
1208 >, unsigned int <VAR
1209 CLASS="PDPARAM"
1210 >fieldidx</VAR
1211 >);</CODE
1212 ></P
1213 ><P
1214 ></P
1215 ></DIV
1216 ><P
1217 >Fetch the data stored in the specified field. Return the contents as a long long integer value, using appropriate casts or conversions if applicable.</P
1218 ><P
1219 ></P
1220 ><DIV
1221 CLASS="VARIABLELIST"
1222 ><DL
1223 ><DT
1224 >Arguments</DT
1225 ><DD
1226 ><P
1227 ><TT
1228 CLASS="LITERAL"
1229 >Result</TT
1230 >: The target query result.</P
1231 ><P
1232 ><TT
1233 CLASS="LITERAL"
1234 >fieldidx</TT
1235 >: The index of the target field (starting at 1).</P
1236 ></DD
1237 ><DT
1238 >Returns</DT
1239 ><DD
1240 ><P
1241 >The data stored in the specified field as a long long integer. Integer and floating point data as well as datetime data are cast to long long. Strings are converted using strtoll(). Empty strings, strings that do not translate into an integer, and binary strings are returned as 0 (zero) without raising an error. In case of an error this function returns 0 (zero) and the <A
1242 HREF="errornumbers.html"
1243 >error number</A
1244 > is DBI_ERROR_BADTYPE, DBI_ERROR_BADIDX, or DBI_ERROR_BADNAME.</P
1245 ></DD
1246 ><DT
1247 >Availability</DT
1248 ><DD
1249 ><P
1250 >0.9.0</P
1251 ></DD
1252 ></DL
1253 ></DIV
1254 ></DIV
1255 ><DIV
1256 CLASS="SECTION"
1257 ><H2
1258 CLASS="SECTION"
1259 ><A
1260 NAME="DBI-RESULT-GET-AS-STRING-COPY-IDX"
1261 >7.9.19. dbi_result_get_as_string_copy_idx</A
1262 ></H2
1263 ><DIV
1264 CLASS="FUNCSYNOPSIS"
1265 ><P
1266 ></P
1267 ><A
1268 NAME="AEN4251"
1269 ></A
1270 ><P
1271 ><CODE
1272 ><CODE
1273 CLASS="FUNCDEF"
1274 >char *<B
1275 CLASS="FSFUNC"
1276 >dbi_result_get_as_string_copy_idx</B
1277 ></CODE
1278 >(dbi_result <VAR
1279 CLASS="PDPARAM"
1280 >Result</VAR
1281 >, unsigned int <VAR
1282 CLASS="PDPARAM"
1283 >fieldidx</VAR
1284 >);</CODE
1285 ></P
1286 ><P
1287 ></P
1288 ></DIV
1289 ><P
1290 >Fetch the data stored in the specified field. Return the contents as an allocated string, using appropriate conversions if applicable. The caller is responsible for freeing the returned buffer when done.</P
1291 ><P
1292 ></P
1293 ><DIV
1294 CLASS="VARIABLELIST"
1295 ><DL
1296 ><DT
1297 >Arguments</DT
1298 ><DD
1299 ><P
1300 ><TT
1301 CLASS="LITERAL"
1302 >Result</TT
1303 >: The target query result.</P
1304 ><P
1305 ><TT
1306 CLASS="LITERAL"
1307 >fieldidx</TT
1308 >: The index of the target field (starting at 1).</P
1309 ></DD
1310 ><DT
1311 >Returns</DT
1312 ><DD
1313 ><P
1314 >A string representation of the data stored in the specified field. Integer, floating point and datetime data are pretty-printed using snprintf(). Strings are returned as such. Empty strings and binary strings are returned as empty strings without raising an error. In case of an error this function returns the string "ERROR" and the <A
1315 HREF="errornumbers.html"
1316 >error number</A
1317 > is DBI_ERROR_NOMEM, DBI_ERROR_BADTYPE, DBI_ERROR_BADIDX, or DBI_ERROR_BADNAME.</P
1318 ></DD
1319 ><DT
1320 >Availability</DT
1321 ><DD
1322 ><P
1323 >0.9.0</P
1324 ></DD
1325 ></DL
1326 ></DIV
1327 ></DIV
1328 ></DIV
1329 ><DIV
1330 CLASS="NAVFOOTER"
1331 ><HR
1332 ALIGN="LEFT"
1333 WIDTH="100%"><TABLE
1334 SUMMARY="Footer navigation table"
1335 WIDTH="100%"
1336 BORDER="0"
1337 CELLPADDING="0"
1338 CELLSPACING="0"
1339 ><TR
1340 ><TD
1341 WIDTH="33%"
1342 ALIGN="left"
1343 VALIGN="top"
1344 ><A
1345 HREF="reference-field.html"
1346 ACCESSKEY="P"
1347 >Prev</A
1348 ></TD
1349 ><TD
1350 WIDTH="34%"
1351 ALIGN="center"
1352 VALIGN="top"
1353 ><A
1354 HREF="index.html"
1355 ACCESSKEY="H"
1356 >Home</A
1357 ></TD
1358 ><TD
1359 WIDTH="33%"
1360 ALIGN="right"
1361 VALIGN="top"
1362 ><A
1363 HREF="copying-fdl.html"
1364 ACCESSKEY="N"
1365 >Next</A
1366 ></TD
1367 ></TR
1368 ><TR
1369 ><TD
1370 WIDTH="33%"
1371 ALIGN="left"
1372 VALIGN="top"
1373 >Retrieving Field Data by Name</TD
1374 ><TD
1375 WIDTH="34%"
1376 ALIGN="center"
1377 VALIGN="top"
1378 ><A
1379 HREF="reference.html"
1380 ACCESSKEY="U"
1381 >Up</A
1382 ></TD
1383 ><TD
1384 WIDTH="33%"
1385 ALIGN="right"
1386 VALIGN="top"
1387 >GNU Free Documentation License</TD
1388 ></TR
1389 ></TABLE
1390 ></DIV
1391 ></BODY
1392 ></HTML
1393 >