CVS update: php3/doc/functions
| From: | danny | Date: | Sun, 20 Sep 1998 12:19:48 +0000 |
| Subject: | CVS update: php3/doc/functions | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-1300@lists.php.net to get a copy of this message | ||
Date: Sunday September 20, 1998 @ 8:19
Author: danny
Update of /repository/php3/doc/functions
In directory asf:/u2/tmp/cvs-serv19722/doc/functions
Modified Files:
ifx.sgml
Log Message:
sync introduction with "readme.ifx"
Index: php3/doc/functions/ifx.sgml
diff -c php3/doc/functions/ifx.sgml:1.7 php3/doc/functions/ifx.sgml:1.8
*** php3/doc/functions/ifx.sgml:1.7 Sat Sep 19 21:15:52 1998
--- php3/doc/functions/ifx.sgml Sun Sep 20 08:19:47 1998
***************
*** 27,32 ****
--- 27,98 ----
version >= 9.00.
</para>
</note>
+ <note>
+ <title>Some notes on the use of BLOBs</title>
+ <para></para><para>
+ The current version (September 18, 1998) has complete select/insert/update
+ support for BLOB columns.
+ </para><para>
+ BLOBs are normally addressed by integer 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.
+ </para><para>
+ For insert/update queries you must create these "blob id's" yourself
+ with "ifx_create_blob(..);". 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
+ ifx_update_blob(...).
+ </para><para>
+ The behaviour of BLOB columns can be altered by configuration variables that
+ also can be set at runtime :
+ </para><para>
+ configuration variable : ifx.textasvarchar
+ configuration variable : ifx.byteasvarchar
+ runtime functions :
+ ifx_textasvarchar(0) : use blob id's for select queries with TEXT columns
+ ifx_byteasvarchar(0) : use blob id's for select queries with BYTE columns
+ ifx_textasvarchar(1) : return TEXT columns as if they were VARCHAR columns,
+ without the use of blob id's for select queries.
+ ifx_byteasvarchar(1) : return BYTE columns as if they were VARCHAR columns,
+ without the use of blob id's for select queries.
+ </para><para>
+ configuration variable : ifx.blobinfile
+ runtime function :
+ ifx_blobinfile_mode(0) : return BYTE columns in memory, the blob id lets you
+ get at the contents.
+ ifx_blobinfile_mode(1) : return BYTE columns in a file, the blob id lets you
+ get at the file name.
+ </para><para>
+ 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 PHP3, 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.
+ </para><para>
+ 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.
+ </para><para>
+ 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").
+ </para>
+ </note>
+ <note>
+ <title>Automatically trimming "char" (SQLCHAR and SQLNCHAR) data</title>
+ <para></para><para>
+ This can be set with a configuration variable :
+ </para><para>
+ ifx.charasvarchar : if set to 1 trailing spaces will be automatically trimmed
+ </para>
+ </note>
</partintro>
<refentry id="function.ifx-connect">
***************
*** 54,60 ****
missing, defaults are taken from values supplied in php3.ini
(ifx.default_host for the host (Informix libraries will use
$INFORMIXSERVER environment value if not defined), ifx.default_user
! for user, ifx.default for the password (none if not defined).
</para><para>
In case a second call is made to
<function>ifx_connect</function> with the same arguments, no
--- 120,126 ----
missing, defaults are taken from values supplied in php3.ini
(ifx.default_host for the host (Informix libraries will use
$INFORMIXSERVER environment value if not defined), ifx.default_user
! for user, ifx.default_password for the password (none if not defined).
</para><para>
In case a second call is made to
<function>ifx_connect</function> with the same arguments, no
***************
*** 99,104 ****
--- 165,172 ----
<function>ifx_pconnect</function> acts very much like
<function>ifx_connect</function> with two major differences.
<para>
+ This function behaves exactly like <function>ifx_connect</function>
+ when PHP is not running as an Apache module.
First, when connecting, the function would first try to find a
(persistent) link that's already open with the same host,
username and password. If one is found, an identifier for it
***************
*** 491,497 ****
<title>Informix fetch rows</title>
<programlisting role="php3">
$rid = ifx_prepare ("select * from emp where name like " . $name,
! $connid, "SCROLL");
if (! $rid) {
... error ...
}
--- 559,565 ----
<title>Informix fetch rows</title>
<programlisting role="php3">
$rid = ifx_prepare ("select * from emp where name like " . $name,
! $connid, IFX_SCROLL);
if (! $rid) {
... error ...
}
***************
*** 541,547 ****
<title>Informix results as HTML table</title>
<programlisting role="php3">
$rid = ifx_prepare ("select * from emp where name like " . $name,
! $connid, "SCROLL");
if (! $rid) {
... error ...
}
--- 609,615 ----
<title>Informix results as HTML table</title>
<programlisting role="php3">
$rid = ifx_prepare ("select * from emp where name like " . $name,
! $connid, IFX_SCROLL);
if (! $rid) {
... error ...
}
--
PHP Development Mailing List http://www.php.net/
To unsubscribe send an empty message to php-dev-unsubscribe@lists.php.net
For help: php-dev-help@lists.php.net