File: ref.ifx.html

package info (click to toggle)
php3 3%3A3.0.18-0potato1.1
  • links: PTS
  • area: main
  • in suites: potato
  • size: 17,736 kB
  • ctags: 11,198
  • sloc: ansic: 108,120; sh: 2,512; php: 2,024; yacc: 1,887; makefile: 1,038; perl: 537; pascal: 238; awk: 90; cpp: 28; sql: 11
file content (563 lines) | stat: -rw-r--r-- 12,563 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
<HTML
><HEAD
><TITLE
>Informix functions</TITLE
><META
NAME="GENERATOR"
CONTENT="Modular DocBook HTML Stylesheet Version 1.57"><LINK
REL="HOME"
TITLE="PHP Manual"
HREF="manual.html"><LINK
REL="UP"
TITLE="Function Reference"
HREF="funcref.html"><LINK
REL="PREVIOUS"
TITLE="imap_mail"
HREF="function.imap-mail.html"><LINK
REL="NEXT"
TITLE="ifx_connect"
HREF="function.ifx-connect.html"><META
NAME="HTTP_EQUIV"
CONTENT="text/html; charset=ISO-8859-1"></HEAD
><BODY
CLASS="reference"
BGCOLOR="#FFFFFF"
TEXT="#000000"
LINK="#0000FF"
VLINK="#840084"
ALINK="#0000FF"
><DIV
CLASS="NAVHEADER"
><TABLE
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TH
COLSPAN="3"
ALIGN="center"
>PHP Manual</TH
></TR
><TR
><TD
WIDTH="10%"
ALIGN="left"
VALIGN="bottom"
><A
HREF="function.imap-mail.html"
>Prev</A
></TD
><TD
WIDTH="80%"
ALIGN="center"
VALIGN="bottom"
></TD
><TD
WIDTH="10%"
ALIGN="right"
VALIGN="bottom"
><A
HREF="function.ifx-connect.html"
>Next</A
></TD
></TR
></TABLE
><HR
ALIGN="LEFT"
WIDTH="100%"></DIV
><DIV
CLASS="reference"
><A
NAME="ref.ifx"
></A
><DIV
CLASS="TITLEPAGE"
><H1
CLASS="title"
>XXX. Informix functions</H1
><DIV
CLASS="PARTINTRO"
><A
NAME="AEN17688"
></A
><P
>&#13;    The Informix driver for Informix (IDS) 7.x, SE 7.x, Universal
    Server (IUS) 9.x and IDS 2000 is implemented in "ifx.ec" and
    "php3_ifx.h" in the informix extension directory.  IDS 7.x support
    is fairly complete, with full support for BYTE and TEXT
    columns. IUS 9.x support is partly finished: the new data types
    are there, but SLOB and CLOB support is still under construction.
   </P
><DIV
CLASS="note"
><BLOCKQUOTE
CLASS="note"
><P
><B
>Configuration notes: </B
>
     You need a version of ESQL/C to compile the PHP Informix driver.
     ESQL/C versions from 7.2x on should be OK. ESQL/C is now part of
     the Informix Client SDK.
    </P
><P
>&#13;     Make sure that the "INFORMIXDIR" variable has been set, and that
     $INFORMIXDIR/bin is in your PATH before you run the "configure"
     script.
    </P
><P
> 
     The configure script will autodetect the libraries and include
     directories, if you run "configure --with_informix=yes".  You can
     overide this detection by specifying "IFX_LIBDIR", "IFX_LIBS" and
     "IFX_INCDIR" in the environment.  The configure script will also
     try to detect your Informix server version.  It will set the
     "HAVE_IFX_IUS" conditional compilation variable if your Informix
     version &#62;= 9.00.
    </P
></BLOCKQUOTE
></DIV
><DIV
CLASS="note"
><BLOCKQUOTE
CLASS="note"
><P
><B
>Runtime considerations: </B
>
     Make sure that the Informix environment variables INFORMIXDIR and
     INFORMIXSERVER are available to the PHP ifx driver, and that the
     INFORMIX bin directory is in the PATH. Check this by running a
     script that contains a call to <B
CLASS="function"
>phpinfo()()</B
>
     before you start testing. The <B
CLASS="function"
>phpinfo()()</B
>
     output should list these environment variables. This is true for
     both CGI php and Apache mod_php. You may have to set these
     environment variables in your Apache startup script.
    </P
><P
>&#13;     The Informix shared libraries should also be available to the
     loader (check LD_LINBRARY_PATH or ld.so.conf/ldconfig).
    </P
></BLOCKQUOTE
></DIV
><DIV
CLASS="note"
><BLOCKQUOTE
CLASS="note"
><P
><B
>Some notes on the use of BLOBs (TEXT and BYTE columns): </B
>
     BLOBs are normally addressed by BLOB identifiers.  Select queries
     return a "blob id" for every BYTE and TEXT column.  You can get
     at the contents with "string_var = ifx_get_blob($blob_id);" if
     you choose to get the BLOBs in memory (with :
     "ifx_blobinfile(0);").  If you prefer to receive the content of
     BLOB columns in a file, use "ifx_blobinfile(1);", and
     "ifx_get_blob($blob_id);" will get you the filename.  Use normal
     file I/O to get at the blob contents.
    </P
