mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-16 00:48:54 +00:00
Only whitespace.
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@56718 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
parent
a80b8604ef
commit
19fc0382c8
1 changed files with 204 additions and 170 deletions
|
@ -1,5 +1,5 @@
|
|||
<?xml encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.9 $ -->
|
||||
<!-- $Revision: 1.10 $ -->
|
||||
<reference id="ref.ingres">
|
||||
<title>Ingres II functions</title>
|
||||
<titleabbrev>Ingres II</titleabbrev>
|
||||
|
@ -20,29 +20,32 @@
|
|||
</simpara>
|
||||
<simpara>
|
||||
When using this extension with Apache, if Apache does not start
|
||||
and complains with "PHP Fatal error: Unable to start
|
||||
ingres_ii module in Unknown on line 0"
|
||||
then make sure the environement variable II_SYSTEM is correctly
|
||||
set. Adding "export II_SYSTEM="/home/ingres/II" in the script
|
||||
that starts Apache, just before launching httpd, should be fine.
|
||||
and complains with "PHP Fatal error: Unable to start ingres_ii
|
||||
module in Unknown on line 0" then make sure the environement
|
||||
variable II_SYSTEM is correctly set. Adding "export
|
||||
II_SYSTEM="/home/ingres/II" in the script that starts Apache, just
|
||||
before launching httpd, should be fine.
|
||||
</simpara>
|
||||
<note>
|
||||
<para>
|
||||
If you already used PHP extensions to access other database servers,
|
||||
note that Ingres doesn't allow concurrent queries and/or transaction
|
||||
over one connection, thus you won't find any result or transaction
|
||||
handle in this extension. The result of a query must be treated
|
||||
before sending another query, and a transaction must be commited or
|
||||
rolled back before opening another transaction (which is automaticaly
|
||||
done when sending the first query).
|
||||
If you already used PHP extensions to access other database
|
||||
servers, note that Ingres doesn't allow concurrent queries and/or
|
||||
transaction over one connection, thus you won't find any result
|
||||
or transaction handle in this extension. The result of a query
|
||||
must be treated before sending another query, and a transaction
|
||||
must be commited or rolled back before opening another
|
||||
transaction (which is automaticaly done when sending the first
|
||||
query).
|
||||
</para>
|
||||
</note>
|
||||
</partintro>
|
||||
|
||||
<refentry id="function.ingres-connect">
|
||||
<refnamediv>
|
||||
<refname>ingres_connect</refname>
|
||||
<refpurpose>Open a connection to an Ingres II database.</refpurpose>
|
||||
<refname>ingres_connect</refname>
|
||||
<refpurpose>
|
||||
Open a connection to an Ingres II database
|
||||
</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1>
|
||||
<title>Description</title>
|
||||
|
@ -60,20 +63,22 @@
|
|||
</paramdef>
|
||||
</funcprototype>
|
||||
</funcsynopsis>
|
||||
&warn.experimental.func;
|
||||
&warn.experimental.func;
|
||||
<para>
|
||||
Returns a Ingres II link resource on success, or &false; on failure.
|
||||
Returns a Ingres II link resource on success, or &false; on
|
||||
failure.
|
||||
</para>
|
||||
<para>
|
||||
<function>ingres_connect</function> opens a connection with the
|
||||
Ingres database designated by <parameter>database</parameter>, which
|
||||
follows the syntax <parameter>[node_id::]dbname[/svr_class]</parameter>.
|
||||
Ingres database designated by <parameter>database</parameter>,
|
||||
which follows the syntax
|
||||
<parameter>[node_id::]dbname[/svr_class]</parameter>.
|
||||
</para>
|
||||
<para>
|
||||
If some parameters are missing, <function>ingres_connect</function>
|
||||
uses the values in <filename>php.ini</filename> for
|
||||
<parameter>ingres.default_database</parameter>,
|
||||
<parameter>ingres.default_user</parameter> and
|
||||
<parameter>ingres.default_user</parameter>, and
|
||||
<parameter>ingres.default_password</parameter>.
|
||||
</para>
|
||||
<para>
|
||||
|
@ -97,8 +102,9 @@
|
|||
</programlisting>
|
||||
</example>
|
||||
<example>
|
||||
<title><function>ingres_connect</function> example
|
||||
using default link</title>
|
||||
<title>
|
||||
<function>ingres_connect</function> example using default link
|
||||
</title>
|
||||
<programlisting>
|
||||
<?php
|
||||
ingres_connect ("mydb", "user", "pass")
|
||||
|
@ -109,7 +115,7 @@
|
|||
</programlisting>
|
||||
</example>
|
||||
<para> See also
|
||||
<function>ingres_pconnect</function>, and
|
||||
<function>ingres_pconnect</function> and
|
||||
<function>ingres_close</function>.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
@ -119,7 +125,7 @@
|
|||
<refnamediv>
|
||||
<refname>ingres_pconnect</refname>
|
||||
<refpurpose>
|
||||
Open a persistent connection to an Ingres II database.
|
||||
Open a persistent connection to an Ingres II database
|
||||
</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1>
|
||||
|
@ -138,27 +144,28 @@
|
|||
</paramdef>
|
||||
</funcprototype>
|
||||
</funcsynopsis>
|
||||
&warn.experimental.func;
|
||||
&warn.experimental.func;
|
||||
<para>
|
||||
Returns a Ingres II link resource on success, or &false; on failure.
|
||||
Returns a Ingres II link resource on success, or &false; on
|
||||
failure.
|
||||
</para>
|
||||
<para>
|
||||
See <function>ingres_connect</function> for parameters details and
|
||||
examples. There are only 2 differences between
|
||||
See <function>ingres_connect</function> for parameters details
|
||||
and examples. There are only 2 differences between
|
||||
<function>ingres_pconnect</function> and
|
||||
<function>ingres_connect</function> :
|
||||
First, when connecting, the function will first try to find a
|
||||
(persistent) link that's already opened with the same parameters.
|
||||
If one is found, an identifier for it will be returned instead of
|
||||
opening a new connection. Second, the connection to the Ingres
|
||||
server will not be closed when the execution of the script ends.
|
||||
Instead, the link will remain open for future use
|
||||
(<function>ingres_close</function> will not close links established
|
||||
by <function>ingres_pconnect</function>). This type of link is
|
||||
therefore called 'persistent'.
|
||||
<function>ingres_connect</function> : First, when connecting, the
|
||||
function will first try to find a (persistent) link that's
|
||||
already opened with the same parameters. If one is found, an
|
||||
identifier for it will be returned instead of opening a new
|
||||
connection. Second, the connection to the Ingres server will not
|
||||
be closed when the execution of the script ends. Instead, the
|
||||
link will remain open for future use
|
||||
(<function>ingres_close</function> will not close links
|
||||
established by <function>ingres_pconnect</function>). This type
|
||||
of link is therefore called 'persistent'.
|
||||
</para>
|
||||
<para> See also
|
||||
<function>ingres_connect</function>, and
|
||||
<function>ingres_connect</function> and
|
||||
<function>ingres_close</function>.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
@ -179,7 +186,7 @@
|
|||
</paramdef>
|
||||
</funcprototype>
|
||||
</funcsynopsis>
|
||||
&warn.experimental.func;
|
||||
&warn.experimental.func;
|
||||
<para>
|
||||
Returns &true; on success, or &false; on failure.
|
||||
</para>
|
||||
|
@ -195,7 +202,7 @@
|
|||
are automatically closed at the end of the script.
|
||||
</para>
|
||||
<para> See also
|
||||
<function>ingres_connect</function>, and
|
||||
<function>ingres_connect</function> and
|
||||
<function>ingres_pconnect</function>.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
@ -219,7 +226,7 @@
|
|||
</paramdef>
|
||||
</funcprototype>
|
||||
</funcsynopsis>
|
||||
&warn.experimental.func;
|
||||
&warn.experimental.func;
|
||||
<para>
|
||||
Returns &true; on success, or &false; on failure.
|
||||
</para>
|
||||
|
@ -229,42 +236,55 @@
|
|||
must be a valid SQL query (see the Ingres SQL reference guide)
|
||||
</para>
|
||||
<para>
|
||||
The query becomes part of the currently open transaction.
|
||||
If there is no open transaction, <function>ingres_query</function>
|
||||
The query becomes part of the currently open transaction. If
|
||||
there is no open transaction, <function>ingres_query</function>
|
||||
opens a new transaction. To close the transaction, you can either
|
||||
call <function>ingres_commit</function> to commit the changes made
|
||||
to the database or <function>ingres_rollback</function> to cancel these
|
||||
changes. When the script ends, any open transaction is rolled back
|
||||
(by calling <function>ingres_rollback</function>). You can also
|
||||
use <function>ingres_autocommit</function> before opening a new
|
||||
call <function>ingres_commit</function> to commit the changes
|
||||
made to the database or <function>ingres_rollback</function> to
|
||||
cancel these changes. When the script ends, any open transaction
|
||||
is rolled back (by calling
|
||||
<function>ingres_rollback</function>). You can also use
|
||||
<function>ingres_autocommit</function> before opening a new
|
||||
transaction to have every SQL query immediatly commited.
|
||||
</para>
|
||||
<para>
|
||||
Some types of SQL queries can't be sent with this function :
|
||||
Some types of SQL queries can't be sent with this function:
|
||||
<itemizedlist>
|
||||
<listitem>
|
||||
<simpara>close (see <function>ingres_close</function>).</simpara>
|
||||
<simpara>
|
||||
close (see <function>ingres_close</function>)
|
||||
</simpara>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<simpara>commit (see <function>ingres_commit</function>).</simpara>
|
||||
<simpara>
|
||||
commit (see <function>ingres_commit</function>)
|
||||
</simpara>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<simpara>connect (see <function>ingres_connect</function>).</simpara>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<simpara>disconnect (see <function>ingres_close</function>).</simpara>
|
||||
</listitem>
|
||||
<listitem><simpara>get dbevent</simpara></listitem>
|
||||
<listitem><simpara>prepare to commit</simpara></listitem>
|
||||
<listitem>
|
||||
<simpara>
|
||||
rollback (see <function>ingres_rollback</function>).
|
||||
connect (see <function>ingres_connect</function>)
|
||||
</simpara>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<simpara>
|
||||
disconnect (see <function>ingres_close</function>)
|
||||
</simpara>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<simpara>get dbevent</simpara>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<simpara>prepare to commit</simpara>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<simpara>
|
||||
rollback (see <function>ingres_rollback</function>)
|
||||
</simpara>
|
||||
</listitem>
|
||||
<listitem><simpara>savepoint</simpara></listitem>
|
||||
<listitem>
|
||||
<simpara>
|
||||
set autocommit (see <function>ingres_autocommit</function>).
|
||||
set autocommit (see <function>ingres_autocommit</function>)
|
||||
</simpara>
|
||||
</listitem>
|
||||
<listitem>
|
||||
|
@ -294,7 +314,7 @@ while ($row = ingres_fetch_row()) {
|
|||
<function>ingres_fetch_object</function>,
|
||||
<function>ingres_fetch_row</function>,
|
||||
<function>ingres_commit</function>,
|
||||
<function>ingres_rollback</function> and
|
||||
<function>ingres_rollback</function>, and
|
||||
<function>ingres_autocommit</function>.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
@ -317,7 +337,7 @@ while ($row = ingres_fetch_row()) {
|
|||
</paramdef>
|
||||
</funcprototype>
|
||||
</funcsynopsis>
|
||||
&warn.experimental.func;
|
||||
&warn.experimental.func;
|
||||
<para>
|
||||
For delete, insert or update queries,
|
||||
<function>ingres_num_rows</function> returns the number of rows
|
||||
|
@ -329,17 +349,16 @@ while ($row = ingres_fetch_row()) {
|
|||
<note>
|
||||
<simpara>
|
||||
This function is mainly meant to get the number of rows
|
||||
modified in the database.
|
||||
If this function is called before using
|
||||
<function>ingres_fetch_array</function>,
|
||||
modified in the database. If this function is called before
|
||||
using <function>ingres_fetch_array</function>,
|
||||
<function>ingres_fetch_object</function> or
|
||||
<function>ingres_fetch_row</function> the server will delete
|
||||
the result's data and the script won't be able to get them.
|
||||
</simpara>
|
||||
<simpara>
|
||||
You should instead retrieve the result's data using one of these
|
||||
fetch functions in a loop until it returns &false;, indicating that
|
||||
no more results are available.
|
||||
You should instead retrieve the result's data using one of
|
||||
these fetch functions in a loop until it returns &false;,
|
||||
indicating that no more results are available.
|
||||
</simpara>
|
||||
</note>
|
||||
</para>
|
||||
|
@ -347,7 +366,7 @@ while ($row = ingres_fetch_row()) {
|
|||
See also
|
||||
<function>ingres_query</function>,
|
||||
<function>ingres_fetch_array</function>,
|
||||
<function>ingres_fetch_object</function> and
|
||||
<function>ingres_fetch_object</function>, and
|
||||
<function>ingres_fetch_row</function>.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
@ -370,17 +389,17 @@ while ($row = ingres_fetch_row()) {
|
|||
</paramdef>
|
||||
</funcprototype>
|
||||
</funcsynopsis>
|
||||
&warn.experimental.func;
|
||||
&warn.experimental.func;
|
||||
<para>
|
||||
<function>ingres_num_fields</function> returns the number of fields
|
||||
in the results returned by the Ingres server after a call to
|
||||
<function>ingres_query</function>
|
||||
<function>ingres_num_fields</function> returns the number of
|
||||
fields in the results returned by the Ingres server after a call
|
||||
to <function>ingres_query</function>
|
||||
</para>
|
||||
<para>
|
||||
See also
|
||||
<function>ingres_query</function>,
|
||||
<function>ingres_fetch_array</function>,
|
||||
<function>ingres_fetch_object</function> and
|
||||
<function>ingres_fetch_object</function>, and
|
||||
<function>ingres_fetch_row</function>.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
@ -404,7 +423,7 @@ while ($row = ingres_fetch_row()) {
|
|||
</paramdef>
|
||||
</funcprototype>
|
||||
</funcsynopsis>
|
||||
&warn.experimental.func;
|
||||
&warn.experimental.func;
|
||||
<para>
|
||||
<function>ingres_field_name</function> returns the name of a field
|
||||
in a query result, or &false; on failure.
|
||||
|
@ -426,8 +445,10 @@ while ($row = ingres_fetch_row()) {
|
|||
|
||||
<refentry id="function.ingres-field-type">
|
||||
<refnamediv>
|
||||
<refname>ingres_field_type</refname>
|
||||
<refpurpose>Get the type of a field in a query result.</refpurpose>
|
||||
<refname>ingres_field_type</refname>
|
||||
<refpurpose>
|
||||
Get the type of a field in a query result
|
||||
</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1>
|
||||
<title>Description</title>
|
||||
|
@ -442,28 +463,28 @@ while ($row = ingres_fetch_row()) {
|
|||
</paramdef>
|
||||
</funcprototype>
|
||||
</funcsynopsis>
|
||||
&warn.experimental.func;
|
||||
&warn.experimental.func;
|
||||
<para>
|
||||
<function>ingres_field_type</function> returns the type of a field
|
||||
in a query result, or &false; on failure.
|
||||
Examples of types returned are "IIAPI_BYTE_TYPE",
|
||||
"IIAPI_CHA_TYPE", "IIAPI_DTE_TYPE", "IIAPI_FLT_TYPE",
|
||||
"IIAPI_INT_TYPE", "IIAPI_VCH_TYPE". Some of these types can map
|
||||
to more than one SQL type depending on the length of the field
|
||||
(see <function>ingres_field_length</function>). For example
|
||||
<function>ingres_field_type</function> returns the type of a
|
||||
field in a query result, or &false; on failure. Examples of
|
||||
types returned are "IIAPI_BYTE_TYPE", "IIAPI_CHA_TYPE",
|
||||
"IIAPI_DTE_TYPE", "IIAPI_FLT_TYPE", "IIAPI_INT_TYPE",
|
||||
"IIAPI_VCH_TYPE". Some of these types can map to more than one
|
||||
SQL type depending on the length of the field (see
|
||||
<function>ingres_field_length</function>). For example
|
||||
"IIAPI_FLT_TYPE" can be a float4 or a float8. For detailed
|
||||
information, see the Ingres/OpenAPI User Guide - Appendix C.
|
||||
</para>
|
||||
<para>
|
||||
<parameter>index</parameter> is the number of the field and must be
|
||||
between 1 and the value given by
|
||||
<parameter>index</parameter> is the number of the field and must
|
||||
be between 1 and the value given by
|
||||
<function>ingres_num_fields</function>.
|
||||
</para>
|
||||
<para>
|
||||
See also
|
||||
<function>ingres_query</function>,
|
||||
<function>ingres_fetch_array</function>,
|
||||
<function>ingres_fetch_object</function> and
|
||||
<function>ingres_fetch_object</function>, and
|
||||
<function>ingres_fetch_row</function>.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
@ -472,7 +493,7 @@ while ($row = ingres_fetch_row()) {
|
|||
<refentry id="function.ingres-field-nullable">
|
||||
<refnamediv>
|
||||
<refname>ingres_field_nullable</refname>
|
||||
<refpurpose>Test if a field is nullable.</refpurpose>
|
||||
<refpurpose>Test if a field is nullable</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1>
|
||||
<title>Description</title>
|
||||
|
@ -487,21 +508,21 @@ while ($row = ingres_fetch_row()) {
|
|||
</paramdef>
|
||||
</funcprototype>
|
||||
</funcsynopsis>
|
||||
&warn.experimental.func;
|
||||
&warn.experimental.func;
|
||||
<para>
|
||||
<function>ingres_field_nullable</function> returns &true; if the field
|
||||
can be set to the &null; value and &false; if it can't.
|
||||
<function>ingres_field_nullable</function> returns &true; if the
|
||||
field can be set to the &null; value and &false; if it can't.
|
||||
</para>
|
||||
<para>
|
||||
<parameter>index</parameter> is the number of the field and must be
|
||||
between 1 and the value given by
|
||||
<parameter>index</parameter> is the number of the field and must
|
||||
be between 1 and the value given by
|
||||
<function>ingres_num_fields</function>.
|
||||
</para>
|
||||
<para>
|
||||
See also
|
||||
<function>ingres_query</function>,
|
||||
<function>ingres_fetch_array</function>,
|
||||
<function>ingres_fetch_object</function> and
|
||||
<function>ingres_fetch_object</function>, and
|
||||
<function>ingres_fetch_row</function>.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
@ -510,7 +531,7 @@ while ($row = ingres_fetch_row()) {
|
|||
<refentry id="function.ingres-field-length">
|
||||
<refnamediv>
|
||||
<refname>ingres_field_length</refname>
|
||||
<refpurpose>Get the length of a field.</refpurpose>
|
||||
<refpurpose>Get the length of a field</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1>
|
||||
<title>Description</title>
|
||||
|
@ -525,22 +546,23 @@ while ($row = ingres_fetch_row()) {
|
|||
</paramdef>
|
||||
</funcprototype>
|
||||
</funcsynopsis>
|
||||
&warn.experimental.func;
|
||||
&warn.experimental.func;
|
||||
<para>
|
||||
<function>ingres_field_length</function> returns the length of a field.
|
||||
This is the number of bytes used by the server to store the field.
|
||||
For detailed information, see the Ingres/OpenAPI User Guide - Appendix C.
|
||||
<function>ingres_field_length</function> returns the length of a
|
||||
field. This is the number of bytes used by the server to store
|
||||
the field. For detailed information, see the Ingres/OpenAPI User
|
||||
Guide - Appendix C.
|
||||
</para>
|
||||
<para>
|
||||
<parameter>index</parameter> is the number of the field and must be
|
||||
between 1 and the value given by
|
||||
<parameter>index</parameter> is the number of the field and must
|
||||
be between 1 and the value given by
|
||||
<function>ingres_num_fields</function>.
|
||||
</para>
|
||||
<para>
|
||||
See also
|
||||
<function>ingres_query</function>,
|
||||
<function>ingres_fetch_array</function>,
|
||||
<function>ingres_fetch_object</function> and
|
||||
<function>ingres_fetch_object</function>, and
|
||||
<function>ingres_fetch_row</function>.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
@ -549,38 +571,39 @@ while ($row = ingres_fetch_row()) {
|
|||
<refentry id="function.ingres-field-precision">
|
||||
<refnamediv>
|
||||
<refname>ingres_field_precision</refname>
|
||||
<refpurpose>Get the precision of a field.</refpurpose>
|
||||
<refpurpose>Get the precision of a field</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1>
|
||||
<title>Description</title>
|
||||
<funcsynopsis>
|
||||
<funcprototype>
|
||||
<funcdef>int <function>ingres_field_precision</function></funcdef>
|
||||
<paramdef>int
|
||||
<parameter>index</parameter>
|
||||
<funcdef>int
|
||||
<function>ingres_field_precision</function>
|
||||
</funcdef>
|
||||
<paramdef>int <parameter>index</parameter>
|
||||
</paramdef>
|
||||
<paramdef>resource
|
||||
<parameter><optional>link</optional></parameter>
|
||||
</paramdef>
|
||||
</funcprototype>
|
||||
</funcsynopsis>
|
||||
&warn.experimental.func;
|
||||
&warn.experimental.func;
|
||||
<para>
|
||||
<function>ingres_field_precision</function> returns the precision of
|
||||
a field. This value is used only for decimal, float and money SQL data
|
||||
types. For detailed information, see the Ingres/OpenAPI User Guide -
|
||||
Appendix C.
|
||||
<function>ingres_field_precision</function> returns the precision
|
||||
of a field. This value is used only for decimal, float and money
|
||||
SQL data types. For detailed information, see the Ingres/OpenAPI
|
||||
User Guide - Appendix C.
|
||||
</para>
|
||||
<para>
|
||||
<parameter>index</parameter> is the number of the field and must be
|
||||
between 1 and the value given by
|
||||
<parameter>index</parameter> is the number of the field and must
|
||||
be between 1 and the value given by
|
||||
<function>ingres_num_fields</function>.
|
||||
</para>
|
||||
<para>
|
||||
See also
|
||||
<function>ingres_query</function>,
|
||||
<function>ingres_fetch_array</function>,
|
||||
<function>ingres_fetch_object</function> and
|
||||
<function>ingres_fetch_object</function>, and
|
||||
<function>ingres_fetch_row</function>.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
@ -589,7 +612,7 @@ while ($row = ingres_fetch_row()) {
|
|||
<refentry id="function.ingres-field-scale">
|
||||
<refnamediv>
|
||||
<refname>ingres_field_scale</refname>
|
||||
<refpurpose>Get the scale of a field.</refpurpose>
|
||||
<refpurpose>Get the scale of a field</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1>
|
||||
<title>Description</title>
|
||||
|
@ -606,20 +629,21 @@ while ($row = ingres_fetch_row()) {
|
|||
</funcsynopsis>
|
||||
&warn.experimental.func;
|
||||
<para>
|
||||
<function>ingres_field_scale</function> returns the scale of a field.
|
||||
This value is used only for the decimal SQL data type. For detailed
|
||||
information, see the Ingres/OpenAPI User Guide - Appendix C.
|
||||
<function>ingres_field_scale</function> returns the scale of a
|
||||
field. This value is used only for the decimal SQL data
|
||||
type. For detailed information, see the Ingres/OpenAPI User Guide
|
||||
- Appendix C.
|
||||
</para>
|
||||
<para>
|
||||
<parameter>index</parameter> is the number of the field and must be
|
||||
between 1 and the value given by
|
||||
<parameter>index</parameter> is the number of the field and must
|
||||
be between 1 and the value given by
|
||||
<function>ingres_num_fields</function>.
|
||||
</para>
|
||||
<para>
|
||||
See also
|
||||
<function>ingres_query</function>,
|
||||
<function>ingres_fetch_array</function>,
|
||||
<function>ingres_fetch_object</function> and
|
||||
<function>ingres_fetch_object</function>, and
|
||||
<function>ingres_fetch_row</function>.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
@ -628,7 +652,7 @@ while ($row = ingres_fetch_row()) {
|
|||
<refentry id="function.ingres-fetch-array">
|
||||
<refnamediv>
|
||||
<refname>ingres_fetch_array</refname>
|
||||
<refpurpose>Fetch a row of result into an array.</refpurpose>
|
||||
<refpurpose>Fetch a row of result into an array</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1>
|
||||
<title>Description</title>
|
||||
|
@ -643,22 +667,24 @@ while ($row = ingres_fetch_row()) {
|
|||
</paramdef>
|
||||
</funcprototype>
|
||||
</funcsynopsis>
|
||||
&warn.experimental.func;
|
||||
&warn.experimental.func;
|
||||
<para>
|
||||
<function>ingres_fetch_array</function> Returns an array that corresponds
|
||||
to the fetched row, or &false; if there are no more rows.
|
||||
<function>ingres_fetch_array</function> Returns an array that
|
||||
corresponds to the fetched row, or &false; if there are no more
|
||||
rows.
|
||||
</para>
|
||||
<para>
|
||||
This function is an extended version of
|
||||
<function>ingres_fetch_row</function>. In addition to storing the
|
||||
data in the numeric indices of the result array, it also stores
|
||||
the data in associative indices, using the field names as keys.
|
||||
<function>ingres_fetch_row</function>. In addition to storing
|
||||
the data in the numeric indices of the result array, it also
|
||||
stores the data in associative indices, using the field names as
|
||||
keys.
|
||||
</para>
|
||||
<para>
|
||||
If two or more columns of the result have the same field names,
|
||||
the last column will take precedence. To access the other column(s)
|
||||
of the same name, you must use the numeric index of the column or
|
||||
make an alias for the column.
|
||||
the last column will take precedence. To access the other
|
||||
column(s) of the same name, you must use the numeric index of the
|
||||
column or make an alias for the column.
|
||||
<informalexample>
|
||||
<programlisting>
|
||||
ingres_query(select t1.f1 as foo t2.f1 as bar from t1, t2);
|
||||
|
@ -669,8 +695,9 @@ $bar = $result["bar"];
|
|||
</informalexample>
|
||||
</para>
|
||||
<para>
|
||||
<parameter>result_type</parameter> can be INGRES_NUM for enumerated array,
|
||||
INGRES_ASSOC for associative array, or INGRES_BOTH (default).
|
||||
<parameter>result_type</parameter> can be INGRES_NUM for
|
||||
enumerated array, INGRES_ASSOC for associative array, or
|
||||
INGRES_BOTH (default).
|
||||
</para>
|
||||
<para>
|
||||
Speed-wise, the function is identical to
|
||||
|
@ -701,7 +728,7 @@ while ($row = ingres_fetch_array()) {
|
|||
<function>ingres_query</function>,
|
||||
<function>ingres_num_fields</function>,
|
||||
<function>ingres_field_name</function>,
|
||||
<function>ingres_fetch_object</function> and
|
||||
<function>ingres_fetch_object</function>, and
|
||||
<function>ingres_fetch_row</function>.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
@ -710,7 +737,9 @@ while ($row = ingres_fetch_array()) {
|
|||
<refentry id="function.ingres-fetch-row">
|
||||
<refnamediv>
|
||||
<refname>ingres_fetch_row</refname>
|
||||
<refpurpose>Fetch a row of result into an enumerated array.</refpurpose>
|
||||
<refpurpose>
|
||||
Fetch a row of result into an enumerated array
|
||||
</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1>
|
||||
<title>Description</title>
|
||||
|
@ -722,11 +751,12 @@ while ($row = ingres_fetch_array()) {
|
|||
</paramdef>
|
||||
</funcprototype>
|
||||
</funcsynopsis>
|
||||
&warn.experimental.func;
|
||||
&warn.experimental.func;
|
||||
<para>
|
||||
<function>ingres_fetch_row</function> returns an array that corresponds
|
||||
to the fetched row, or &false; if there are no more rows. Each result
|
||||
column is stored in an array offset, starting at offset 1.
|
||||
<function>ingres_fetch_row</function> returns an array that
|
||||
corresponds to the fetched row, or &false; if there are no more
|
||||
rows. Each result column is stored in an array offset, starting
|
||||
at offset 1.
|
||||
</para>
|
||||
<para>
|
||||
Subsequent call to <function>ingres_fetch_row</function> would
|
||||
|
@ -753,7 +783,7 @@ while ($row = ingres_fetch_row()) {
|
|||
See also
|
||||
<function>ingres_num_fields</function>,
|
||||
<function>ingres_query</function>,
|
||||
<function>ingres_fetch_array</function> and
|
||||
<function>ingres_fetch_array</function>, and
|
||||
<function>ingres_fetch_object</function>.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
@ -768,7 +798,9 @@ while ($row = ingres_fetch_row()) {
|
|||
<title>Description</title>
|
||||
<funcsynopsis>
|
||||
<funcprototype>
|
||||
<funcdef>object <function>ingres_fetch_object</function></funcdef>
|
||||
<funcdef>object
|
||||
<function>ingres_fetch_object</function>
|
||||
</funcdef>
|
||||
<paramdef>int
|
||||
<parameter><optional>result_type</optional></parameter>
|
||||
</paramdef>
|
||||
|
@ -777,10 +809,11 @@ while ($row = ingres_fetch_row()) {
|
|||
</paramdef>
|
||||
</funcprototype>
|
||||
</funcsynopsis>
|
||||
&warn.experimental.func;
|
||||
&warn.experimental.func;
|
||||
<para>
|
||||
<function>ingres_fetch_object</function> Returns an object that
|
||||
corresponds to the fetched row, or &false; if there are no more rows.
|
||||
corresponds to the fetched row, or &false; if there are no more
|
||||
rows.
|
||||
</para>
|
||||
<para>
|
||||
This function is similar to
|
||||
|
@ -820,7 +853,7 @@ while ($row = ingres_fetch_object()) {
|
|||
<function>ingres_query</function>,
|
||||
<function>ingres_num_fields</function>,
|
||||
<function>ingres_field_name</function>,
|
||||
<function>ingres_fetch_array</function> and
|
||||
<function>ingres_fetch_array</function>, and
|
||||
<function>ingres_fetch_row</function>.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
@ -829,7 +862,7 @@ while ($row = ingres_fetch_object()) {
|
|||
<refentry id="function.ingres-rollback">
|
||||
<refnamediv>
|
||||
<refname>ingres_rollback</refname>
|
||||
<refpurpose>Roll back a transaction.</refpurpose>
|
||||
<refpurpose>Roll back a transaction</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1>
|
||||
<title>Description</title>
|
||||
|
@ -841,11 +874,11 @@ while ($row = ingres_fetch_object()) {
|
|||
</paramdef>
|
||||
</funcprototype>
|
||||
</funcsynopsis>
|
||||
&warn.experimental.func;
|
||||
&warn.experimental.func;
|
||||
<para>
|
||||
<function>ingres_rollback</function> rolls back the currently open
|
||||
transaction, actually canceling all changes made to the database
|
||||
during the transaction.
|
||||
<function>ingres_rollback</function> rolls back the currently
|
||||
open transaction, actually canceling all changes made to the
|
||||
database during the transaction.
|
||||
</para>
|
||||
<para>
|
||||
This closes the transaction. A new one can be open by sending a
|
||||
|
@ -854,7 +887,7 @@ while ($row = ingres_fetch_object()) {
|
|||
<para>
|
||||
See also
|
||||
<function>ingres_query</function>,
|
||||
<function>ingres_commit</function> and
|
||||
<function>ingres_commit</function>, and
|
||||
<function>ingres_autocommit</function>.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
@ -863,7 +896,7 @@ while ($row = ingres_fetch_object()) {
|
|||
<refentry id="function.ingres-commit">
|
||||
<refnamediv>
|
||||
<refname>ingres_commit</refname>
|
||||
<refpurpose>Commit a transaction.</refpurpose>
|
||||
<refpurpose>Commit a transaction</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1>
|
||||
<title>Description</title>
|
||||
|
@ -875,7 +908,7 @@ while ($row = ingres_fetch_object()) {
|
|||
</paramdef>
|
||||
</funcprototype>
|
||||
</funcsynopsis>
|
||||
&warn.experimental.func;
|
||||
&warn.experimental.func;
|
||||
<para>
|
||||
<function>ingres_commit</function> commits the currently open
|
||||
transaction, making all changes made to the database permanent.
|
||||
|
@ -885,14 +918,14 @@ while ($row = ingres_fetch_object()) {
|
|||
query with <function>ingres_query</function>.
|
||||
</para>
|
||||
<para>
|
||||
You can also have the server commit automaticaly after every query
|
||||
by calling <function>ingres_autocommit</function> before opening the
|
||||
transaction.
|
||||
You can also have the server commit automaticaly after every
|
||||
query by calling <function>ingres_autocommit</function> before
|
||||
opening the transaction.
|
||||
</para>
|
||||
<para>
|
||||
See also
|
||||
<function>ingres_query</function>,
|
||||
<function>ingres_rollback</function> and
|
||||
<function>ingres_rollback</function>, and
|
||||
<function>ingres_autocommit</function>.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
@ -901,7 +934,7 @@ while ($row = ingres_fetch_object()) {
|
|||
<refentry id="function.ingres-autocommit">
|
||||
<refnamediv>
|
||||
<refname>ingres_autocommit</refname>
|
||||
<refpurpose>Switch autocommit on or off.</refpurpose>
|
||||
<refpurpose>Switch autocommit on or off</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1>
|
||||
<title>Description</title>
|
||||
|
@ -913,24 +946,25 @@ while ($row = ingres_fetch_object()) {
|
|||
</paramdef>
|
||||
</funcprototype>
|
||||
</funcsynopsis>
|
||||
&warn.experimental.func;
|
||||
&warn.experimental.func;
|
||||
<para>
|
||||
<function>ingres_autocommit</function> is called before opening a
|
||||
transaction (before the first call to <function>ingres_query</function>
|
||||
or just after a call to <function>ingres_rollback</function> or
|
||||
<function>ingres_autocommit</function>) to switch the "autocommit" mode
|
||||
of the server on or off (when the script begins the autocommit mode is
|
||||
off).
|
||||
transaction (before the first call to
|
||||
<function>ingres_query</function> or just after a call to
|
||||
<function>ingres_rollback</function> or
|
||||
<function>ingres_autocommit</function>) to switch the
|
||||
"autocommit" mode of the server on or off (when the script begins
|
||||
the autocommit mode is off).
|
||||
</para>
|
||||
<para>
|
||||
When the autocommit mode is on, every query is automaticaly commited
|
||||
by the server, as if <function>ingres_commit</function> was called
|
||||
after every call to <function>ingres_query</function>.
|
||||
When the autocommit mode is on, every query is automaticaly
|
||||
commited by the server, as if <function>ingres_commit</function>
|
||||
was called after every call to <function>ingres_query</function>.
|
||||
</para>
|
||||
<para>
|
||||
See also
|
||||
<function>ingres_query</function>,
|
||||
<function>ingres_rollback</function> and
|
||||
<function>ingres_rollback</function>, and
|
||||
<function>ingres_commit</function>.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
|
Loading…
Reference in a new issue