CVS update: php3/doc/functions
| From: | eschmid | Date: | Thu, 17 Sep 1998 19:24:27 +0000 |
| Subject: | CVS update: php3/doc/functions | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-1206@lists.php.net to get a copy of this message | ||
Date: Thursday September 17, 1998 @ 15:24
Author: eschmid
Update of /repository/php3/doc/functions
In directory asf:/u2/tmp/cvs-serv3305
Modified Files:
ifx.sgml
Log Message:
First try to contribute to the chaos. Are so many parameter's optional?
Index: php3/doc/functions/ifx.sgml
diff -c php3/doc/functions/ifx.sgml:1.1 php3/doc/functions/ifx.sgml:1.2
*** php3/doc/functions/ifx.sgml:1.1 Sun Aug 30 01:33:07 1998
--- php3/doc/functions/ifx.sgml Thu Sep 17 15:24:26 1998
***************
*** 3,93 ****
<title>Informix Functions</title>
<titleabbrev>Informix</titleabbrev>
! <refentry id="function.ifx-close">
! <refnamediv>
! <refname>ifx_close</refname>
! <refpurpose>close Informix connection</refpurpose>
! </refnamediv>
! <refsect1>
! <title>Description</title>
! <funcsynopsis>
! <funcdef>int <function>ifx_close</function></funcdef>
! <paramdef>int <parameter><optional>link_identifier</optional>
! </parameter></paramdef>
! </funcsynopsis>
! <para>
! Returns: always true.
! <para>
! <function>ifx_close</function> closes the link to an Informix
! database that's associated with the specified link identifier.
! If the link identifier isn't specified, the last opened link is
! assumed.
! <para>
! Note that this isn't usually necessary, as non-persistent open
! links are automatically closed at the end of the script's
! execution.
! <para>
! <function>ifx_close</function> will not close persistent links
! generated by ifx_pconnect().
! <para>
! See also: <function>ifx_connect</function>, and
! <function>ifx_pconnect</function>.
! </refsect1>
! </refentry>
<refentry id="function.ifx-connect">
<refnamediv>
<refname>ifx_connect</refname>
! <refpurpose>open Informix server connection</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<funcsynopsis>
<funcdef>int <function>ifx_connect</function></funcdef>
! <paramdef>string <parameter><optional>hostname</optional>
</parameter></paramdef>
! <paramdef>string <parameter><optional>username</optional>
</parameter></paramdef>
<paramdef>string <parameter><optional>password</optional>
</parameter></paramdef>
</funcsynopsis>
<para>
! Returns: A positive Informix link identifier on success, or false on
error.
! <para>
<function>ifx_connect</function> establishes a connection to an
Informix server. All of the arguments are optional, and if they're
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>
In case a second call is made to
<function>ifx_connect</function> with the same arguments, no
new link will be established, but instead, the link identifier of
the already opened link will be returned.
! <para>
The link to the server will be closed as soon as the execution of
the script ends, unless it's closed earlier by explicitly calling
<function>ifx_close</function>.
! <para>
See also <function>ifx_pconnect</function>, and
<function>ifx_close</function>.
</refsect1>
</refentry>
<refentry id="function.ifx-pconnect">
<refnamediv>
<refname>ifx_pconnect</refname>
! <refpurpose>open persistent Informix connection</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<funcsynopsis>
<funcdef>int <function>ifx_pconnect</function></funcdef>
! <paramdef>string <parameter><optional>hostname</optional>
</parameter></paramdef>
! <paramdef>string <parameter><optional>username</optional>
</parameter></paramdef>
<paramdef>string <parameter><optional>password</optional>
</parameter></paramdef>
--- 3,93 ----
<title>Informix Functions</title>
<titleabbrev>Informix</titleabbrev>
! <partintro>
! <para>
! The Informix driver for Online (ODS) 7.x, SE 7.x and Universal
! Server (IUS) 9.x is implemented in "functions/ifx.ec" and
! "functions/php3_ifx.h". At the moment of writing ODS 7.2 support
! is fairly complete, with full BLOB support. IUS 9.1 support is
! partly finished: the new data types are there, but SLOBS support
! is still under construction.
! </para>
! <note>
! <title>Configuration notes</title>
! <para></para><para>
! Before you run the "configure" script, make sure that the
! "INFORMIXDIR" variable has been set.
! </para><para>
! 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 >= 9.00.
! </para>
! </note>
! </partintro>
<refentry id="function.ifx-connect">
<refnamediv>
<refname>ifx_connect</refname>
! <refpurpose>Open Informix server connection</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<funcsynopsis>
<funcdef>int <function>ifx_connect</function></funcdef>
! <paramdef>string <parameter><optional>database</optional>
</parameter></paramdef>
! <paramdef>string <parameter><optional>userid</optional>
</parameter></paramdef>
<paramdef>string <parameter><optional>password</optional>
</parameter></paramdef>
</funcsynopsis>
<para>
! Returns an connection identifier on success, or FALSE on
error.
! </para><para>
<function>ifx_connect</function> establishes a connection to an
Informix server. All of the arguments are optional, and if they're
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
new link will be established, but instead, the link identifier of
the already opened link will be returned.
! </para><para>
The link to the server will be closed as soon as the execution of
the script ends, unless it's closed earlier by explicitly calling
<function>ifx_close</function>.
! </para><para>
See also <function>ifx_pconnect</function>, and
<function>ifx_close</function>.
+ <example>
+ <title>Connect to a Informix database</title>
+ <programlisting role="php3">
+ $conn_id = ifx_pconnect (mydb@ol_srv1, "imyself", "mypassword");
+ </programlisting>
+ </example>
</refsect1>
</refentry>
<refentry id="function.ifx-pconnect">
<refnamediv>
<refname>ifx_pconnect</refname>
! <refpurpose>Open persistent Informix connection</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<funcsynopsis>
<funcdef>int <function>ifx_pconnect</function></funcdef>
! <paramdef>string <parameter><optional>database</optional>
</parameter></paramdef>
! <paramdef>string <parameter><optional>userid</optional>
</parameter></paramdef>
<paramdef>string <parameter><optional>password</optional>
</parameter></paramdef>
***************
*** 107,113 ****
Second, the connection to the SQL server will not be closed when
the execution of the script ends. Instead, the link will remain
open for future use (<function>ifx_close</function> will not
! close links established by <literal>ifx_pconnect()</literal>).
<para>
This type of links is therefore called 'persistent'.
<para>
--- 107,113 ----
Second, the connection to the SQL server will not be closed when
the execution of the script ends. Instead, the link will remain
open for future use (<function>ifx_close</function> will not
! close links established by <function>ifx_pconnect</function>).
<para>
This type of links is therefore called 'persistent'.
<para>
***************
*** 116,125 ****
</refsect1>
</refentry>
<refentry id="function.ifx-query">
<refnamediv>
<refname>ifx_query</refname>
! <refpurpose>send Informix query</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
--- 116,165 ----
</refsect1>
</refentry>
+ <refentry id="function.ifx-close">
+ <refnamediv>
+ <refname>ifx_close</refname>
+ <refpurpose>Close Informix connection</refpurpose>
+ </refnamediv>
+ <refsect1>
+ <title>Description</title>
+ <funcsynopsis>
+ <funcdef>int <function>ifx_close</function></funcdef>
+ <paramdef>int <parameter><optional>link_identifier</optional>
+ </parameter></paramdef>
+ </funcsynopsis>
+ <para>
+ Returns: always true.
+ <para>
+ <function>ifx_close</function> closes the link to an Informix
+ database that's associated with the specified link identifier.
+ If the link identifier isn't specified, the last opened link is
+ assumed.
+ <para>
+ Note that this isn't usually necessary, as non-persistent open
+ links are automatically closed at the end of the script's
+ execution.
+ <para>
+ <function>ifx_close</function> will not close persistent links
+ generated by <function>ifx_pconnect</function>.
+ <para>
+ See also: <function>ifx_connect</function>, and
+ <function>ifx_pconnect</function>.
+ <example>
+ <title>Closing a Informix connection</title>
+ <programlisting role="php3">
+ $conn_id = ifx_connect (mydb@ol_srv, "itsme", "mypassword");
+ ... some queries and stuff ...
+ ifx_close($conn_id);
+ </programlisting>
+ </example>
+ </refsect1>
+ </refentry>
+
<refentry id="function.ifx-query">
<refnamediv>
<refname>ifx_query</refname>
! <refpurpose>Send Informix query</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
***************
*** 127,151 ****
<funcdef>int <function>ifx_query</function></funcdef>
<paramdef>string <parameter>query</parameter></paramdef>
<paramdef>int <parameter><optional>link_identifier</optional>
</parameter></paramdef>
! <!-- <paramdef>int <parameter><optional>cursor_type</optional>
</parameter></paramdef>
- <paramdef>int <parameter><optional>blob_id</optional>
- </parameter></paramdef> -->
</funcsynopsis>
<para>
! Returns: A positive Informix result identifier on success, or false
! on error.
! <para>
<function>ifx_query</function> sends a query to the currently
active database on the server that's associated with the
specified link identifier. If the link identifier isn't
specified, the last opened link is assumed. If no link is open,
the function tries to establish a link as if
<function>ifx_connect</function> was called, and use it.
! <para>
See also:
<function>ifx_connect</function>.
</refsect1>
</refentry>
--- 167,255 ----
<funcdef>int <function>ifx_query</function></funcdef>
<paramdef>string <parameter>query</parameter></paramdef>
<paramdef>int <parameter><optional>link_identifier</optional>
+ </parameter></paramdef>
+ <paramdef>string <parameter><optional>cursor_type</optional>
</parameter></paramdef>
! <paramdef>mixed <parameter><optional>blobidarray</optional>
</parameter></paramdef>
</funcsynopsis>
<para>
! Returns: A positive Informix result identifier on success, or
! false on error.
! </para><para>
! An integer "result_id" used by other functions to retrieve the
! query results. Sets "affected_rows" for retrieval by the
! <function>ifx_affected_rows</function> function.
! </para><para>
<function>ifx_query</function> sends a query to the currently
active database on the server that's associated with the
specified link identifier. If the link identifier isn't
specified, the last opened link is assumed. If no link is open,
the function tries to establish a link as if
<function>ifx_connect</function> was called, and use it.
! </para><para>
! Executes query <parameter>query</parameter> on connection
! <parameter>conn_id</parameter>. For "select-type" queries a cursor
! is declared and opened. The optional "HOLD" and "SCROLL"
! parameters allow you to make this a "scroll" and/or "hold"
! cursor. Non-select queries are "execute immediate".
! </para><para>
! For either query type the number of (estimated or real) affected
! rows is saved for retrieval by <function>ifx_affected_rows</function>.
! </para><para>
! If you have BLOB (BYTE or TEXT) columns in an update query, you
! can add a <parameter>blobidarray</parameter> parameter containing
! the corresponding "blob ids", and you should replace those
! columns with a "?" in the query text.
! </para><para>
! If the contents of the TEXT (or BYTE) column allow it, you can
! also use "ifx_textasvarchar(1)" and "ifx_byteasvarchar(1)". This
! allows you to treat TEXT (or BYTE) columns just as if they were
! ordinary (but long) VARCHAR columns for select queries, and you
! don't need to bother with blob id's.
! </para><para>
! With ifx_textasvarchar(0) or ifx_byteasvarchar(0) (the default
! situation), select queries will return BLOB columns as blob id's
! (integer value). You can get the value of the blob as a string
! or file with the blob functions (see below).
! </para><para>
See also:
<function>ifx_connect</function>.
+ <example>
+ <title>Show all rows of the "orders" table as a html table</title>
+ <programlisting role="php3">
+ ifx_textasvarchar(1); // use "text mode" for blobs
+ $res_id = ifx_query("select * from orders", $conn_id);
+ if (! $res_id) {
+ printf("Can't select orders : %s\n<br>%s<br>\n",
+ ifx_error();
+ ifx_errormsg();
+ die;
+ }
+ ifx_htmltbl_result($res_id, "border=\"1\");
+ ifx_free_result($res_id);
+ </programlisting>
+ </example>
+ <example>
+ <title>Insert some values into the "catalog" table</title>
+ <programlisting role=php3>
+ // create blob id's for a byte and text column
+ $textid = ifx_create_blob(0, 0, "Text column in memory");
+ $byteid = ifx_create_blob(1, 0, "Byte column in memory");
+ // store blob id's in a blobid array
+ $blobidarray[] = $textid;
+ $blobidarray[] = $byteid;
+ // launch query
+ $query = "insert into catalog (stock_num, manu_code, " .
+ "cat_descr,cat_picture) values(1,'HRO',?,?)";
+ $res_id = ifx_query($query, $conn_id, $blobidarray);
+ if (! $res_id) {
+ ... error ...
+ }
+ // free result id
+ ifx_free_result($res_id);
+ </programlisting>
+ </example>
</refsect1>
</refentry>
***************
*** 286,306 ****
</refsect1>
</refentry>
- <!--
<refentry id="function.ifx-num-rows">
<refnamediv>
! <refname></refname>
<refpurpose></refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<funcsynopsis>
! <funcdef><function></function></funcdef>
<paramdef><parameter></parameter></paramdef>
</funcsynopsis>
</refsect1>
</refentry>
- -->
<refentry id="function.ifx-prepare">
<refnamediv>
--- 390,408 ----
</refsect1>
</refentry>
<refentry id="function.ifx-num-rows">
<refnamediv>
! <refname>ifx_num_rows</refname>
<refpurpose></refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<funcsynopsis>
! <funcdef><function>ifx_num_rows</function></funcdef>
<paramdef><parameter></parameter></paramdef>
</funcsynopsis>
</refsect1>
</refentry>
<refentry id="function.ifx-prepare">
<refnamediv>
***************
*** 336,373 ****
</refsect1>
</refentry>
! </reference>
! <!--
! ifx_blobinfile_mode
! ifx_copy_blob
! ifx_create_blob
! ifx_do
! ifx_fieldproperties
! ifx_fieldtypes
! ifx_free_blob
! ifx_free_result
! ifx_get_blob
! ifx_htmltbl_result
! ifx_num_fields
! ifx_prepare
! ifx_update_blob
! <refentry>
<refnamediv>
! <refname></refname>
<refpurpose></refpurpose>
</refnamediv>
<refsect1>
! <title></title>
<funcsynopsis>
! <funcdef><function></function></funcdef>
<paramdef><parameter></parameter></paramdef>
</funcsynopsis>
</refsect1>
</refentry>
! -->
<!-- Keep this comment at the end of the file
Local variables:
--- 438,600 ----
</refsect1>
</refentry>
! <!-- blobs -->
! <refentry id="function.ifx-blobinfile-mode">
! <refnamediv>
! <refname>ifx_blobinfile_mode</refname>
! <refpurpose></refpurpose>
! </refnamediv>
! <refsect1>
! <title>Description</title>
! <funcsynopsis>
! <funcdef><function>ifx_blobinfile_mode</function></funcdef>
! <paramdef><parameter></parameter></paramdef>
! </funcsynopsis>
! </refsect1>
! </refentry>
! <refentry id="function.ifx-copy-blob">
<refnamediv>
! <refname>ifx_copy_blob</refname>
<refpurpose></refpurpose>
</refnamediv>
<refsect1>
! <title>Description</title>
<funcsynopsis>
! <funcdef><function>ifx_copy_blob</function></funcdef>
<paramdef><parameter></parameter></paramdef>
</funcsynopsis>
</refsect1>
</refentry>
! <refentry id="function.ifx-create-blob">
! <refnamediv>
! <refname>ifx_create_blob</refname>
! <refpurpose></refpurpose>
! </refnamediv>
! <refsect1>
! <title>Description</title>
! <funcsynopsis>
! <funcdef><function>ifx_create_blob</function></funcdef>
! <paramdef><parameter></parameter></paramdef>
! </funcsynopsis>
! </refsect1>
! </refentry>
!
! <refentry id="function.ifx-fieldproperties">
! <refnamediv>
! <refname>ifx_fieldproperties</refname>
! <refpurpose></refpurpose>
! </refnamediv>
! <refsect1>
! <title>Description</title>
! <funcsynopsis>
! <funcdef><function>ifx_fieldproperties</function></funcdef>
! <paramdef><parameter></parameter></paramdef>
! </funcsynopsis>
! </refsect1>
! </refentry>
!
! <refentry id="function.ifx-fieldtypes">
! <refnamediv>
! <refname>ifx_fieldtypes</refname>
! <refpurpose></refpurpose>
! </refnamediv>
! <refsect1>
! <title>Description</title>
! <funcsynopsis>
! <funcdef><function>ifx_fieldtypes</function></funcdef>
! <paramdef><parameter></parameter></paramdef>
! </funcsynopsis>
! </refsect1>
! </refentry>
!
! <refentry id="function.ifx-free-blob">
! <refnamediv>
! <refname>ifx_free_blob</refname>
! <refpurpose></refpurpose>
! </refnamediv>
! <refsect1>
! <title>Description</title>
! <funcsynopsis>
! <funcdef><function>ifx_free_blob</function></funcdef>
! <paramdef><parameter></parameter></paramdef>
! </funcsynopsis>
! </refsect1>
! </refentry>
!
! <refentry id="function.ifx-free-result">
! <refnamediv>
! <refname>ifx_free_result</refname>
! <refpurpose></refpurpose>
! </refnamediv>
! <refsect1>
! <title>Description</title>
! <funcsynopsis>
! <funcdef><function>ifx_free_result</function></funcdef>
! <paramdef><parameter></parameter></paramdef>
! </funcsynopsis>
! </refsect1>
! </refentry>
!
! <refentry id="function.ifx-get-blob">
! <refnamediv>
! <refname>ifx_get_blob</refname>
! <refpurpose></refpurpose>
! </refnamediv>
! <refsect1>
! <title>Description</title>
! <funcsynopsis>
! <funcdef><function>ifx_get_blob</function></funcdef>
! <paramdef><parameter></parameter></paramdef>
! </funcsynopsis>
! </refsect1>
! </refentry>
!
! <refentry id="function.ifx-htmltbl-result">
! <refnamediv>
! <refname>ifx_htmltbl_result</refname>
! <refpurpose></refpurpose>
! </refnamediv>
! <refsect1>
! <title>Description</title>
! <funcsynopsis>
! <funcdef><function>ifx_htmltbl_result</function></funcdef>
! <paramdef><parameter></parameter></paramdef>
! </funcsynopsis>
! </refsect1>
! </refentry>
!
! <refentry id="function.ifx-num-fields">
! <refnamediv>
! <refname>ifx_num_fields</refname>
! <refpurpose></refpurpose>
! </refnamediv>
! <refsect1>
! <title>Description</title>
! <funcsynopsis>
! <funcdef><function>ifx_num_fields</function></funcdef>
! <paramdef><parameter></parameter></paramdef>
! </funcsynopsis>
! </refsect1>
! </refentry>
!
! <refentry id="function.ifx-update-blob">
! <refnamediv>
! <refname>ifx_update_blob</refname>
! <refpurpose></refpurpose>
! </refnamediv>
! <refsect1>
! <title>Description</title>
! <funcsynopsis>
! <funcdef><function>ifx_update_blob</function></funcdef>
! <paramdef><parameter></parameter></paramdef>
! </funcsynopsis>
! </refsect1>
! </refentry>
!
! </reference>
<!-- Keep this comment at the end of the file
Local variables:
--
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