><P
>&#13;     For insert/update queries you must create these "blob id's"
     yourself with "<A
HREF="function.ifx-create-blob.html"
><B
CLASS="function"
>ifx_create_blob()</B
></A
>;". You then
     plug the blob id's into an array, and replace the blob columns
     with a question mark (?) in the query string.  For
     updates/inserts, you are responsible for setting the blob
     contents with <A
HREF="function.ifx-update-blob.html"
><B
CLASS="function"
>ifx_update_blob()</B
></A
>.
    </P
><P
>&#13;     The behaviour of BLOB columns can be altered by configuration
     variables that also can be set at runtime :
    </P
><P
>&#13;     configuration variable : ifx.textasvarchar
    </P
><P
>&#13;     configuration variable : ifx.byteasvarchar
    </P
><P
>&#13;     runtime functions :
    </P
><P
>&#13;     ifx_textasvarchar(0) : use blob id's for select queries with TEXT
     columns
    </P
><P
>&#13;     ifx_byteasvarchar(0) : use blob id's for select queries with BYTE
     columns
    </P
><P
>&#13;     ifx_textasvarchar(1) : return TEXT columns as if they were
     VARCHAR columns, so that you don't need to use blob id's for
     select queries.
    </P
><P
>&#13;     ifx_byteasvarchar(1) : return BYTE columns as if they were
     VARCHAR columns, so that you don't need to use blob id's for
     select queries.
    </P
><P
>&#13;     configuration variable : ifx.blobinfile
    </P
><P
>&#13;     runtime function :
    </P
><P
>&#13;     ifx_blobinfile_mode(0) : return BYTE columns in memory, the blob
     id lets you get at the contents.
    </P
><P
>&#13;     ifx_blobinfile_mode(1) : return BYTE columns in a file, the blob
     id lets you get at the file name.
    </P
><P
>&#13;     If you set ifx_text/byteasvarchar to 1, you can use TEXT and BYTE
     columns in select queries just like normal (but rather long)
     VARCHAR fields.  Since all strings are "counted" in PHP, this
     remains "binary safe".  It is up to you to handle this
     correctly. The returned data can contain anything, you are
     responsible for the contents.
    </P
><P
>&#13;     If you set ifx_blobinfile to 1, use the file name returned by
     ifx_get_blob(..) to get at the blob contents.  Note that in this
     case YOU ARE RESPONSIBLE FOR DELETING THE TEMPORARY FILES CREATED
     BY INFORMIX when fetching the row.  Every new row fetched will
     create new temporary files for every BYTE column.
    </P
><P
>&#13;     The location of the temporary files can be influenced by the
     environment variable "blobdir", default is "." (the current
     directory).  Something like : putenv(blobdir=tmpblob"); will ease
     the cleaning up of temp files accidentally left behind (their
     names all start with "blb").
    </P
></BLOCKQUOTE
></DIV
><DIV
CLASS="note"
><BLOCKQUOTE
CLASS="note"
><P
><B
>Automatically trimming "char" (SQLCHAR and SQLNCHAR) data: </B
>
     This can be set with the configuration variable
    </P
><P
>&#13;     ifx.charasvarchar : if set to 1 trailing spaces will be
     automatically trimmed, to save you some "chopping".
    </P
></BLOCKQUOTE
></DIV
><DIV
CLASS="note"
><BLOCKQUOTE
CLASS="note"
><P
><B
>NULL values: </B
>
     The configuration variable ifx.nullformat (and the runtime
     function <A
HREF="function.ifx-nullformat.html"
><B
CLASS="function"
>ifx_nullformat()</B
></A
>) when set to true
     will return NULL columns as the string "NULL", when set to false
     they return the empty string. This allows you to discriminate
     between NULL columns and empty columns.
    </P
></BLOCKQUOTE
></DIV
></DIV
><DIV
CLASS="TOC"
><DL
><DT
><B
>Table of Contents</B
></DT
><DT
><A
HREF="function.ifx-connect.html"
>ifx_connect</A
> &#8212; Open Informix server connection</DT
><DT
><A
HREF="function.ifx-pconnect.html"
>ifx_pconnect</A
> &#8212; Open persistent Informix connection</DT
><DT
><A
HREF="function.ifx-close.html"
>ifx_close</A
> &#8212; Close Informix connection</DT
><DT
><A
HREF="function.ifx-query.html"
>ifx_query</A
> &#8212; Send Informix query</DT
><DT
><A
HREF="function.ifx-prepare.html"
>ifx_prepare</A
> &#8212; Prepare an SQL-statement for execution</DT
><DT
><A
HREF="function.ifx-do.html"
>ifx_do</A
> &#8212; 
     Execute a previously prepared SQL-statement
    </DT
><DT
><A
HREF="function.ifx-error.html"
>ifx_error</A
> &#8212; Returns error code of last Informix call</DT
><DT
><A
HREF="function.ifx-errormsg.html"
>ifx_errormsg</A
> &#8212; Returns error message of last Informix call</DT
><DT
><A
HREF="function.ifx-affected-rows.html"
>ifx_affected_rows</A
> &#8212; Get number of rows affected by a query</DT
><DT
><A
HREF="function.ifx-getsqlca.html"
>ifx_getsqlca</A
> &#8212; 
     Get the contents of sqlca.sqlerrd[0..5] after a query
    </DT
><DT
><A
HREF="function.ifx-fetch-row.html"
>ifx_fetch_row</A
> &#8212; Get row as enumerated array</DT
><DT
><A
HREF="function.ifx-htmltbl-result.html"
>ifx_htmltbl_result</A
> &#8212; 
     Formats all rows of a query into a HTML table
    </DT
><DT
><A
HREF="function.ifx-fieldtypes.html"
>ifx_fieldtypes</A
> &#8212; List of Informix SQL fields</DT
><DT
><A
HREF="function.ifx-fieldproperties.html"
>ifx_fieldproperties</A
> &#8212; List of SQL fieldproperties</DT
><DT
><A
HREF="function.ifx-num-fields.html"
>ifx_num_fields</A
> &#8212; Returns the number of columns in the query</DT
><DT
><A
HREF="function.ifx-num-rows.html"
>ifx_num_rows</A
> &#8212; Count the rows already fetched a query</DT
><DT
><A
HREF="function.ifx-free-result.html"
>ifx_free_result</A
> &#8212; Releases resources for the query</DT
><DT
><A
HREF="function.ifx-create-char.html"
>ifx_create_char</A
> &#8212; Creates an char object</DT
><DT
><A
HREF="function.ifx-free-char.html"
>ifx_free_char</A
> &#8212; Deletes the char object</DT
><DT
><A
HREF="function.ifx-update-char.html"
>ifx_update_char</A
> &#8212; Updates the content of the char object</DT
><DT
><A
HREF="function.ifx-get-char.html"
>ifx_get_char</A
> &#8212; Return the content of the char object</DT
><DT
><A
HREF="function.ifx-create-blob.html"
>ifx_create_blob</A
> &#8212; Creates an blob object</DT
><DT
><A
HREF="function.ifx-copy-blob.html"
>ifx_copy_blob</A
> &#8212; Duplicates the given blob object</DT
><DT
><A
HREF="function.ifx-free-blob.html"
>ifx_free_blob</A
> &#8212; Deletes the blob object</DT
><DT
><A
HREF="function.ifx-get-blob.html"
>ifx_get_blob</A
> &#8212; Return the content of a blob object</DT
><DT
><A
HREF="function.ifx-update-blob.html"
>ifx_update_blob</A
> &#8212; Updates the content of the blob object</DT
><DT
><A
HREF="function.ifx-blobinfile-mode.html"
>ifx_blobinfile_mode</A
> &#8212; Set the default blob mode for all select queries</DT
><DT
><A
HREF="function.ifx-textasvarchar.html"
>ifx_textasvarchar</A
> &#8212; Set the default text mode</DT
><DT
><A
HREF="function.ifx-byteasvarchar.html"
>ifx_byteasvarchar</A
> &#8212; Set the default byte mode</DT
><DT
><A
HREF="function.ifx-nullformat.html"
>ifx_nullformat</A
> &#8212; 
     Sets the default return value on a fetch row
    </DT
><DT
><A
HREF="function.ifxus-create-slob.html"
>ifxus_create_slob</A
> &#8212; Creates an slob object and opens it</DT
><DT
><A
HREF="function.ifxus-free-slob.html"
>ifxus_free_slob</A
> &#8212; Deletes the slob object</DT
><DT
><A
HREF="function.ifxus-close-slob.html"
>ifxus_close_slob</A
> &#8212; Deletes the slob object</DT
><DT
><A
HREF="function.ifxus-open-slob.html"
>ifxus_open_slob</A
> &#8212; Opens an slob object</DT
><DT
><A
HREF="function.ifxus-tell-slob.html"
>ifxus_tell_slob</A
> &#8212; Returns the current file or seek position</DT
><DT
><A
HREF="function.ifxus-seek-slob.html"
>ifxus_seek_slob</A
> &#8212; Sets the current file or seek position</DT
><DT
><A
HREF="function.ifxus-read-slob.html"
>ifxus_read_slob</A
> &#8212; Reads nbytes of the slob object</DT
><DT
><A
HREF="function.ifxus-write-slob.html"
>ifxus_write_slob</A
> &#8212; Writes a string into the slob object</DT
></DL
></DIV
></DIV
></DIV
><DIV
CLASS="NAVFOOTER"
><HR
ALIGN="LEFT"
WIDTH="100%"><TABLE
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
><A
HREF="function.imap-mail.html"
>Prev</A
></TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="manual.html"
>Home</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
><A
HREF="function.ifx-connect.html"
>Next</A
></TD
></TR
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
>imap_mail</TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="funcref.html"
>Up</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
>ifx_connect</TD
></TR
></TABLE
></DIV
></BODY
></HTML
>