WS, prepare for new doc style

git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@229011 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
Mehdi Achour 2007-02-05 03:10:57 +00:00
parent a97d3f110c
commit 14da72b0c0
53 changed files with 2425 additions and 2445 deletions

View file

@ -1,26 +1,24 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.2 $ -->
<!-- $Revision: 1.3 $ -->
<!-- splitted from ./en/functions/nis.xml, last change in rev 1.20 -->
<refentry id='function.yp-all'>
<refnamediv>
<refname>yp_all</refname>
<refpurpose>
Traverse the map and call a function on each entry
</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>void</type><methodname>yp_all</methodname>
<methodparam><type>string</type><parameter>domain</parameter></methodparam>
<methodparam><type>string</type><parameter>map</parameter></methodparam>
<methodparam><type>string</type><parameter>callback</parameter></methodparam>
</methodsynopsis>
<para>
&warn.undocumented.func;
</para>
</refsect1>
</refentry>
<refentry id='function.yp-all'>
<refnamediv>
<refname>yp_all</refname>
<refpurpose>Traverse the map and call a function on each entry</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>void</type><methodname>yp_all</methodname>
<methodparam><type>string</type><parameter>domain</parameter></methodparam>
<methodparam><type>string</type><parameter>map</parameter></methodparam>
<methodparam><type>string</type><parameter>callback</parameter></methodparam>
</methodsynopsis>
<para>
&warn.undocumented.func;
</para>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:

View file

@ -1,26 +1,24 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.3 $ -->
<!-- $Revision: 1.4 $ -->
<!-- splitted from ./en/functions/nis.xml, last change in rev 1.20 -->
<refentry id='function.yp-cat'>
<refnamediv>
<refname>yp_cat</refname>
<refpurpose>
Return an array containing the entire map
</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>array</type><methodname>yp_cat</methodname>
<methodparam><type>string</type><parameter>domain</parameter></methodparam>
<methodparam><type>string</type><parameter>map</parameter></methodparam>
</methodsynopsis>
<para>
<function>yp_cat</function> returns all map entries as an array with the
maps key values as array indices and the maps entries as array data.
</para>
</refsect1>
</refentry>
<refentry id='function.yp-cat'>
<refnamediv>
<refname>yp_cat</refname>
<refpurpose>Return an array containing the entire map</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>array</type><methodname>yp_cat</methodname>
<methodparam><type>string</type><parameter>domain</parameter></methodparam>
<methodparam><type>string</type><parameter>map</parameter></methodparam>
</methodsynopsis>
<para>
<function>yp_cat</function> returns all map entries as an array with the
maps key values as array indices and the maps entries as array data.
</para>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:

View file

@ -1,41 +1,39 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.3 $ -->
<!-- $Revision: 1.4 $ -->
<!-- splitted from ./en/functions/nis.xml, last change in rev 1.2 -->
<refentry id="function.yp-err-string">
<refnamediv>
<refname>yp_err_string</refname>
<refpurpose>
Returns the error string associated with the given error code
</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>string</type><methodname>yp_err_string</methodname>
<methodparam><type>int</type><parameter>errorcode</parameter></methodparam>
</methodsynopsis>
<para>
<function>yp_err_string</function> returns the error message
associated with the given error code. Useful to indicate what
exactly went wrong.
</para>
<para>
<example>
<title>Example for NIS errors</title>
<programlisting role="php">
<refentry id="function.yp-err-string">
<refnamediv>
<refname>yp_err_string</refname>
<refpurpose>Returns the error string associated with the given error code</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>string</type><methodname>yp_err_string</methodname>
<methodparam><type>int</type><parameter>errorcode</parameter></methodparam>
</methodsynopsis>
<para>
<function>yp_err_string</function> returns the error message
associated with the given error code. Useful to indicate what
exactly went wrong.
</para>
<para>
<example>
<title>Example for NIS errors</title>
<programlisting role="php">
<![CDATA[
<?php
echo "Error: " . yp_err_string(yp_errno());
?>
]]>
</programlisting>
</example>
</para>
<para>
See also <function>yp_errno</function>.
</para>
</refsect1>
</refentry>
</programlisting>
</example>
</para>
<para>
See also <function>yp_errno</function>.
</para>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:

View file

@ -1,51 +1,49 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.2 $ -->
<!-- $Revision: 1.3 $ -->
<!-- splitted from ./en/functions/nis.xml, last change in rev 1.2 -->
<refentry id="function.yp-errno">
<refnamediv>
<refname>yp_errno</refname>
<refpurpose>
Returns the error code of the previous operation
</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>int</type><methodname>yp_errno</methodname>
<void/>
</methodsynopsis>
<para>
<function>yp_errno</function> returns the error code of the
previous operation.
</para>
<para>
Possible errors are:
</para>
<para>
<simplelist>
<member>1 args to function are bad</member>
<member>2 RPC failure - domain has been unbound</member>
<member>3 can't bind to server on this domain</member>
<member>4 no such map in server's domain</member>
<member>5 no such key in map</member>
<member>6 internal yp server or client error</member>
<member>7 resource allocation failure</member>
<member>8 no more records in map database</member>
<member>9 can't communicate with portmapper</member>
<member>10 can't communicate with ypbind</member>
<member>11 can't communicate with ypserv</member>
<member>12 local domain name not set</member>
<member>13 yp database is bad</member>
<member>14 yp version mismatch</member>
<member>15 access violation</member>
<member>16 database busy</member>
</simplelist>
</para>
<para>
See also <function>yp_err_string</function>.
</para>
</refsect1>
</refentry>
<refentry id="function.yp-errno">
<refnamediv>
<refname>yp_errno</refname>
<refpurpose>Returns the error code of the previous operation</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>int</type><methodname>yp_errno</methodname>
<void/>
</methodsynopsis>
<para>
<function>yp_errno</function> returns the error code of the
previous operation.
</para>
<para>
Possible errors are:
</para>
<para>
<simplelist>
<member>1 args to function are bad</member>
<member>2 RPC failure - domain has been unbound</member>
<member>3 can't bind to server on this domain</member>
<member>4 no such map in server's domain</member>
<member>5 no such key in map</member>
<member>6 internal yp server or client error</member>
<member>7 resource allocation failure</member>
<member>8 no more records in map database</member>
<member>9 can't communicate with portmapper</member>
<member>10 can't communicate with ypbind</member>
<member>11 can't communicate with ypserv</member>
<member>12 local domain name not set</member>
<member>13 yp database is bad</member>
<member>14 yp version mismatch</member>
<member>15 access violation</member>
<member>16 database busy</member>
</simplelist>
</para>
<para>
See also <function>yp_err_string</function>.
</para>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:

View file

@ -1,28 +1,26 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.5 $ -->
<!-- $Revision: 1.6 $ -->
<!-- splitted from ./en/functions/nis.xml, last change in rev 1.2 -->
<refentry id="function.yp-first">
<refnamediv>
<refname>yp_first</refname>
<refpurpose>
Returns the first key-value pair from the named map
</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>array</type><methodname>yp_first</methodname>
<methodparam><type>string</type><parameter>domain</parameter></methodparam>
<methodparam><type>string</type><parameter>map</parameter></methodparam>
</methodsynopsis>
<para>
<function>yp_first</function> returns the first key-value
pair from the named map in the named domain, otherwise &false;.
</para>
<para>
<example>
<title>Example for the NIS first</title>
<programlisting role="php">
<refentry id="function.yp-first">
<refnamediv>
<refname>yp_first</refname>
<refpurpose>Returns the first key-value pair from the named map</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>array</type><methodname>yp_first</methodname>
<methodparam><type>string</type><parameter>domain</parameter></methodparam>
<methodparam><type>string</type><parameter>map</parameter></methodparam>
</methodsynopsis>
<para>
<function>yp_first</function> returns the first key-value
pair from the named map in the named domain, otherwise &false;.
</para>
<para>
<example>
<title>Example for the NIS first</title>
<programlisting role="php">
<![CDATA[
<?php
$entry = yp_first($domain, "passwd.byname");
@ -33,15 +31,15 @@ $value = $entry[$key];
echo "First entry in this map has key " . $key . " and value " . $value;
?>
]]>
</programlisting>
</example>
</para>
<para>
See also <function>yp_next</function> and
<function>yp_get_default_domain</function>.
</para>
</refsect1>
</refentry>
</programlisting>
</example>
</para>
<para>
See also <function>yp_next</function> and
<function>yp_get_default_domain</function>.
</para>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:

View file

@ -1,43 +1,43 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.4 $ -->
<!-- $Revision: 1.5 $ -->
<!-- splitted from ./en/functions/nis.xml, last change in rev 1.2 -->
<refentry id="function.yp-get-default-domain">
<refnamediv>
<refname>yp_get_default_domain</refname>
<refpurpose>Fetches the machine's default NIS domain</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>string</type><methodname>yp_get_default_domain</methodname>
<void/>
</methodsynopsis>
<para>
<function>yp_get_default_domain</function> returns the default
domain of the node or &false;. Can be used as the domain parameter
for successive NIS calls.
</para>
<para>
A NIS domain can be described a group of NIS maps. Every host
that needs to look up information binds itself to a certain
domain. Refer to the documents mentioned at the beginning for
more detailed information.
</para>
<para>
<example>
<title>Example for the default domain</title>
<programlisting role="php">
<refentry id="function.yp-get-default-domain">
<refnamediv>
<refname>yp_get_default_domain</refname>
<refpurpose>Fetches the machine's default NIS domain</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>string</type><methodname>yp_get_default_domain</methodname>
<void/>
</methodsynopsis>
<para>
<function>yp_get_default_domain</function> returns the default
domain of the node or &false;. Can be used as the domain parameter
for successive NIS calls.
</para>
<para>
A NIS domain can be described a group of NIS maps. Every host
that needs to look up information binds itself to a certain
domain. Refer to the documents mentioned at the beginning for
more detailed information.
</para>
<para>
<example>
<title>Example for the default domain</title>
<programlisting role="php">
<![CDATA[
<?php
$domain = yp_get_default_domain();
echo "Default NIS domain is: " . $domain;
?>
]]>
</programlisting>
</example>
</para>
</refsect1>
</refentry>
</programlisting>
</example>
</para>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:

View file

@ -1,42 +1,40 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.5 $ -->
<!-- $Revision: 1.6 $ -->
<!-- splitted from ./en/functions/nis.xml, last change in rev 1.2 -->
<refentry id="function.yp-master">
<refnamediv>
<refname>yp_master</refname>
<refpurpose>
Returns the machine name of the master NIS server for a map
</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>string</type><methodname>yp_master</methodname>
<methodparam><type>string</type><parameter>domain</parameter></methodparam>
<methodparam><type>string</type><parameter>map</parameter></methodparam>
</methodsynopsis>
<para>
<function>yp_master</function> returns the machine name of
the master NIS server for a map.
</para>
<para>
<example>
<title>Example for the NIS master</title>
<programlisting role="php">
<refentry id="function.yp-master">
<refnamediv>
<refname>yp_master</refname>
<refpurpose>Returns the machine name of the master NIS server for a map</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>string</type><methodname>yp_master</methodname>
<methodparam><type>string</type><parameter>domain</parameter></methodparam>
<methodparam><type>string</type><parameter>map</parameter></methodparam>
</methodsynopsis>
<para>
<function>yp_master</function> returns the machine name of
the master NIS server for a map.
</para>
<para>
<example>
<title>Example for the NIS master</title>
<programlisting role="php">
<![CDATA[
<?php
$number = yp_master($domain, $mapname);
echo "Master for this map is: " . $master;
?>
]]>
</programlisting>
</example>
</para>
<para>
See also <function>yp_get_default_domain</function>.
</para>
</refsect1>
</refentry>
</programlisting>
</example>
</para>
<para>
See also <function>yp_get_default_domain</function>.
</para>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:

View file

@ -1,49 +1,49 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.4 $ -->
<!-- $Revision: 1.5 $ -->
<!-- splitted from ./en/functions/nis.xml, last change in rev 1.2 -->
<refentry id="function.yp-match">
<refnamediv>
<refname>yp_match</refname>
<refpurpose>Returns the matched line</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>string</type><methodname>yp_match</methodname>
<methodparam><type>string</type><parameter>domain</parameter></methodparam>
<methodparam><type>string</type><parameter>map</parameter></methodparam>
<methodparam><type>string</type><parameter>key</parameter></methodparam>
</methodsynopsis>
<para>
<function>yp_match</function> returns the value associated with
the passed key out of the specified map or &false;. This key must
be exact.</para>
<para>
<example>
<title>Example for NIS match</title>
<programlisting role="php">
<refentry id="function.yp-match">
<refnamediv>
<refname>yp_match</refname>
<refpurpose>Returns the matched line</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>string</type><methodname>yp_match</methodname>
<methodparam><type>string</type><parameter>domain</parameter></methodparam>
<methodparam><type>string</type><parameter>map</parameter></methodparam>
<methodparam><type>string</type><parameter>key</parameter></methodparam>
</methodsynopsis>
<para>
<function>yp_match</function> returns the value associated with
the passed key out of the specified map or &false;. This key must
be exact.</para>
<para>
<example>
<title>Example for NIS match</title>
<programlisting role="php">
<![CDATA[
<?php
$entry = yp_match($domain, "passwd.byname", "joe");
echo "Matched entry is: " . $entry;
?>
]]>
</programlisting>
<para>
The above code will produce :
</para>
<screen>
</programlisting>
<para>
The above code will produce :
</para>
<screen>
<![CDATA[
joe:##joe:11111:100:Joe User:/home/j/joe:/usr/local/bin/bash
]]>
</screen>
</example>
</para>
<para>
See also <function>yp_get_default_domain</function>.
</para>
</refsect1>
</refentry>
</screen>
</example>
</para>
<para>
See also <function>yp_get_default_domain</function>.
</para>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:

View file

@ -1,27 +1,27 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.8 $ -->
<!-- $Revision: 1.9 $ -->
<!-- splitted from ./en/functions/nis.xml, last change in rev 1.2 -->
<refentry id="function.yp-next">
<refnamediv>
<refname>yp_next</refname>
<refpurpose>Returns the next key-value pair in the named map</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>array</type><methodname>yp_next</methodname>
<methodparam><type>string</type><parameter>domain</parameter></methodparam>
<methodparam><type>string</type><parameter>map</parameter></methodparam>
<methodparam><type>string</type><parameter>key</parameter></methodparam>
</methodsynopsis>
<para>
<function>yp_next</function> returns the next key-value pair in
the named map after the specified key or &false;.
</para>
<para>
<example>
<title>Example for NIS next</title>
<programlisting role="php">
<refentry id="function.yp-next">
<refnamediv>
<refname>yp_next</refname>
<refpurpose>Returns the next key-value pair in the named map</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>array</type><methodname>yp_next</methodname>
<methodparam><type>string</type><parameter>domain</parameter></methodparam>
<methodparam><type>string</type><parameter>map</parameter></methodparam>
<methodparam><type>string</type><parameter>key</parameter></methodparam>
</methodsynopsis>
<para>
<function>yp_next</function> returns the next key-value pair in
the named map after the specified key or &false;.
</para>
<para>
<example>
<title>Example for NIS next</title>
<programlisting role="php">
<![CDATA[
<?php
$entry = yp_next($domain, "passwd.byname", "joe");
@ -33,19 +33,19 @@ if (!$entry) {
$key = key($entry);
echo "The next entry after joe has key " . $key
echo "The next entry after joe has key " . $key
. " and value " . $entry[$key];
?>
]]>
</programlisting>
</example>
</para>
<para>
See also <function>yp_first</function> and
<function>yp_get_default_domain</function>.
</para>
</refsect1>
</refentry>
</programlisting>
</example>
</para>
<para>
See also <function>yp_first</function> and
<function>yp_get_default_domain</function>.
</para>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:

View file

@ -1,40 +1,40 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.5 $ -->
<!-- $Revision: 1.6 $ -->
<!-- splitted from ./en/functions/nis.xml, last change in rev 1.2 -->
<refentry id="function.yp-order">
<refnamediv>
<refname>yp_order</refname>
<refpurpose>Returns the order number for a map</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>int</type><methodname>yp_order</methodname>
<methodparam><type>string</type><parameter>domain</parameter></methodparam>
<methodparam><type>string</type><parameter>map</parameter></methodparam>
</methodsynopsis>
<para>
<function>yp_order</function> returns the order number for a map
or &false;.
</para>
<para>
<example>
<title>Example for the NIS order</title>
<programlisting role="php">
<refentry id="function.yp-order">
<refnamediv>
<refname>yp_order</refname>
<refpurpose>Returns the order number for a map</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>int</type><methodname>yp_order</methodname>
<methodparam><type>string</type><parameter>domain</parameter></methodparam>
<methodparam><type>string</type><parameter>map</parameter></methodparam>
</methodsynopsis>
<para>
<function>yp_order</function> returns the order number for a map
or &false;.
</para>
<para>
<example>
<title>Example for the NIS order</title>
<programlisting role="php">
<![CDATA[
<?php
$number = yp_order($domain, $mapname);
echo "Order number for this map is: " . $number;
?>
]]>
</programlisting>
</example>
</para>
<para>
See also <function>yp_get_default_domain</function>.
</para>
</refsect1>
</refentry>
</programlisting>
</example>
</para>
<para>
See also <function>yp_get_default_domain</function>.
</para>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:

View file

@ -1,104 +1,102 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.3 $ -->
<refentry id="function.oci-bind-array-by-name">
<refnamediv>
<refname>oci_bind_array_by_name</refname>
<refpurpose>
Binds PHP array to Oracle PL/SQL array by name
</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>bool</type><methodname>oci_bind_array_by_name</methodname>
<methodparam><type>resource</type><parameter>stmt</parameter></methodparam>
<methodparam><type>string</type><parameter>name</parameter></methodparam>
<methodparam><type>array</type><parameter role="reference">var_array</parameter></methodparam>
<methodparam><type>int</type><parameter>max_table_length</parameter></methodparam>
<methodparam choice="opt"><type>int</type><parameter>max_item_length</parameter></methodparam>
<methodparam choice="opt"><type>int</type><parameter>type</parameter></methodparam>
</methodsynopsis>
<note>
<!-- $Revision: 1.4 $ -->
<refentry id="function.oci-bind-array-by-name">
<refnamediv>
<refname>oci_bind_array_by_name</refname>
<refpurpose>Binds PHP array to Oracle PL/SQL array by name</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>bool</type><methodname>oci_bind_array_by_name</methodname>
<methodparam><type>resource</type><parameter>stmt</parameter></methodparam>
<methodparam><type>string</type><parameter>name</parameter></methodparam>
<methodparam><type>array</type><parameter role="reference">var_array</parameter></methodparam>
<methodparam><type>int</type><parameter>max_table_length</parameter></methodparam>
<methodparam choice="opt"><type>int</type><parameter>max_item_length</parameter></methodparam>
<methodparam choice="opt"><type>int</type><parameter>type</parameter></methodparam>
</methodsynopsis>
<note>
<para>
This function is available since OCI8 release 1.2 and PHP release 5.1.2.
</para>
</note>
<para>
<function>oci_bind_array_by_name</function> binds the PHP array
<parameter>var_array</parameter> to the Oracle placeholder
<parameter>name</parameter>, which points to Oracle PL/SQL array.
Whether it will be used for input or output will be determined at
run-time. The <parameter>max_table_length</parameter>
parameter sets the maximum length both for incoming and result arrays.
Parameter <parameter>max_item_length</parameter> sets maximum length for
array items. If <parameter>max_item_length</parameter> was not specified
or equals to -1, <function>oci_bind_array_by_name</function> will use
find the longest element in the incoming array and will use it as
maximum length for array items. <parameter>type</parameter> parameter
should be used to set the type of PL/SQL array items. See list of
available types below.
</para>
<para>
<itemizedlist>
<listitem>
<para>
This function is available since OCI8 release 1.2 and PHP release 5.1.2.
<constant>SQLT_NUM</constant> - for arrays of NUMBER.
</para>
</note>
<para>
<function>oci_bind_array_by_name</function> binds the PHP array
<parameter>var_array</parameter> to the Oracle placeholder
<parameter>name</parameter>, which points to Oracle PL/SQL array.
Whether it will be used for input or output will be determined at
run-time. The <parameter>max_table_length</parameter>
parameter sets the maximum length both for incoming and result arrays.
Parameter <parameter>max_item_length</parameter> sets maximum length for
array items. If <parameter>max_item_length</parameter> was not specified
or equals to -1, <function>oci_bind_array_by_name</function> will use
find the longest element in the incoming array and will use it as
maximum length for array items. <parameter>type</parameter> parameter
should be used to set the type of PL/SQL array items. See list of
available types below.
</para>
<para>
<itemizedlist>
<listitem>
<para>
<constant>SQLT_NUM</constant> - for arrays of NUMBER.
</para>
</listitem>
<listitem>
<para>
<constant>SQLT_INT</constant> - for arrays of INTEGER (Note: INTEGER
it is actually a synonym for NUMBER(38), but
<constant>SQLT_NUM</constant> type won't work in this case even
though they are synonyms).
</para>
</listitem>
<listitem>
<para>
<constant>SQLT_FLT</constant> - for arrays of FLOAT.
</para>
</listitem>
<listitem>
<para>
<constant>SQLT_AFC</constant> - for arrays of CHAR.
</para>
</listitem>
<listitem>
<para>
<constant>SQLT_CHR</constant> - for arrays of VARCHAR2.
</para>
</listitem>
<listitem>
<para>
<constant>SQLT_VCS</constant> - for arrays of VARCHAR.
</para>
</listitem>
<listitem>
<para>
<constant>SQLT_AVC</constant> - for arrays of CHARZ.
</para>
</listitem>
<listitem>
<para>
<constant>SQLT_STR</constant> - for arrays of STRING.
</para>
</listitem>
<listitem>
<para>
<constant>SQLT_LVC</constant> - for arrays of LONG VARCHAR.
</para>
</listitem>
<listitem>
<para>
<constant>SQLT_ODT</constant> - for arrays of DATE.
</para>
</listitem>
</itemizedlist>
</para>
<para>
<example>
<title><function>oci_bind_array_by_name</function>example</title>
<programlisting role="php">
</listitem>
<listitem>
<para>
<constant>SQLT_INT</constant> - for arrays of INTEGER (Note: INTEGER
it is actually a synonym for NUMBER(38), but
<constant>SQLT_NUM</constant> type won't work in this case even
though they are synonyms).
</para>
</listitem>
<listitem>
<para>
<constant>SQLT_FLT</constant> - for arrays of FLOAT.
</para>
</listitem>
<listitem>
<para>
<constant>SQLT_AFC</constant> - for arrays of CHAR.
</para>
</listitem>
<listitem>
<para>
<constant>SQLT_CHR</constant> - for arrays of VARCHAR2.
</para>
</listitem>
<listitem>
<para>
<constant>SQLT_VCS</constant> - for arrays of VARCHAR.
</para>
</listitem>
<listitem>
<para>
<constant>SQLT_AVC</constant> - for arrays of CHARZ.
</para>
</listitem>
<listitem>
<para>
<constant>SQLT_STR</constant> - for arrays of STRING.
</para>
</listitem>
<listitem>
<para>
<constant>SQLT_LVC</constant> - for arrays of LONG VARCHAR.
</para>
</listitem>
<listitem>
<para>
<constant>SQLT_ODT</constant> - for arrays of DATE.
</para>
</listitem>
</itemizedlist>
</para>
<para>
<example>
<title><function>oci_bind_array_by_name</function>example</title>
<programlisting role="php">
<![CDATA[
<?php
@ -151,11 +149,11 @@ var_dump($array);
?>
]]>
</programlisting>
</example>
</para>
</refsect1>
</refentry>
</programlisting>
</example>
</para>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:

View file

@ -1,132 +1,130 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.10 $ -->
<refentry id="function.oci-bind-by-name">
<refnamediv>
<refname>oci_bind_by_name</refname>
<refpurpose>
Binds the PHP variable to the Oracle placeholder
</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>bool</type><methodname>oci_bind_by_name</methodname>
<methodparam><type>resource</type><parameter>stmt</parameter></methodparam>
<methodparam><type>string</type><parameter>ph_name</parameter></methodparam>
<methodparam><type>mixed</type><parameter role="reference">variable</parameter></methodparam>
<methodparam choice="opt"><type>int</type><parameter>maxlength</parameter></methodparam>
<methodparam choice="opt"><type>int</type><parameter>type</parameter></methodparam>
</methodsynopsis>
<para>
<function>oci_bind_by_name</function> binds the PHP variable
<parameter>variable</parameter> to the Oracle placeholder
<parameter>ph_name</parameter>. Whether it will be used for
input or output will be determined at run-time and the necessary
storage space will be allocated. The <parameter>length</parameter>
parameter sets the maximum length for the bind. If you set
<parameter>length</parameter> to -1
<function>oci_bind_by_name</function> will use the current length of
<parameter>variable</parameter> to set the maximum length.
</para>
<para>
If you need to bind an abstract datatype (LOB/ROWID/BFILE) you
need to allocate it first using the
<function>oci_new_descriptor</function> function. The
<parameter>length</parameter> is not used for abstract datatypes
and should be set to -1. The <parameter>type</parameter> parameter
tells Oracle which descriptor is used. Possible
values are:
<itemizedlist>
<listitem>
<para>
<constant>SQLT_FILE</constant> - for BFILEs;
</para>
</listitem>
<listitem>
<para>
<constant>SQLT_CFILE</constant> - for CFILEs;
</para>
</listitem>
<listitem>
<para>
<constant>SQLT_CLOB</constant> - for CLOBs;
</para>
</listitem>
<listitem>
<para>
<constant>SQLT_BLOB</constant> - for BLOBs;
</para>
</listitem>
<listitem>
<para>
<constant>SQLT_RDD</constant> - for ROWIDs;
</para>
</listitem>
<listitem>
<para>
<constant>SQLT_NTY</constant> - for named datatypes;
</para>
</listitem>
<listitem>
<para>
<constant>SQLT_INT</constant> - for integers;
</para>
</listitem>
<listitem>
<para>
<constant>SQLT_CHR</constant> - for VARCHARs;
</para>
</listitem>
<listitem>
<para>
<constant>SQLT_BIN</constant> - for RAW columns;
</para>
</listitem>
<listitem>
<para>
<constant>SQLT_LNG</constant> - for LONG columns;
</para>
</listitem>
<listitem>
<para>
<constant>SQLT_LBI</constant> - for LONG RAW columns;
</para>
</listitem>
<listitem>
<para>
<constant>SQLT_RSET</constant> - for cursors, that were created
before with <function>oci_new_cursor</function>.
</para>
</listitem>
</itemizedlist>
</para>
<para>
<example>
<title><function>oci_bind_by_name</function>example</title>
<programlisting role="php">
<!-- $Revision: 1.11 $ -->
<refentry id="function.oci-bind-by-name">
<refnamediv>
<refname>oci_bind_by_name</refname>
<refpurpose>Binds the PHP variable to the Oracle placeholder</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>bool</type><methodname>oci_bind_by_name</methodname>
<methodparam><type>resource</type><parameter>stmt</parameter></methodparam>
<methodparam><type>string</type><parameter>ph_name</parameter></methodparam>
<methodparam><type>mixed</type><parameter role="reference">variable</parameter></methodparam>
<methodparam choice="opt"><type>int</type><parameter>maxlength</parameter></methodparam>
<methodparam choice="opt"><type>int</type><parameter>type</parameter></methodparam>
</methodsynopsis>
<para>
<function>oci_bind_by_name</function> binds the PHP variable
<parameter>variable</parameter> to the Oracle placeholder
<parameter>ph_name</parameter>. Whether it will be used for
input or output will be determined at run-time and the necessary
storage space will be allocated. The <parameter>length</parameter>
parameter sets the maximum length for the bind. If you set
<parameter>length</parameter> to -1
<function>oci_bind_by_name</function> will use the current length of
<parameter>variable</parameter> to set the maximum length.
</para>
<para>
If you need to bind an abstract datatype (LOB/ROWID/BFILE) you
need to allocate it first using the
<function>oci_new_descriptor</function> function. The
<parameter>length</parameter> is not used for abstract datatypes
and should be set to -1. The <parameter>type</parameter> parameter
tells Oracle which descriptor is used. Possible
values are:
<itemizedlist>
<listitem>
<para>
<constant>SQLT_FILE</constant> - for BFILEs;
</para>
</listitem>
<listitem>
<para>
<constant>SQLT_CFILE</constant> - for CFILEs;
</para>
</listitem>
<listitem>
<para>
<constant>SQLT_CLOB</constant> - for CLOBs;
</para>
</listitem>
<listitem>
<para>
<constant>SQLT_BLOB</constant> - for BLOBs;
</para>
</listitem>
<listitem>
<para>
<constant>SQLT_RDD</constant> - for ROWIDs;
</para>
</listitem>
<listitem>
<para>
<constant>SQLT_NTY</constant> - for named datatypes;
</para>
</listitem>
<listitem>
<para>
<constant>SQLT_INT</constant> - for integers;
</para>
</listitem>
<listitem>
<para>
<constant>SQLT_CHR</constant> - for VARCHARs;
</para>
</listitem>
<listitem>
<para>
<constant>SQLT_BIN</constant> - for RAW columns;
</para>
</listitem>
<listitem>
<para>
<constant>SQLT_LNG</constant> - for LONG columns;
</para>
</listitem>
<listitem>
<para>
<constant>SQLT_LBI</constant> - for LONG RAW columns;
</para>
</listitem>
<listitem>
<para>
<constant>SQLT_RSET</constant> - for cursors, that were created
before with <function>oci_new_cursor</function>.
</para>
</listitem>
</itemizedlist>
</para>
<para>
<example>
<title><function>oci_bind_by_name</function>example</title>
<programlisting role="php">
<![CDATA[
<?php
/* oci_bind_by_name example thies at thieso dot net (980221)
inserts 3 records into emp, and uses the ROWID for updating the
inserts 3 records into emp, and uses the ROWID for updating the
records just after the insert.
*/
$conn = oci_connect("scott", "tiger");
$stmt = oci_parse($conn, "
INSERT INTO
emp (empno, ename)
VALUES
(:empno,:ename)
RETURNING
ROWID
INTO
INSERT INTO
emp (empno, ename)
VALUES
(:empno,:ename)
RETURNING
ROWID
INTO
:rid
");
$data = array(
1111 => "Larry",
2222 => "Bill",
1111 => "Larry",
2222 => "Bill",
3333 => "Jim"
);
@ -138,10 +136,10 @@ oci_bind_by_name($stmt, ":rid", $rowid, -1, OCI_B_ROWID);
$update = oci_parse($conn, "
UPDATE
emp
SET
sal = :sal
WHERE
emp
SET
sal = :sal
WHERE
ROWID = :rid
");
oci_bind_by_name($update, ":rid", $rowid, -1, OCI_B_ROWID);
@ -152,7 +150,7 @@ $sal = 10000;
foreach ($data as $empno => $ename) {
oci_execute($stmt);
oci_execute($update);
}
}
$rowid->free();
@ -160,17 +158,17 @@ oci_free_statement($update);
oci_free_statement($stmt);
$stmt = oci_parse($conn, "
SELECT
*
FROM
emp
WHERE
empno
IN
SELECT
*
FROM
emp
WHERE
empno
IN
(1111,2222,3333)
");
oci_execute($stmt);
while ($row = oci_fetch_assoc($stmt)) {
var_dump($row);
}
@ -180,10 +178,10 @@ oci_free_statement($stmt);
/* delete our "junk" from the emp table.... */
$stmt = oci_parse($conn, "
DELETE FROM
emp
WHERE
empno
IN
emp
WHERE
empno
IN
(1111,2222,3333)
");
oci_execute($stmt);
@ -192,17 +190,17 @@ oci_free_statement($stmt);
oci_close($conn);
?>
]]>
</programlisting>
</example>
</para>
<para>
Remember, this function strips trailing whitespaces. See the following
example:
</para>
<para>
<example>
<title><function>oci_bind_by_name</function> example</title>
<programlisting role="php">
</programlisting>
</example>
</para>
<para>
Remember, this function strips trailing whitespaces. See the following
example:
</para>
<para>
<example>
<title><function>oci_bind_by_name</function> example</title>
<programlisting role="php">
<![CDATA[
<?php
$connection = oci_connect('apelsin','kanistra');
@ -218,13 +216,13 @@ oci_close($conn);
*/
?>
]]>
</programlisting>
</example>
</para>
<para>
<example>
<title><function>oci_bind_by_name</function> example</title>
<programlisting role="php">
</programlisting>
</example>
</para>
<para>
<example>
<title><function>oci_bind_by_name</function> example</title>
<programlisting role="php">
<![CDATA[
<?php
$connection = oci_connect('apelsin','kanistra');
@ -239,33 +237,33 @@ oci_close($conn);
*/
?>
]]>
</programlisting>
</example>
</para>
<warning>
<para>
Do not use <link
linkend="ini.magic-quotes-gpc">magic_quotes_gpc</link> or
<function>addslashes</function> and <function>oci_bind_by_name</function>
simultaneously as no quoting is needed and any magically applied quotes
will be written into your database as <function>oci_bind_by_name</function>
is not able to distinguish magically added quotings from those added
intentionally.
</para>
</warning>
<para>
&return.success;
</para>
<note>
<para>
In PHP versions before 5.0.0 you must use <function>ocibindbyname</function> instead.
This name still can be used, it was left as alias of
<function>oci_bind_by_name</function> for downwards compatability.
This, however, is deprecated and not recommended.
</para>
</note>
</refsect1>
</refentry>
</programlisting>
</example>
</para>
<warning>
<para>
Do not use <link
linkend="ini.magic-quotes-gpc">magic_quotes_gpc</link> or
<function>addslashes</function> and <function>oci_bind_by_name</function>
simultaneously as no quoting is needed and any magically applied quotes
will be written into your database as <function>oci_bind_by_name</function>
is not able to distinguish magically added quotings from those added
intentionally.
</para>
</warning>
<para>
&return.success;
</para>
<note>
<para>
In PHP versions before 5.0.0 you must use <function>ocibindbyname</function> instead.
This name still can be used, it was left as alias of
<function>oci_bind_by_name</function> for downwards compatability.
This, however, is deprecated and not recommended.
</para>
</note>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:

View file

@ -1,31 +1,31 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.4 $ -->
<!-- $Revision: 1.5 $ -->
<refentry id="function.oci-cancel">
<refnamediv>
<refname>oci_cancel</refname>
<refpurpose>Cancels reading from cursor</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>bool</type><methodname>oci_cancel</methodname>
<methodparam><type>resource</type><parameter>stmt</parameter></methodparam>
</methodsynopsis>
<para>
<function>oci_cancel</function> invalidates a cursor, freeing all
associated resources and cancels the ability to read from it.
</para>
<para>
&return.success;
</para>
<para>
In PHP versions before 5.0.0 you must use <function>ocicancel</function> instead.
This name still can be used, it was left as alias of
<function>oci_cancel</function> for downwards compatability.
This, however, is deprecated and not recommended.
</para>
</refsect1>
</refentry>
<refnamediv>
<refname>oci_cancel</refname>
<refpurpose>Cancels reading from cursor</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>bool</type><methodname>oci_cancel</methodname>
<methodparam><type>resource</type><parameter>stmt</parameter></methodparam>
</methodsynopsis>
<para>
<function>oci_cancel</function> invalidates a cursor, freeing all
associated resources and cancels the ability to read from it.
</para>
<para>
&return.success;
</para>
<para>
In PHP versions before 5.0.0 you must use <function>ocicancel</function> instead.
This name still can be used, it was left as alias of
<function>oci_cancel</function> for downwards compatability.
This, however, is deprecated and not recommended.
</para>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:

View file

@ -1,42 +1,42 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.5 $ -->
<refentry id="function.oci-close">
<refnamediv>
<refname>oci_close</refname>
<refpurpose>Closes Oracle connection</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>bool</type><methodname>oci_close</methodname>
<methodparam><type>resource</type><parameter>connection</parameter></methodparam>
</methodsynopsis>
<para>
<function>oci_close</function> closes the Oracle connection
<parameter>connection</parameter>.
</para>
<note>
<para>
Starting from the version 1.1 <function>oci_close</function> correctly
closes the Oracle connection.
Use <link
linkend="ini.oci8.old_oci_close_semantics">oci8.old_oci_close_semantics</link>
option to restore old behaviour of this function.
</para>
</note>
<para>
&return.success;
</para>
<note>
<para>
In PHP versions before 5.0.0 you must use <function>ocilogoff</function> instead.
This name still can be used, it was left as alias of
<function>oci_close</function> for downwards compatability.
This, however, is deprecated and not recommended.
</para>
</note>
</refsect1>
</refentry>
<!-- $Revision: 1.6 $ -->
<refentry id="function.oci-close">
<refnamediv>
<refname>oci_close</refname>
<refpurpose>Closes Oracle connection</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>bool</type><methodname>oci_close</methodname>
<methodparam><type>resource</type><parameter>connection</parameter></methodparam>
</methodsynopsis>
<para>
<function>oci_close</function> closes the Oracle connection
<parameter>connection</parameter>.
</para>
<note>
<para>
Starting from the version 1.1 <function>oci_close</function> correctly
closes the Oracle connection.
Use <link
linkend="ini.oci8.old_oci_close_semantics">oci8.old_oci_close_semantics</link>
option to restore old behaviour of this function.
</para>
</note>
<para>
&return.success;
</para>
<note>
<para>
In PHP versions before 5.0.0 you must use <function>ocilogoff</function> instead.
This name still can be used, it was left as alias of
<function>oci_close</function> for downwards compatability.
This, however, is deprecated and not recommended.
</para>
</note>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:

View file

@ -1,40 +1,40 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.4 $ -->
<refentry id="function.oci-commit">
<refnamediv>
<refname>oci_commit</refname>
<refpurpose>Commits outstanding statements</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>bool</type><methodname>oci_commit</methodname>
<methodparam><type>resource</type><parameter>connection</parameter></methodparam>
</methodsynopsis>
<para>
<function>oci_commit</function> commits all outstanding statements
for the active transaction on the Oracle connection
<parameter>connection</parameter>.
</para>
<para>
<example>
<title><function>oci_commit</function> example</title>
<programlisting role="php">
<!-- $Revision: 1.5 $ -->
<refentry id="function.oci-commit">
<refnamediv>
<refname>oci_commit</refname>
<refpurpose>Commits outstanding statements</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>bool</type><methodname>oci_commit</methodname>
<methodparam><type>resource</type><parameter>connection</parameter></methodparam>
</methodsynopsis>
<para>
<function>oci_commit</function> commits all outstanding statements
for the active transaction on the Oracle connection
<parameter>connection</parameter>.
</para>
<para>
<example>
<title><function>oci_commit</function> example</title>
<programlisting role="php">
<![CDATA[
<?php
// Login to Oracle server
$conn = oci_connect('scott', 'tiger');
// Parse SQL
$stmt = oci_parse($conn, "
INSERT INTO
employees (name, surname)
VALUES
INSERT INTO
employees (name, surname)
VALUES
('Maxim', 'Maletsky')
");
/* Execute statement
OCI_DEFAULT tells oci_execute()
OCI_DEFAULT tells oci_execute()
not to commit statement immediately */
oci_execute($stmt, OCI_DEFAULT);
@ -43,7 +43,7 @@
Parsing and executing other statements here ...
....
*/
// Commit transaction
$committed = oci_commit($conn);
@ -55,34 +55,34 @@
?>
]]>
</programlisting>
</example>
</para>
<para>
&return.success;
</para>
<note>
<para>
Transactions are automatically rolled back when you close
the connection, or when the script ends, whichever is soonest. You
need to explicitly call <function>oci_commit</function> to commit
the transaction, or <function>oci_rollback</function> to abort it.
</para>
</note>
<note>
<para>
In PHP versions before 5.0.0 you must use <function>ocicommit</function> instead.
This name still can be used, it was left as alias of
<function>oci_commit</function> for downwards compatability.
This, however, is deprecated and not recommended.
</para>
</note>
<simpara>
See also <function>oci_rollback</function> and
<function>oci_execute</function>.
</simpara>
</refsect1>
</refentry>
</programlisting>
</example>
</para>
<para>
&return.success;
</para>
<note>
<para>
Transactions are automatically rolled back when you close
the connection, or when the script ends, whichever is soonest. You
need to explicitly call <function>oci_commit</function> to commit
the transaction, or <function>oci_rollback</function> to abort it.
</para>
</note>
<note>
<para>
In PHP versions before 5.0.0 you must use <function>ocicommit</function> instead.
This name still can be used, it was left as alias of
<function>oci_commit</function> for downwards compatability.
This, however, is deprecated and not recommended.
</para>
</note>
<simpara>
See also <function>oci_rollback</function> and
<function>oci_execute</function>.
</simpara>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:

View file

@ -1,72 +1,72 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.8 $ -->
<refentry id="function.oci-connect">
<refnamediv>
<refname>oci_connect</refname>
<refpurpose>Establishes a connection to the Oracle server</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>resource</type><methodname>oci_connect</methodname>
<methodparam><type>string</type><parameter>username</parameter></methodparam>
<methodparam><type>string</type><parameter>password</parameter></methodparam>
<methodparam choice="opt"><type>string</type><parameter>db</parameter></methodparam>
<methodparam choice="opt"><type>string</type><parameter>charset</parameter></methodparam>
<methodparam choice="opt"><type>int</type><parameter>session_mode</parameter></methodparam>
</methodsynopsis>
<para>
<function>oci_connect</function> returns a connection identifier
needed for most other OCI calls. The optional third parameter
can either contain the name of the local Oracle instance or the
name of the entry in <filename>tnsnames.ora</filename> to which
you want to connect.
If the optional third parameter is not specified, PHP uses the
environment variables <constant>ORACLE_SID</constant> (Oracle
instance) or <constant>TWO_TASK</constant>
(<filename>tnsnames.ora</filename>) to determine which database
to connect to.
</para>
<para>
Parameter <parameter>session_mode</parameter> is available since version
1.1 and accepts the following values: <constant>OCI_DEFAULT</constant>,
<constant>OCI_SYSOPER</constant> and <constant>OCI_SYSDBA</constant>.
If either <constant>OCI_SYSOPER</constant> or
<constant>OCI_SYSDBA</constant> were specified,
<function>oci_connect</function> will try to establish privileged
connection using external credentials. Privileged connections are
disabled by default. To enable them you need to set <link
linkend="ini.oci8.privileged_connect">oci8.privileged_connect</link>
to On.
</para>
<note>
<simpara>
If you're using PHP with Oracle Instant Client, you can use easy connect
naming method described here:
<ulink url="&url.oracle.oic.connect;">&url.oracle.oic.connect;</ulink>.
Basically this means you can specify "//db_host[:port]/database_name"
as database name. But if you want to use the old way of naming you
<emphasis>must</emphasis> set either <constant>ORACLE_HOME</constant> or
<constant>TNS_ADMIN</constant>.
</simpara>
</note>
<note>
<simpara>
The second and subsequent calls to <function>oci_connect</function>
with the same parameters will return the connection handle returned
from the first call. This means that queries issued against one
handle are also applied to the other handles, because they are the
<emphasis>same</emphasis> handle. This behaviour is demonstrated in
Example 1 below. If you require two handles to be transactionally
isolated from each other, you should use
<function>oci_new_connect</function> instead.
</simpara>
</note>
&oci.charset;
<para>
<example>
<title><function>oci_connect</function> example</title>
<programlisting role="php">
<!-- $Revision: 1.9 $ -->
<refentry id="function.oci-connect">
<refnamediv>
<refname>oci_connect</refname>
<refpurpose>Establishes a connection to the Oracle server</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>resource</type><methodname>oci_connect</methodname>
<methodparam><type>string</type><parameter>username</parameter></methodparam>
<methodparam><type>string</type><parameter>password</parameter></methodparam>
<methodparam choice="opt"><type>string</type><parameter>db</parameter></methodparam>
<methodparam choice="opt"><type>string</type><parameter>charset</parameter></methodparam>
<methodparam choice="opt"><type>int</type><parameter>session_mode</parameter></methodparam>
</methodsynopsis>
<para>
<function>oci_connect</function> returns a connection identifier
needed for most other OCI calls. The optional third parameter
can either contain the name of the local Oracle instance or the
name of the entry in <filename>tnsnames.ora</filename> to which
you want to connect.
If the optional third parameter is not specified, PHP uses the
environment variables <constant>ORACLE_SID</constant> (Oracle
instance) or <constant>TWO_TASK</constant>
(<filename>tnsnames.ora</filename>) to determine which database
to connect to.
</para>
<para>
Parameter <parameter>session_mode</parameter> is available since version
1.1 and accepts the following values: <constant>OCI_DEFAULT</constant>,
<constant>OCI_SYSOPER</constant> and <constant>OCI_SYSDBA</constant>.
If either <constant>OCI_SYSOPER</constant> or
<constant>OCI_SYSDBA</constant> were specified,
<function>oci_connect</function> will try to establish privileged
connection using external credentials. Privileged connections are
disabled by default. To enable them you need to set <link
linkend="ini.oci8.privileged_connect">oci8.privileged_connect</link>
to On.
</para>
<note>
<simpara>
If you're using PHP with Oracle Instant Client, you can use easy connect
naming method described here:
<ulink url="&url.oracle.oic.connect;">&url.oracle.oic.connect;</ulink>.
Basically this means you can specify "//db_host[:port]/database_name"
as database name. But if you want to use the old way of naming you
<emphasis>must</emphasis> set either <constant>ORACLE_HOME</constant> or
<constant>TNS_ADMIN</constant>.
</simpara>
</note>
<note>
<simpara>
The second and subsequent calls to <function>oci_connect</function>
with the same parameters will return the connection handle returned
from the first call. This means that queries issued against one
handle are also applied to the other handles, because they are the
<emphasis>same</emphasis> handle. This behaviour is demonstrated in
Example 1 below. If you require two handles to be transactionally
isolated from each other, you should use
<function>oci_new_connect</function> instead.
</simpara>
</note>
&oci.charset;
<para>
<example>
<title><function>oci_connect</function> example</title>
<programlisting role="php">
<![CDATA[
<?php
echo "<pre>";
@ -75,48 +75,48 @@ $db = "";
$c1 = oci_connect("scott", "tiger", $db);
$c2 = oci_connect("scott", "tiger", $db);
function create_table($conn)
function create_table($conn)
{
$stmt = oci_parse($conn, "create table scott.hallo (test varchar2(64))");
oci_execute($stmt);
echo $conn . " created table\n\n";
}
function drop_table($conn)
function drop_table($conn)
{
$stmt = oci_parse($conn, "drop table scott.hallo");
oci_execute($stmt);
echo $conn . " dropped table\n\n";
}
function insert_data($conn)
function insert_data($conn)
{
$stmt = oci_parse($conn, "insert into scott.hallo
$stmt = oci_parse($conn, "insert into scott.hallo
values('$conn' || ' ' || to_char(sysdate,'DD-MON-YY HH24:MI:SS'))");
oci_execute($stmt, OCI_DEFAULT);
echo $conn . " inserted hallo\n\n";
}
function delete_data($conn)
function delete_data($conn)
{
$stmt = oci_parse($conn, "delete from scott.hallo");
oci_execute($stmt, OCI_DEFAULT);
echo $conn . " deleted hallo\n\n";
}
function commit($conn)
function commit($conn)
{
oci_commit($conn);
echo $conn . " committed\n\n";
}
function rollback($conn)
function rollback($conn)
{
oci_rollback($conn);
echo $conn . " rollback\n\n";
}
function select_data($conn)
function select_data($conn)
{
$stmt = oci_parse($conn, "select * from scott.hallo");
oci_execute($stmt, OCI_DEFAULT);
@ -132,12 +132,12 @@ insert_data($c1); // Insert a row using c1
insert_data($c2); // Insert a row using c2
select_data($c1); // Results of both inserts are returned
select_data($c2);
select_data($c2);
rollback($c1); // Rollback using c1
select_data($c1); // Both inserts have been rolled back
select_data($c2);
select_data($c2);
insert_data($c2); // Insert a row using c2
commit($c2); // Commit using c2
@ -156,27 +156,27 @@ drop_table($c1);
echo "</pre>";
?>
]]>
</programlisting>
</example>
</para>
<para>
<function>oci_connect</function> returns &false; if an error occured.
</para>
<note>
<para>
In PHP versions before 5.0.0 you must use <function>ocilogon</function> instead.
This name still can be used, it was left as the alias of
<function>oci_connect</function> for downwards compatability.
This, however, is deprecated and not recommended.
</para>
</note>
<simpara>
See also <function>oci_pconnect</function>,
<function>oci_new_connect</function> and
<function>oci_close</function>.
</simpara>
</refsect1>
</refentry>
</programlisting>
</example>
</para>
<para>
<function>oci_connect</function> returns &false; if an error occured.
</para>
<note>
<para>
In PHP versions before 5.0.0 you must use <function>ocilogon</function> instead.
This name still can be used, it was left as the alias of
<function>oci_connect</function> for downwards compatability.
This, however, is deprecated and not recommended.
</para>
</note>
<simpara>
See also <function>oci_pconnect</function>,
<function>oci_new_connect</function> and
<function>oci_close</function>.
</simpara>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:

View file

@ -1,39 +1,37 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.5 $ -->
<refentry id="function.oci-define-by-name">
<refnamediv>
<refname>oci_define_by_name</refname>
<refpurpose>
Uses a PHP variable for the define-step during a SELECT
</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>bool</type><methodname>oci_define_by_name</methodname>
<methodparam><type>resource</type><parameter>statement</parameter></methodparam>
<methodparam><type>string</type><parameter>column_name</parameter></methodparam>
<methodparam><type>mixed</type><parameter role="reference">variable</parameter></methodparam>
<methodparam choice="opt"><type>int</type><parameter>type</parameter></methodparam>
</methodsynopsis>
<para>
<function>oci_define_by_name</function> defines PHP variables for fetches
of SQL-Columns. Take into consideration that Oracle uses ALL-UPPERCASE column names,
whereby in your select you can also use lowercase.
<function>oci_define_by_name</function> expects
the <parameter>column_name</parameter> to be in uppercase. If you
define a variable that doesn't exists in your select statement, no
error will be issued.
</para>
<para>
If you need to define an abstract datatype (LOB/ROWID/BFILE) you
must allocate it first using
<function>oci_new_descriptor</function>. See also the
<function>oci_bind_by_name</function> function.
</para>
<example>
<title><function>oci_define_by_name</function> example</title>
<programlisting role="php">
<!-- $Revision: 1.6 $ -->
<refentry id="function.oci-define-by-name">
<refnamediv>
<refname>oci_define_by_name</refname>
<refpurpose>Uses a PHP variable for the define-step during a SELECT</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>bool</type><methodname>oci_define_by_name</methodname>
<methodparam><type>resource</type><parameter>statement</parameter></methodparam>
<methodparam><type>string</type><parameter>column_name</parameter></methodparam>
<methodparam><type>mixed</type><parameter role="reference">variable</parameter></methodparam>
<methodparam choice="opt"><type>int</type><parameter>type</parameter></methodparam>
</methodsynopsis>
<para>
<function>oci_define_by_name</function> defines PHP variables for fetches
of SQL-Columns. Take into consideration that Oracle uses ALL-UPPERCASE column names,
whereby in your select you can also use lowercase.
<function>oci_define_by_name</function> expects
the <parameter>column_name</parameter> to be in uppercase. If you
define a variable that doesn't exists in your select statement, no
error will be issued.
</para>
<para>
If you need to define an abstract datatype (LOB/ROWID/BFILE) you
must allocate it first using
<function>oci_new_descriptor</function>. See also the
<function>oci_bind_by_name</function> function.
</para>
<example>
<title><function>oci_define_by_name</function> example</title>
<programlisting role="php">
<![CDATA[
<?php
/* oci_define_by_name example - thies at thieso dot net (980219) */
@ -58,18 +56,18 @@ oci_free_statement($stmt);
oci_close($conn);
?>
]]>
</programlisting>
</example>
<note>
<para>
In PHP versions before 5.0.0 you must use <function>ocidefinebyname</function> instead.
This name still can be used, it was left as alias of
<function>oci_define_by_name</function> for downwards compatability.
This, however, is deprecated and not recommended.
</para>
</note>
</refsect1>
</refentry>
</programlisting>
</example>
<note>
<para>
In PHP versions before 5.0.0 you must use <function>ocidefinebyname</function> instead.
This name still can be used, it was left as alias of
<function>oci_define_by_name</function> for downwards compatability.
This, however, is deprecated and not recommended.
</para>
</note>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:

View file

@ -1,38 +1,38 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.6 $ -->
<refentry id="function.oci-error">
<refnamediv>
<refname>oci_error</refname>
<refpurpose>Returns the last error found</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>array</type><methodname>oci_error</methodname>
<methodparam choice="opt"><type>resource</type><parameter>source</parameter></methodparam>
</methodsynopsis>
<para>
For most errors, the parameter is the most appropriate resource
handle. For connection errors with <function>oci_connect</function>,
<function>oci_new_connect</function> or <function>oci_pconnect</function>,
do not pass a parameter. If no error is found, <function>oci_error</function>
returns &false;. <function>oci_error</function> returns the error as an
associative array. In this array, <literal>code</literal>
consists the oracle error code and <literal>message</literal>
the oracle error string.
</para>
<note>
<title>As of PHP 4.3</title>
<para>
<literal>offset</literal> and <literal>sqltext</literal> will
also be included in the return array to indicate the location
of the error and the original SQL text which caused it.
</para>
</note>
<para>
<example>
<title>Displaying the Oracle error message after a connection error</title>
<programlisting role="php">
<!-- $Revision: 1.7 $ -->
<refentry id="function.oci-error">
<refnamediv>
<refname>oci_error</refname>
<refpurpose>Returns the last error found</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>array</type><methodname>oci_error</methodname>
<methodparam choice="opt"><type>resource</type><parameter>source</parameter></methodparam>
</methodsynopsis>
<para>
For most errors, the parameter is the most appropriate resource
handle. For connection errors with <function>oci_connect</function>,
<function>oci_new_connect</function> or <function>oci_pconnect</function>,
do not pass a parameter. If no error is found, <function>oci_error</function>
returns &false;. <function>oci_error</function> returns the error as an
associative array. In this array, <literal>code</literal>
consists the oracle error code and <literal>message</literal>
the oracle error string.
</para>
<note>
<title>As of PHP 4.3</title>
<para>
<literal>offset</literal> and <literal>sqltext</literal> will
also be included in the return array to indicate the location
of the error and the original SQL text which caused it.
</para>
</note>
<para>
<example>
<title>Displaying the Oracle error message after a connection error</title>
<programlisting role="php">
<![CDATA[
$conn = @oci_connect("scott", "tiger", "mydb");
if (!$conn) {
@ -40,13 +40,13 @@ if (!$conn) {
echo htmlentities($e['message']);
}
]]>
</programlisting>
</example>
</para>
<para>
<example>
<title>Displaying the Oracle error message after a parsing error</title>
<programlisting role="php">
</programlisting>
</example>
</para>
<para>
<example>
<title>Displaying the Oracle error message after a parsing error</title>
<programlisting role="php">
<![CDATA[
$stmt = @oci_parse($conn, "select ' from dual"); // note mismatched quote
if (!$stmt) {
@ -54,14 +54,14 @@ if (!$stmt) {
echo htmlentities($e['message']);
}
]]>
</programlisting>
</example>
</para>
<para>
<example>
<title>Displaying the Oracle error message and problematic statement
after an execution error</title>
<programlisting role="php">
</programlisting>
</example>
</para>
<para>
<example>
<title>Displaying the Oracle error message and problematic statement
after an execution error</title>
<programlisting role="php">
<![CDATA[
$r = oci_execute($stmt);
if (!$r) {
@ -71,21 +71,21 @@ if (!$r) {
echo htmlentities($e['sqltext']);
printf("\n%".($e['offset']+1)."s", "^");
echo "</pre>";
}
}
]]>
</programlisting>
</example>
</para>
<note>
<para>
In PHP versions before 5.0.0 you must use <function>ocierror</function> instead.
This name still can be used, it was left as alias of
<function>oci_error</function> for downwards compatability.
This, however, is deprecated and not recommended.
</para>
</note>
</refsect1>
</refentry>
</programlisting>
</example>
</para>
<note>
<para>
In PHP versions before 5.0.0 you must use <function>ocierror</function> instead.
This name still can be used, it was left as alias of
<function>oci_error</function> for downwards compatability.
This, however, is deprecated and not recommended.
</para>
</note>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:

View file

@ -1,46 +1,46 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.3 $ -->
<refentry id="function.oci-execute">
<refnamediv>
<refname>oci_execute</refname>
<refpurpose>Executes a statement</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>bool</type><methodname>oci_execute</methodname>
<methodparam><type>resource</type><parameter>stmt</parameter></methodparam>
<methodparam choice="opt"><type>int</type><parameter>mode</parameter></methodparam>
</methodsynopsis>
<para>
<function>oci_execute</function> executes a previously parsed
statement (see <function>oci_parse</function>). The optional
<parameter>mode</parameter> allows you to specify the
execution mode (default is <constant>OCI_COMMIT_ON_SUCCESS</constant>).
If you don't want statements to be committed automatically,
you should specify <constant>OCI_DEFAULT</constant> as your
<parameter>mode</parameter>.
</para>
<para>
When using <constant>OCI_DEFAULT</constant> mode, you're creating a
transaction. Transactions are automatically rolled back when you close
the connection, or when the script ends, whichever is soonest. You
need to explicitly call <function>oci_commit</function> to commit
the transaction, or <function>oci_rollback</function> to abort it.
</para>
<para>
&return.success;
</para>
<note>
<para>
In PHP versions before 5.0.0 you must use <function>ociexecute</function> instead.
This name still can be used, it was left as alias of
<function>oci_execute</function> for downwards compatability.
This, however, is deprecated and not recommended.
</para>
</note>
</refsect1>
</refentry>
<!-- $Revision: 1.4 $ -->
<refentry id="function.oci-execute">
<refnamediv>
<refname>oci_execute</refname>
<refpurpose>Executes a statement</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>bool</type><methodname>oci_execute</methodname>
<methodparam><type>resource</type><parameter>stmt</parameter></methodparam>
<methodparam choice="opt"><type>int</type><parameter>mode</parameter></methodparam>
</methodsynopsis>
<para>
<function>oci_execute</function> executes a previously parsed
statement (see <function>oci_parse</function>). The optional
<parameter>mode</parameter> allows you to specify the
execution mode (default is <constant>OCI_COMMIT_ON_SUCCESS</constant>).
If you don't want statements to be committed automatically,
you should specify <constant>OCI_DEFAULT</constant> as your
<parameter>mode</parameter>.
</para>
<para>
When using <constant>OCI_DEFAULT</constant> mode, you're creating a
transaction. Transactions are automatically rolled back when you close
the connection, or when the script ends, whichever is soonest. You
need to explicitly call <function>oci_commit</function> to commit
the transaction, or <function>oci_rollback</function> to abort it.
</para>
<para>
&return.success;
</para>
<note>
<para>
In PHP versions before 5.0.0 you must use <function>ociexecute</function> instead.
This name still can be used, it was left as alias of
<function>oci_execute</function> for downwards compatability.
This, however, is deprecated and not recommended.
</para>
</note>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:

View file

@ -1,54 +1,54 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.7 $ -->
<refentry id="function.oci-fetch-all">
<refnamediv>
<refname>oci_fetch_all</refname>
<refpurpose>Fetches all rows of result data into an array</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>int</type><methodname>oci_fetch_all</methodname>
<methodparam><type>resource</type><parameter>statement</parameter></methodparam>
<methodparam><type>array</type><parameter role="reference">output</parameter></methodparam>
<methodparam choice="opt"><type>int</type><parameter>skip</parameter></methodparam>
<methodparam choice="opt"><type>int</type><parameter>maxrows</parameter></methodparam>
<methodparam choice="opt"><type>int</type><parameter>flags</parameter></methodparam>
</methodsynopsis>
<para>
<function>oci_fetch_all</function> fetches all the rows from a
result into a user-defined array.
<function>oci_fetch_all</function> returns the number of rows
fetched or &false; in case of an error. <parameter>skip</parameter>
is the number of initial rows to ignore when fetching the result
(default value of 0, to start at the first line).
<parameter>maxrows</parameter> is the number of
rows to read, starting at the <parameter>skip</parameter>th row
(default to -1, meaning all the rows).
</para>
&database.fetch-null;
<para>
Parameter <parameter>flags</parameter> can be any combination of
the following:
<simplelist>
<member>
<constant>OCI_FETCHSTATEMENT_BY_ROW</constant>
</member>
<member>
<constant>OCI_FETCHSTATEMENT_BY_COLUMN</constant> (default value)
</member>
<member>
<constant>OCI_NUM</constant>
</member>
<member>
<constant>OCI_ASSOC</constant>
</member>
</simplelist>
</para>
<para>
<example>
<title><function>oci_fetch_all</function> example</title>
<programlisting role="php">
<!-- $Revision: 1.8 $ -->
<refentry id="function.oci-fetch-all">
<refnamediv>
<refname>oci_fetch_all</refname>
<refpurpose>Fetches all rows of result data into an array</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>int</type><methodname>oci_fetch_all</methodname>
<methodparam><type>resource</type><parameter>statement</parameter></methodparam>
<methodparam><type>array</type><parameter role="reference">output</parameter></methodparam>
<methodparam choice="opt"><type>int</type><parameter>skip</parameter></methodparam>
<methodparam choice="opt"><type>int</type><parameter>maxrows</parameter></methodparam>
<methodparam choice="opt"><type>int</type><parameter>flags</parameter></methodparam>
</methodsynopsis>
<para>
<function>oci_fetch_all</function> fetches all the rows from a
result into a user-defined array.
<function>oci_fetch_all</function> returns the number of rows
fetched or &false; in case of an error. <parameter>skip</parameter>
is the number of initial rows to ignore when fetching the result
(default value of 0, to start at the first line).
<parameter>maxrows</parameter> is the number of
rows to read, starting at the <parameter>skip</parameter>th row
(default to -1, meaning all the rows).
</para>
&database.fetch-null;
<para>
Parameter <parameter>flags</parameter> can be any combination of
the following:
<simplelist>
<member>
<constant>OCI_FETCHSTATEMENT_BY_ROW</constant>
</member>
<member>
<constant>OCI_FETCHSTATEMENT_BY_COLUMN</constant> (default value)
</member>
<member>
<constant>OCI_NUM</constant>
</member>
<member>
<constant>OCI_ASSOC</constant>
</member>
</simplelist>
</para>
<para>
<example>
<title><function>oci_fetch_all</function> example</title>
<programlisting role="php">
<![CDATA[
<?php
/* oci_fetch_all example mbritton at verinet dot com (990624) */
@ -67,7 +67,7 @@ if ($nrows > 0) {
echo "<th>$key</th>\n";
}
echo "</tr>\n";
for ($i = 0; $i < $nrows; $i++) {
echo "<tr>\n";
foreach ($results as $data) {
@ -78,30 +78,30 @@ if ($nrows > 0) {
echo "</table>\n";
} else {
echo "No data found<br />\n";
}
}
echo "$nrows Records Selected<br />\n";
oci_free_statement($stmt);
oci_close($conn);
?>
]]>
</programlisting>
</example>
</para>
&oci.datatypes;
<para>
<function>oci_fetch_all</function> returns &false; in case of error.
</para>
<note>
<para>
In PHP versions before 5.0.0 you must use <function>ocifetchstatement</function> instead.
This name still can be used, it was left as alias of
<function>oci_fetch_all</function> for downwards compatability.
This, however, is deprecated and not recommended.
</para>
</note>
</refsect1>
</refentry>
</programlisting>
</example>
</para>
&oci.datatypes;
<para>
<function>oci_fetch_all</function> returns &false; in case of error.
</para>
<note>
<para>
In PHP versions before 5.0.0 you must use <function>ocifetchstatement</function> instead.
This name still can be used, it was left as alias of
<function>oci_fetch_all</function> for downwards compatability.
This, however, is deprecated and not recommended.
</para>
</note>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:

View file

@ -1,70 +1,70 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.7 $ -->
<refentry id="function.oci-fetch-array">
<refnamediv>
<refname>oci_fetch_array</refname>
<refpurpose>Returns the next row from the result data as an associative or
numeric array, or both
</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>array</type><methodname>oci_fetch_array</methodname>
<methodparam><type>resource</type><parameter>statement</parameter></methodparam>
<methodparam choice="opt"><type>int</type><parameter>mode</parameter></methodparam>
</methodsynopsis>
<para>
Returns an array, which corresponds to the next result row or &false; in
case of error or there are no more rows in the result.
</para>
<para>
<function>oci_fetch_array</function> returns an array with both
associative and numeric indices.
</para>
&database.fetch-null;
<para>
An optional second parameter can be any combination of the following
constants:
<simplelist>
<member>
<constant>OCI_BOTH</constant> - return an array with both associative
and numeric indices (the same as <constant>OCI_ASSOC</constant>
+ <constant>OCI_NUM</constant>). This is the default behavior.
</member>
<member>
<constant>OCI_ASSOC</constant> - return an associative array
(as <function>oci_fetch_assoc</function> works).
</member>
<member>
<constant>OCI_NUM</constant> - return a numeric array,
(as <function>oci_fetch_row</function> works).
</member>
<member>
<constant>OCI_RETURN_NULLS</constant> - create empty elements
for the &null; fields.
</member>
<member>
<constant>OCI_RETURN_LOBS</constant> - return the value of a LOB
of the descriptor.
</member>
</simplelist>
Default <parameter>mode</parameter> is <constant>OCI_BOTH</constant>.
</para>
<para>
It should be mentioned here, that <function>oci_fetch_array</function>
is <emphasis>insignificantly</emphasis> slower, than
<function>oci_fetch_row</function>, but much more handy.
</para>
<note>
<simpara>
Oracle returns all field names in uppercase and associative indices in the result array will be uppercased too.
</simpara>
</note>
<para>
<example>
<title><function>oci_fetch_array</function> with <constant>OCI_BOTH</constant> example</title>
<programlisting role="php">
<!-- $Revision: 1.8 $ -->
<refentry id="function.oci-fetch-array">
<refnamediv>
<refname>oci_fetch_array</refname>
<refpurpose>Returns the next row from the result data as an associative or
numeric array, or both
</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>array</type><methodname>oci_fetch_array</methodname>
<methodparam><type>resource</type><parameter>statement</parameter></methodparam>
<methodparam choice="opt"><type>int</type><parameter>mode</parameter></methodparam>
</methodsynopsis>
<para>
Returns an array, which corresponds to the next result row or &false; in
case of error or there are no more rows in the result.
</para>
<para>
<function>oci_fetch_array</function> returns an array with both
associative and numeric indices.
</para>
&database.fetch-null;
<para>
An optional second parameter can be any combination of the following
constants:
<simplelist>
<member>
<constant>OCI_BOTH</constant> - return an array with both associative
and numeric indices (the same as <constant>OCI_ASSOC</constant>
+ <constant>OCI_NUM</constant>). This is the default behavior.
</member>
<member>
<constant>OCI_ASSOC</constant> - return an associative array
(as <function>oci_fetch_assoc</function> works).
</member>
<member>
<constant>OCI_NUM</constant> - return a numeric array,
(as <function>oci_fetch_row</function> works).
</member>
<member>
<constant>OCI_RETURN_NULLS</constant> - create empty elements
for the &null; fields.
</member>
<member>
<constant>OCI_RETURN_LOBS</constant> - return the value of a LOB
of the descriptor.
</member>
</simplelist>
Default <parameter>mode</parameter> is <constant>OCI_BOTH</constant>.
</para>
<para>
It should be mentioned here, that <function>oci_fetch_array</function>
is <emphasis>insignificantly</emphasis> slower, than
<function>oci_fetch_row</function>, but much more handy.
</para>
<note>
<simpara>
Oracle returns all field names in uppercase and associative indices in the result array will be uppercased too.
</simpara>
</note>
<para>
<example>
<title><function>oci_fetch_array</function> with <constant>OCI_BOTH</constant> example</title>
<programlisting role="php">
<![CDATA[
<?php
$connection = oci_connect("apelsin", "kanistra");
@ -80,14 +80,14 @@ while ($row = oci_fetch_array ($statement, OCI_BOTH)) {
}
?>
]]>
</programlisting>
</example>
</para>
<para>
<example>
<title><function>oci_fetch_array</function> with
<constant>OCI_NUM</constant> example</title>
<programlisting role="php">
</programlisting>
</example>
</para>
<para>
<example>
<title><function>oci_fetch_array</function> with
<constant>OCI_NUM</constant> example</title>
<programlisting role="php">
<![CDATA[
<?php
$connection = oci_connect("user", "password");
@ -104,14 +104,14 @@ while ($row = oci_fetch_array ($statement, OCI_NUM)) {
}
?>
]]>
</programlisting>
</example>
</para>
<para>
<example>
<title><function>oci_fetch_array</function> with
<constant>OCI_ASSOC</constant> example</title>
<programlisting role="php">
</programlisting>
</example>
</para>
<para>
<example>
<title><function>oci_fetch_array</function> with
<constant>OCI_ASSOC</constant> example</title>
<programlisting role="php">
<![CDATA[
<?php
$connection = oci_connect("user", "password");
@ -128,14 +128,14 @@ while ($row = oci_fetch_array ($statement, OCI_ASSOC)) {
}
?>
]]>
</programlisting>
</example>
</para>
<para>
<example>
<title><function>oci_fetch_array</function> with
<constant>OCI_RETURN_LOBS</constant> example</title>
<programlisting role="php">
</programlisting>
</example>
</para>
<para>
<example>
<title><function>oci_fetch_array</function> with
<constant>OCI_RETURN_LOBS</constant> example</title>
<programlisting role="php">
<![CDATA[
<?php
$connection = oci_connect("user", "password");
@ -152,18 +152,18 @@ while ($row = oci_fetch_array ($statement, (OCI_NUM+OCI_RETURN_LOBS))) {
}
?>
]]>
</programlisting>
</example>
</para>
&oci.datatypes;
<para>
See also <function>oci_fetch_assoc</function>,
<function>oci_fetch_object</function>,
<function>oci_fetch_row</function> and
<function>oci_fetch_all</function>.
</para>
</refsect1>
</refentry>
</programlisting>
</example>
</para>
&oci.datatypes;
<para>
See also <function>oci_fetch_assoc</function>,
<function>oci_fetch_object</function>,
<function>oci_fetch_row</function> and
<function>oci_fetch_all</function>.
</para>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:

View file

@ -1,41 +1,41 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.4 $ -->
<refentry id="function.oci-fetch-assoc">
<refnamediv>
<refname>oci_fetch_assoc</refname>
<refpurpose>Returns the next row from the result data as an associative array</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>array</type><methodname>oci_fetch_assoc</methodname>
<methodparam><type>resource</type><parameter>statement</parameter></methodparam>
</methodsynopsis>
<para>
<function>oci_fetch_assoc</function> returns the next row from the result
data as an associative array (identical to
<function>oci_fetch_array</function> call with
<constant>OCI_ASSOC</constant> flag).
</para>
&database.fetch-null;
<para>
A subsequent call to <function>oci_fetch_assoc</function> will return
the next row or &false; if there are no more rows.
</para>
<note>
<simpara>
Oracle returns all field names in uppercase and associative indices in the result array will be uppercased too.
</simpara>
</note>
&oci.datatypes;
<para>
See also <function>oci_fetch_array</function>,
<function>oci_fetch_object</function>,
<function>oci_fetch_row</function> and
<function>oci_fetch_all</function>.
</para>
</refsect1>
</refentry>
<!-- $Revision: 1.5 $ -->
<refentry id="function.oci-fetch-assoc">
<refnamediv>
<refname>oci_fetch_assoc</refname>
<refpurpose>Returns the next row from the result data as an associative array</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>array</type><methodname>oci_fetch_assoc</methodname>
<methodparam><type>resource</type><parameter>statement</parameter></methodparam>
</methodsynopsis>
<para>
<function>oci_fetch_assoc</function> returns the next row from the result
data as an associative array (identical to
<function>oci_fetch_array</function> call with
<constant>OCI_ASSOC</constant> flag).
</para>
&database.fetch-null;
<para>
A subsequent call to <function>oci_fetch_assoc</function> will return
the next row or &false; if there are no more rows.
</para>
<note>
<simpara>
Oracle returns all field names in uppercase and associative indices in the result array will be uppercased too.
</simpara>
</note>
&oci.datatypes;
<para>
See also <function>oci_fetch_array</function>,
<function>oci_fetch_object</function>,
<function>oci_fetch_row</function> and
<function>oci_fetch_all</function>.
</para>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:

View file

@ -1,39 +1,39 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.5 $ -->
<refentry id="function.oci-fetch-object">
<refnamediv>
<refname>oci_fetch_object</refname>
<refpurpose>Returns the next row from the result data as an object</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>object</type><methodname>oci_fetch_object</methodname>
<methodparam><type>resource</type><parameter>statement</parameter></methodparam>
</methodsynopsis>
<para>
<function>oci_fetch_object</function> returns the next row from the result data as
an object, which attributes correspond to fields in statement.
</para>
&database.fetch-null;
<para>
Subsequent calls to <function>oci_fetch_object</function> will return the
next row from the result or &false; if there are no more rows.
</para>
<note>
<simpara>
Oracle returns all field names in uppercase and attributes' names in the result object will be in uppercase as well.
</simpara>
</note>
&oci.datatypes;
<para>
See also <function>oci_fetch_array</function>,
<function>oci_fetch_assoc</function>,
<function>oci_fetch_row</function> and
<function>oci_fetch_all</function>.
</para>
</refsect1>
</refentry>
<!-- $Revision: 1.6 $ -->
<refentry id="function.oci-fetch-object">
<refnamediv>
<refname>oci_fetch_object</refname>
<refpurpose>Returns the next row from the result data as an object</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>object</type><methodname>oci_fetch_object</methodname>
<methodparam><type>resource</type><parameter>statement</parameter></methodparam>
</methodsynopsis>
<para>
<function>oci_fetch_object</function> returns the next row from the result data as
an object, which attributes correspond to fields in statement.
</para>
&database.fetch-null;
<para>
Subsequent calls to <function>oci_fetch_object</function> will return the
next row from the result or &false; if there are no more rows.
</para>
<note>
<simpara>
Oracle returns all field names in uppercase and attributes' names in the result object will be in uppercase as well.
</simpara>
</note>
&oci.datatypes;
<para>
See also <function>oci_fetch_array</function>,
<function>oci_fetch_assoc</function>,
<function>oci_fetch_row</function> and
<function>oci_fetch_all</function>.
</para>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:

View file

@ -1,36 +1,36 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.5 $ -->
<refentry id="function.oci-fetch-row">
<refnamediv>
<refname>oci_fetch_row</refname>
<refpurpose>Returns the next row from the result data as a numeric array</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>array</type><methodname>oci_fetch_row</methodname>
<methodparam><type>resource</type><parameter>statement</parameter></methodparam>
</methodsynopsis>
<para>
Calling <function>oci_fetch_row</function> is identical to
<function>oci_fetch_array</function> with
<constant>OCI_NUM</constant> flag and returns the next row from the result
data as a numeric array.
</para>
&database.fetch-null;
<para>
Subsequent calls to <function>oci_fetch_row</function> will return the
next row from the result data or &false; if there are no more rows.
</para>
&oci.datatypes;
<para>
See also <function>oci_fetch_array</function>,
<function>oci_fetch_object</function>,
<function>oci_fetch_assoc</function> and
<function>oci_fetch_all</function>.
</para>
</refsect1>
</refentry>
<!-- $Revision: 1.6 $ -->
<refentry id="function.oci-fetch-row">
<refnamediv>
<refname>oci_fetch_row</refname>
<refpurpose>Returns the next row from the result data as a numeric array</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>array</type><methodname>oci_fetch_row</methodname>
<methodparam><type>resource</type><parameter>statement</parameter></methodparam>
</methodsynopsis>
<para>
Calling <function>oci_fetch_row</function> is identical to
<function>oci_fetch_array</function> with
<constant>OCI_NUM</constant> flag and returns the next row from the result
data as a numeric array.
</para>
&database.fetch-null;
<para>
Subsequent calls to <function>oci_fetch_row</function> will return the
next row from the result data or &false; if there are no more rows.
</para>
&oci.datatypes;
<para>
See also <function>oci_fetch_array</function>,
<function>oci_fetch_object</function>,
<function>oci_fetch_assoc</function> and
<function>oci_fetch_all</function>.
</para>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:

View file

@ -1,34 +1,34 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.3 $ -->
<refentry id="function.oci-fetch">
<refnamediv>
<refname>oci_fetch</refname>
<refpurpose>Fetches the next row into result-buffer</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>bool</type><methodname>oci_fetch</methodname>
<methodparam><type>resource</type><parameter>statement</parameter></methodparam>
</methodsynopsis>
<para>
<function>oci_fetch</function> fetches the next row (for SELECT
statements) into the internal result-buffer.
</para>
<para>
&return.success;
</para>
&oci.datatypes;
<note>
<para>
In PHP versions before 5.0.0 you must use <function>ocifetch</function> instead.
This name still can be used, it was left as alias of
<function>oci_fetch</function> for downwards compatability.
This, however, is deprecated and not recommended.
</para>
</note>
</refsect1>
</refentry>
<!-- $Revision: 1.4 $ -->
<refentry id="function.oci-fetch">
<refnamediv>
<refname>oci_fetch</refname>
<refpurpose>Fetches the next row into result-buffer</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>bool</type><methodname>oci_fetch</methodname>
<methodparam><type>resource</type><parameter>statement</parameter></methodparam>
</methodsynopsis>
<para>
<function>oci_fetch</function> fetches the next row (for SELECT
statements) into the internal result-buffer.
</para>
<para>
&return.success;
</para>
&oci.datatypes;
<note>
<para>
In PHP versions before 5.0.0 you must use <function>ocifetch</function> instead.
This name still can be used, it was left as alias of
<function>oci_fetch</function> for downwards compatability.
This, however, is deprecated and not recommended.
</para>
</note>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:

View file

@ -1,33 +1,33 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.2 $ -->
<refentry id="function.oci-field-is-null">
<refnamediv>
<refname>oci_field_is_null</refname>
<refpurpose>Checks if the field is &null;</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>bool</type><methodname>oci_field_is_null</methodname>
<methodparam><type>resource</type><parameter>stmt</parameter></methodparam>
<methodparam><type>mixed</type><parameter>field</parameter></methodparam>
</methodsynopsis>
<para>
<function>oci_field_is_null</function> returns &true; if field
<parameter>field</parameter> from the <parameter>statement</parameter> is
&null;. Parameter <parameter>field</parameter> could be a field's index
or a field's name (uppercased).
</para>
<note>
<para>
In PHP versions before 5.0.0 you must use <function>ocicolumnisnull</function> instead.
This name still can be used, it was left as alias of
<function>oci_field_is_null</function> for downwards compatability.
This, however, is deprecated and not recommended.
</para>
</note>
</refsect1>
</refentry>
<!-- $Revision: 1.3 $ -->
<refentry id="function.oci-field-is-null">
<refnamediv>
<refname>oci_field_is_null</refname>
<refpurpose>Checks if the field is &null;</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>bool</type><methodname>oci_field_is_null</methodname>
<methodparam><type>resource</type><parameter>stmt</parameter></methodparam>
<methodparam><type>mixed</type><parameter>field</parameter></methodparam>
</methodsynopsis>
<para>
<function>oci_field_is_null</function> returns &true; if field
<parameter>field</parameter> from the <parameter>statement</parameter> is
&null;. Parameter <parameter>field</parameter> could be a field's index
or a field's name (uppercased).
</para>
<note>
<para>
In PHP versions before 5.0.0 you must use <function>ocicolumnisnull</function> instead.
This name still can be used, it was left as alias of
<function>oci_field_is_null</function> for downwards compatability.
This, however, is deprecated and not recommended.
</para>
</note>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:

View file

@ -1,75 +1,75 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.4 $ -->
<refentry id="function.oci-field-name">
<refnamediv>
<refname>oci_field_name</refname>
<refpurpose>Returns the name of a field from the statement</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>string</type><methodname>oci_field_name</methodname>
<methodparam><type>resource</type><parameter>statement</parameter></methodparam>
<methodparam><type>int</type><parameter>field</parameter></methodparam>
</methodsynopsis>
<para>
<function>oci_field_name</function> returns the name of the field
corresponding to the field number (1-based).
</para>
<para>
<example>
<title><function>oci_field_name</function> example</title>
<programlisting role="php">
<!-- $Revision: 1.5 $ -->
<refentry id="function.oci-field-name">
<refnamediv>
<refname>oci_field_name</refname>
<refpurpose>Returns the name of a field from the statement</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>string</type><methodname>oci_field_name</methodname>
<methodparam><type>resource</type><parameter>statement</parameter></methodparam>
<methodparam><type>int</type><parameter>field</parameter></methodparam>
</methodsynopsis>
<para>
<function>oci_field_name</function> returns the name of the field
corresponding to the field number (1-based).
</para>
<para>
<example>
<title><function>oci_field_name</function> example</title>
<programlisting role="php">
<![CDATA[
<?php
<?php
$conn = oci_connect("scott", "tiger");
$stmt = oci_parse($conn, "SELECT * FROM emp");
oci_execute($stmt);
echo "<table border=\"1\">";
echo "<tr>";
echo "<th>Name</th>";
echo "<th>Type</th>";
echo "<th>Length</th>";
echo "</tr>";
$ncols = oci_num_fields($stmt);
for ($i = 1; $i <= $ncols; $i++) {
$column_name = oci_field_name($stmt, $i);
$column_type = oci_field_type($stmt, $i);
$column_size = oci_field_size($stmt, $i);
echo "<tr>";
echo "<td>$column_name</td>";
echo "<td>$column_type</td>";
echo "<td>$column_size</td>";
echo "</tr>";
}
echo "</table>\n";
oci_free_statement($stmt);
oci_close($conn);
?>
echo "</table>\n";
oci_free_statement($stmt);
oci_close($conn);
?>
]]>
</programlisting>
</example>
</para>
<note>
<para>
In PHP versions before 5.0.0 you must use <function>ocicolumnname</function> instead.
This name still can be used, it was left as alias of
<function>oci_field_name</function> for downwards compatability.
This, however, is deprecated and not recommended.
</para>
</note>
<simpara>
See also <function>oci_num_fields</function>,
<function>oci_field_type</function>,
and <function>oci_field_size</function>.
</simpara>
</refsect1>
</refentry>
</programlisting>
</example>
</para>
<note>
<para>
In PHP versions before 5.0.0 you must use <function>ocicolumnname</function> instead.
This name still can be used, it was left as alias of
<function>oci_field_name</function> for downwards compatability.
This, however, is deprecated and not recommended.
</para>
</note>
<simpara>
See also <function>oci_num_fields</function>,
<function>oci_field_type</function>,
and <function>oci_field_size</function>.
</simpara>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:

View file

@ -1,40 +1,40 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.4 $ -->
<refentry id="function.oci-field-precision">
<refnamediv>
<refname>oci_field_precision</refname>
<refpurpose>Tell the precision of a field</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>int</type><methodname>oci_field_precision</methodname>
<methodparam><type>resource</type><parameter>statement</parameter></methodparam>
<methodparam><type>int</type><parameter>field</parameter></methodparam>
</methodsynopsis>
<para>
Returns precision of the field with <parameter>field</parameter> index
(1-based).
</para>
<para>
For FLOAT columns, precision is nonzero and scale is -127.
If precision is 0, then column is NUMBER. Else it's
NUMBER(precision, scale).
</para>
<note>
<para>
In PHP versions before 5.0.0 you must use <function>ocicolumnprecision</function> instead.
This name still can be used, it was left as alias of
<function>oci_field_precision</function> for downwards compatability.
This, however, is deprecated and not recommended.
</para>
</note>
<para>
See also <function>oci_field_scale</function> and
<function>oci_field_type</function>.
</para>
</refsect1>
</refentry>
<!-- $Revision: 1.5 $ -->
<refentry id="function.oci-field-precision">
<refnamediv>
<refname>oci_field_precision</refname>
<refpurpose>Tell the precision of a field</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>int</type><methodname>oci_field_precision</methodname>
<methodparam><type>resource</type><parameter>statement</parameter></methodparam>
<methodparam><type>int</type><parameter>field</parameter></methodparam>
</methodsynopsis>
<para>
Returns precision of the field with <parameter>field</parameter> index
(1-based).
</para>
<para>
For FLOAT columns, precision is nonzero and scale is -127.
If precision is 0, then column is NUMBER. Else it's
NUMBER(precision, scale).
</para>
<note>
<para>
In PHP versions before 5.0.0 you must use <function>ocicolumnprecision</function> instead.
This name still can be used, it was left as alias of
<function>oci_field_precision</function> for downwards compatability.
This, however, is deprecated and not recommended.
</para>
</note>
<para>
See also <function>oci_field_scale</function> and
<function>oci_field_type</function>.
</para>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:

View file

@ -1,40 +1,40 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.4 $ -->
<refentry id="function.oci-field-scale">
<refnamediv>
<refname>oci_field_scale</refname>
<refpurpose>Tell the scale of the field</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>int</type><methodname>oci_field_scale</methodname>
<methodparam><type>resource</type><parameter>statement</parameter></methodparam>
<methodparam><type>int</type><parameter>field</parameter></methodparam>
</methodsynopsis>
<!-- $Revision: 1.5 $ -->
<refentry id="function.oci-field-scale">
<refnamediv>
<refname>oci_field_scale</refname>
<refpurpose>Tell the scale of the field</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>int</type><methodname>oci_field_scale</methodname>
<methodparam><type>resource</type><parameter>statement</parameter></methodparam>
<methodparam><type>int</type><parameter>field</parameter></methodparam>
</methodsynopsis>
<para>
Returns scale of the column with <parameter>field</parameter> index
(1-based) or &false; if there is no such field.
</para>
<para>
For FLOAT columns, precision is nonzero and scale is -127.
If precision is 0, then column is NUMBER. Else it's
NUMBER(precision, scale).
</para>
<note>
<para>
Returns scale of the column with <parameter>field</parameter> index
(1-based) or &false; if there is no such field.
In PHP versions before 5.0.0 you must use <function>ocicolumnscale</function> instead.
This name still can be used, it was left as alias of
<function>oci_field_scale</function> for downwards compatability.
This, however, is deprecated and not recommended.
</para>
<para>
For FLOAT columns, precision is nonzero and scale is -127.
If precision is 0, then column is NUMBER. Else it's
NUMBER(precision, scale).
</para>
<note>
<para>
In PHP versions before 5.0.0 you must use <function>ocicolumnscale</function> instead.
This name still can be used, it was left as alias of
<function>oci_field_scale</function> for downwards compatability.
This, however, is deprecated and not recommended.
</para>
</note>
<para>
See also <function>oci_field_precision</function> and
<function>oci_field_type</function>.
</para>
</refsect1>
</refentry>
</note>
<para>
See also <function>oci_field_precision</function> and
<function>oci_field_type</function>.
</para>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:

View file

@ -1,41 +1,41 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.6 $ -->
<refentry id="function.oci-field-size">
<refnamediv>
<refname>oci_field_size</refname>
<refpurpose>Returns field's size</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>int</type><methodname>oci_field_size</methodname>
<methodparam><type>resource</type><parameter>stmt</parameter></methodparam>
<methodparam><type>mixed</type><parameter>field</parameter></methodparam>
</methodsynopsis>
<para>
<function>oci_field_size</function> returns the size of a field in
bytes. Value of <parameter>field</parameter> parameter can be the field's
index (1-based) or it's name.
</para>
<para>
<example>
<title><function>oci_field_size</function>example</title>
<programlisting role="php">
<!-- $Revision: 1.7 $ -->
<refentry id="function.oci-field-size">
<refnamediv>
<refname>oci_field_size</refname>
<refpurpose>Returns field's size</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>int</type><methodname>oci_field_size</methodname>
<methodparam><type>resource</type><parameter>stmt</parameter></methodparam>
<methodparam><type>mixed</type><parameter>field</parameter></methodparam>
</methodsynopsis>
<para>
<function>oci_field_size</function> returns the size of a field in
bytes. Value of <parameter>field</parameter> parameter can be the field's
index (1-based) or it's name.
</para>
<para>
<example>
<title><function>oci_field_size</function>example</title>
<programlisting role="php">
<![CDATA[
<?php
<?php
$conn = oci_connect("scott", "tiger");
$stmt = oci_parse($conn, "SELECT * FROM emp");
oci_execute($stmt);
echo "<table border=\"1\">";
echo "<tr>";
echo "<th>Name</th>";
echo "<th>Type</th>";
echo "<th>Length</th>";
echo "</tr>";
$ncols = oci_num_fields($stmt);
for ($i = 1; $i <= $ncols; $i++) {
$column_name = oci_field_name($stmt, $i);
$column_type = oci_field_type($stmt, $i);
@ -46,30 +46,30 @@
echo "<td>$column_size</td>";
echo "</tr>";
}
echo "</table>";
oci_free_statement($stmt);
oci_close($conn);
?>
oci_free_statement($stmt);
oci_close($conn);
?>
]]>
</programlisting>
</example>
</para>
<note>
<para>
In PHP versions before 5.0.0 you must use <function>ocicolumnsize</function> instead.
This name still can be used, it was left as alias of
<function>oci_field_size</function> for downwards compatability.
This, however, is deprecated and not recommended.
</para>
</note>
<simpara>
See also <function>oci_num_fields</function> and
<function>oci_field_name</function>.
</simpara>
</refsect1>
</refentry>
</programlisting>
</example>
</para>
<note>
<para>
In PHP versions before 5.0.0 you must use <function>ocicolumnsize</function> instead.
This name still can be used, it was left as alias of
<function>oci_field_size</function> for downwards compatability.
This, however, is deprecated and not recommended.
</para>
</note>
<simpara>
See also <function>oci_num_fields</function> and
<function>oci_field_name</function>.
</simpara>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:

View file

@ -1,36 +1,36 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.4 $ -->
<refentry id="function.oci-field-type-raw">
<refnamediv>
<refname>oci_field_type_raw</refname>
<refpurpose>Tell the raw Oracle data type of the field</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>int</type><methodname>oci_field_type_raw</methodname>
<methodparam><type>resource</type><parameter>statement</parameter></methodparam>
<methodparam><type>int</type><parameter>field</parameter></methodparam>
</methodsynopsis>
<para>
<function>oci_field_type_raw</function> returns Oracle's raw data type of the
field.
</para>
<note>
<para>
In PHP versions before 5.0.0 you must use <function>ocicolumntyperaw</function> instead.
This name still can be used, it was left as alias of
<function>oci_field_type_raw</function> for downwards compatability.
This, however, is deprecated and not recommended.
</para>
</note>
<para>
However, if you want to get field's type, then
<function>oci_field_type</function> will suit you better. See
<function>oci_field_type</function> for additional information.
</para>
</refsect1>
</refentry>
<!-- $Revision: 1.5 $ -->
<refentry id="function.oci-field-type-raw">
<refnamediv>
<refname>oci_field_type_raw</refname>
<refpurpose>Tell the raw Oracle data type of the field</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>int</type><methodname>oci_field_type_raw</methodname>
<methodparam><type>resource</type><parameter>statement</parameter></methodparam>
<methodparam><type>int</type><parameter>field</parameter></methodparam>
</methodsynopsis>
<para>
<function>oci_field_type_raw</function> returns Oracle's raw data type of the
field.
</para>
<note>
<para>
In PHP versions before 5.0.0 you must use <function>ocicolumntyperaw</function> instead.
This name still can be used, it was left as alias of
<function>oci_field_type_raw</function> for downwards compatability.
This, however, is deprecated and not recommended.
</para>
</note>
<para>
However, if you want to get field's type, then
<function>oci_field_type</function> will suit you better. See
<function>oci_field_type</function> for additional information.
</para>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:

View file

@ -1,77 +1,77 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.5 $ -->
<refentry id="function.oci-field-type">
<refnamediv>
<refname>oci_field_type</refname>
<refpurpose>Returns field's data type</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>mixed</type><methodname>oci_field_type</methodname>
<methodparam><type>resource</type><parameter>stmt</parameter></methodparam>
<methodparam><type>int</type><parameter>field</parameter></methodparam>
</methodsynopsis>
<simpara>
<function>oci_field_type</function> returns a field's data type.
Parameter <parameter>field</parameter> is an index of the field in the
statement (1-based).
</simpara>
<para>
<example>
<title><function>oci_field_type</function> example</title>
<programlisting role="php">
<!-- $Revision: 1.6 $ -->
<refentry id="function.oci-field-type">
<refnamediv>
<refname>oci_field_type</refname>
<refpurpose>Returns field's data type</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>mixed</type><methodname>oci_field_type</methodname>
<methodparam><type>resource</type><parameter>stmt</parameter></methodparam>
<methodparam><type>int</type><parameter>field</parameter></methodparam>
</methodsynopsis>
<simpara>
<function>oci_field_type</function> returns a field's data type.
Parameter <parameter>field</parameter> is an index of the field in the
statement (1-based).
</simpara>
<para>
<example>
<title><function>oci_field_type</function> example</title>
<programlisting role="php">
<![CDATA[
<?php
$conn = oci_connect("scott", "tiger");
$stmt = oci_parse($conn, "SELECT * FROM emp");
oci_execute($stmt);
echo "<table border=\"1\">";
<?php
$conn = oci_connect("scott", "tiger");
$stmt = oci_parse($conn, "SELECT * FROM emp");
oci_execute($stmt);
echo "<table border=\"1\">";
echo "<tr>";
echo "<th>Name</th>";
echo "<th>Type</th>";
echo "<th>Length</th>";
echo "</tr>";
$ncols = oci_num_fields($stmt);
for ($i = 1; $i <= $ncols; $i++) {
$column_name = oci_field_name($stmt, $i);
$column_type = oci_field_type($stmt, $i);
$column_size = oci_field_size($stmt, $i);
echo "<tr>";
echo "<th>Name</th>";
echo "<th>Type</th>";
echo "<th>Length</th>";
echo "<td>$column_name</td>";
echo "<td>$column_type</td>";
echo "<td>$column_size</td>";
echo "</tr>";
$ncols = oci_num_fields($stmt);
for ($i = 1; $i <= $ncols; $i++) {
$column_name = oci_field_name($stmt, $i);
$column_type = oci_field_type($stmt, $i);
$column_size = oci_field_size($stmt, $i);
echo "<tr>";
echo "<td>$column_name</td>";
echo "<td>$column_type</td>";
echo "<td>$column_size</td>";
echo "</tr>";
}
echo "</table>\n";
oci_free_statement($stmt);
oci_close($conn);
?>
}
echo "</table>\n";
oci_free_statement($stmt);
oci_close($conn);
?>
]]>
</programlisting>
</example>
</para>
<note>
<para>
In PHP versions before 5.0.0 you must use <function>ocicolumntype</function> instead.
This name still can be used, it was left as alias of
<function>oci_field_type</function> for downwards compatability.
This, however, is deprecated and not recommended.
</para>
</note>
<simpara>
See also <function>oci_num_fields</function>,
<function>oci_field_name</function>,
and <function>oci_field_size</function>.
</simpara>
</refsect1>
</refentry>
</programlisting>
</example>
</para>
<note>
<para>
In PHP versions before 5.0.0 you must use <function>ocicolumntype</function> instead.
This name still can be used, it was left as alias of
<function>oci_field_type</function> for downwards compatability.
This, however, is deprecated and not recommended.
</para>
</note>
<simpara>
See also <function>oci_num_fields</function>,
<function>oci_field_name</function>,
and <function>oci_field_size</function>.
</simpara>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:

View file

@ -1,28 +1,26 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.1 $ -->
<!-- $Revision: 1.2 $ -->
<refentry id="function.oci-free-statement">
<refnamediv>
<refname>oci_free_statement</refname>
<refpurpose>
Frees all resources associated with statement or cursor
</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>bool</type><methodname>oci_free_statement</methodname>
<methodparam><type>resource</type><parameter>statement</parameter></methodparam>
</methodsynopsis>
<para>
<function>oci_free_statement</function> frees resources associated with
Oracle's cursor or statement, which was received from as a result of
<function>oci_parse</function> or obtained from Oracle.
</para>
<para>
&return.success;
</para>
</refsect1>
</refentry>
<refnamediv>
<refname>oci_free_statement</refname>
<refpurpose>Frees all resources associated with statement or cursor</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>bool</type><methodname>oci_free_statement</methodname>
<methodparam><type>resource</type><parameter>statement</parameter></methodparam>
</methodsynopsis>
<para>
<function>oci_free_statement</function> frees resources associated with
Oracle's cursor or statement, which was received from as a result of
<function>oci_parse</function> or obtained from Oracle.
</para>
<para>
&return.success;
</para>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:

View file

@ -1,31 +1,31 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.5 $ -->
<refentry id="function.oci-internal-debug">
<refnamediv>
<refname>oci_internal_debug</refname>
<refpurpose>Enables or disables internal debug output</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>void</type><methodname>oci_internal_debug</methodname>
<methodparam><type>int</type><parameter>onoff</parameter></methodparam>
</methodsynopsis>
<para>
<function>oci_internal_debug</function> enables or disables internal debug
output. Set <parameter>onoff</parameter> to 0 to turn debug
output off or 1 to turn it on.
</para>
<note>
<para>
In PHP versions before 5.0.0 you must use <function>ociinternaldebug</function> instead.
This name still can be used, it was left as alias of
<function>oci_internal_debug</function> for downwards compatability.
This, however, is deprecated and not recommended.
</para>
</note>
</refsect1>
</refentry>
<!-- $Revision: 1.6 $ -->
<refentry id="function.oci-internal-debug">
<refnamediv>
<refname>oci_internal_debug</refname>
<refpurpose>Enables or disables internal debug output</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>void</type><methodname>oci_internal_debug</methodname>
<methodparam><type>int</type><parameter>onoff</parameter></methodparam>
</methodsynopsis>
<para>
<function>oci_internal_debug</function> enables or disables internal debug
output. Set <parameter>onoff</parameter> to 0 to turn debug
output off or 1 to turn it on.
</para>
<note>
<para>
In PHP versions before 5.0.0 you must use <function>ociinternaldebug</function> instead.
This name still can be used, it was left as alias of
<function>oci_internal_debug</function> for downwards compatability.
This, however, is deprecated and not recommended.
</para>
</note>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:

View file

@ -1,32 +1,32 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.5 $ -->
<refentry id="function.oci-lob-copy">
<refnamediv>
<refname>oci_lob_copy</refname>
<refpurpose>Copies large object</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>bool</type><methodname>oci_lob_copy</methodname>
<methodparam><type>OCI-Lob</type><parameter>lob_to</parameter></methodparam>
<methodparam><type>OCI-Lob</type><parameter>lob_from</parameter></methodparam>
<methodparam choice="opt"><type>int</type><parameter>length</parameter></methodparam>
</methodsynopsis>
<para>
Copies a large object or a part of a large object to another large object.
Parameter <parameter>length</parameter> indicates the length of data to
be copied. Old LOB-recipient data will be overwritten.
</para>
<para>
If you need to copy a particular part of a LOB to a particular position of
a LOB, use <function>oci_lob_seek</function> to move LOB internal pointers.
</para>
<para>
&return.success;
</para>
</refsect1>
</refentry>
<!-- $Revision: 1.6 $ -->
<refentry id="function.oci-lob-copy">
<refnamediv>
<refname>oci_lob_copy</refname>
<refpurpose>Copies large object</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>bool</type><methodname>oci_lob_copy</methodname>
<methodparam><type>OCI-Lob</type><parameter>lob_to</parameter></methodparam>
<methodparam><type>OCI-Lob</type><parameter>lob_from</parameter></methodparam>
<methodparam choice="opt"><type>int</type><parameter>length</parameter></methodparam>
</methodsynopsis>
<para>
Copies a large object or a part of a large object to another large object.
Parameter <parameter>length</parameter> indicates the length of data to
be copied. Old LOB-recipient data will be overwritten.
</para>
<para>
If you need to copy a particular part of a LOB to a particular position of
a LOB, use <function>oci_lob_seek</function> to move LOB internal pointers.
</para>
<para>
&return.success;
</para>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:

View file

@ -1,23 +1,23 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.2 $ -->
<!-- $Revision: 1.3 $ -->
<refentry id="function.oci-lob-is-equal">
<refnamediv>
<refname>oci_lob_is_equal</refname>
<refpurpose>Compares two LOB/FILE locators for equality</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>bool</type><methodname>oci_lob_is_equal</methodname>
<methodparam><type>OCI-Lob</type><parameter>lob1</parameter></methodparam>
<methodparam><type>OCI-Lob</type><parameter>lob2</parameter></methodparam>
</methodsynopsis>
<para>
Compares two LOB/FILE locators. Returns &true; if these objects are equal
and &false; otherwise.
</para>
</refsect1>
</refentry>
<refnamediv>
<refname>oci_lob_is_equal</refname>
<refpurpose>Compares two LOB/FILE locators for equality</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>bool</type><methodname>oci_lob_is_equal</methodname>
<methodparam><type>OCI-Lob</type><parameter>lob1</parameter></methodparam>
<methodparam><type>OCI-Lob</type><parameter>lob2</parameter></methodparam>
</methodsynopsis>
<para>
Compares two LOB/FILE locators. Returns &true; if these objects are equal
and &false; otherwise.
</para>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:

View file

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.1 $ -->
<!-- $Revision: 1.2 $ -->
<refentry id="function.oci-lob-savefile">
<refnamediv>
<refname>OCI-Lob->saveFile</refname>
@ -13,6 +13,7 @@
<function>oci_lob_import</function>.
</simpara>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file

View file

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.1 $ -->
<!-- $Revision: 1.2 $ -->
<refentry id="function.oci-lob-writetofile">
<refnamediv>
<refname>OCI-Lob->writeToFile</refname>
@ -13,6 +13,7 @@
<function>oci_lob_export</function>.
</simpara>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file

View file

@ -1,38 +1,38 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.5 $ -->
<refentry id="function.oci-new-collection">
<refnamediv>
<refname>oci_new_collection</refname>
<refpurpose>Allocates new collection object</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>OCI-Collection</type><methodname>oci_new_collection</methodname>
<methodparam><type>resource</type><parameter>connection</parameter></methodparam>
<methodparam><type>string</type><parameter>tdo</parameter></methodparam>
<methodparam choice="opt"><type>string</type><parameter>schema</parameter></methodparam>
</methodsynopsis>
<para>
Allocates a new collection object. Parameter <parameter>tdo</parameter>
should be a valid named type (uppercase). The third, optional parameter
<parameter>schema</parameter> should point to the scheme, where the
named type was created. <function>oci_new_collection</function> uses
the name of the current user as the default value of <parameter>schema</parameter>.
</para>
<para>
<function>oci_new_collection</function> returns &false; on error.
</para>
<note>
<para>
In PHP versions before 5.0.0 you must use <function>ocinewcollection</function> instead.
This name still can be used, it was left as alias of
<function>oci_new_collection</function> for downwards compatability.
This, however, is deprecated and not recommended.
</para>
</note>
</refsect1>
</refentry>
<!-- $Revision: 1.6 $ -->
<refentry id="function.oci-new-collection">
<refnamediv>
<refname>oci_new_collection</refname>
<refpurpose>Allocates new collection object</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>OCI-Collection</type><methodname>oci_new_collection</methodname>
<methodparam><type>resource</type><parameter>connection</parameter></methodparam>
<methodparam><type>string</type><parameter>tdo</parameter></methodparam>
<methodparam choice="opt"><type>string</type><parameter>schema</parameter></methodparam>
</methodsynopsis>
<para>
Allocates a new collection object. Parameter <parameter>tdo</parameter>
should be a valid named type (uppercase). The third, optional parameter
<parameter>schema</parameter> should point to the scheme, where the
named type was created. <function>oci_new_collection</function> uses
the name of the current user as the default value of <parameter>schema</parameter>.
</para>
<para>
<function>oci_new_collection</function> returns &false; on error.
</para>
<note>
<para>
In PHP versions before 5.0.0 you must use <function>ocinewcollection</function> instead.
This name still can be used, it was left as alias of
<function>oci_new_collection</function> for downwards compatability.
This, however, is deprecated and not recommended.
</para>
</note>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:

View file

@ -1,65 +1,65 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.7 $ -->
<!-- $Revision: 1.8 $ -->
<refentry id="function.oci-new-connect">
<refnamediv>
<refname>oci_new_connect</refname>
<refpurpose>Establishes a new connection to the Oracle server</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>resource</type><methodname>oci_new_connect</methodname>
<methodparam><type>string</type><parameter>username</parameter></methodparam>
<methodparam><type>string</type><parameter>password</parameter></methodparam>
<methodparam choice="opt"><type>string</type><parameter>db</parameter></methodparam>
<methodparam choice="opt"><type>string</type><parameter>charset</parameter></methodparam>
<methodparam choice="opt"><type>int</type><parameter>session_mode</parameter></methodparam>
</methodsynopsis>
<para>
<function>oci_new_connect</function> establishes a new connection to
an Oracle server and logs on. Unlike <function>oci_connect</function> and
<function>oci_pconnect</function>, <function>oci_new_connect</function>
does not cache connections and will always return a brand-new freshly
opened connection handle. This is useful if your application needs
transactional isolation between two sets of queries.
</para>
<para>
The optional third parameter can either contain the name
of the local Oracle instance or the name of the entry in
<filename>tnsnames.ora</filename>. If the third parameter is not specified,
PHP uses environment variables <literal>ORACLE_SID</literal> and
<literal>TWO_TASK</literal> to determine the name of local Oracle
instance and location of <filename>tnsnames.ora</filename> accordingly.
</para>
<para>
Parameter <parameter>session_mode</parameter> is available since version
1.1 and accepts the following values: <constant>OCI_DEFAULT</constant>,
<constant>OCI_SYSOPER</constant> and <constant>OCI_SYSDBA</constant>.
If either <constant>OCI_SYSOPER</constant> or
<constant>OCI_SYSDBA</constant> were specified,
<function>oci_new_connect</function> will try to establish privileged
connection using external credentials. Privileged connections are
disabled by default. To enable them you need to set <link
linkend="ini.oci8.privileged_connect">oci8.privileged_connect</link>
to On.
</para>
<note>
<simpara>
If you're using PHP with Oracle Instant Client, you can use easy connect
naming method described here:
<ulink url="&url.oracle.oic.connect;">&url.oracle.oic.connect;</ulink>.
Basically this means you can specify "//db_host[:port]/database_name"
as database name. But if you want to use the old way of naming you
<emphasis>must</emphasis> set either <constant>ORACLE_HOME</constant> or
<constant>TNS_ADMIN</constant>.
</simpara>
</note>
&oci.charset;
<para>
The following demonstrates how you can separate connections.
<example>
<title><function>oci_new_connect</function> example</title>
<programlisting role="php">
<refnamediv>
<refname>oci_new_connect</refname>
<refpurpose>Establishes a new connection to the Oracle server</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>resource</type><methodname>oci_new_connect</methodname>
<methodparam><type>string</type><parameter>username</parameter></methodparam>
<methodparam><type>string</type><parameter>password</parameter></methodparam>
<methodparam choice="opt"><type>string</type><parameter>db</parameter></methodparam>
<methodparam choice="opt"><type>string</type><parameter>charset</parameter></methodparam>
<methodparam choice="opt"><type>int</type><parameter>session_mode</parameter></methodparam>
</methodsynopsis>
<para>
<function>oci_new_connect</function> establishes a new connection to
an Oracle server and logs on. Unlike <function>oci_connect</function> and
<function>oci_pconnect</function>, <function>oci_new_connect</function>
does not cache connections and will always return a brand-new freshly
opened connection handle. This is useful if your application needs
transactional isolation between two sets of queries.
</para>
<para>
The optional third parameter can either contain the name
of the local Oracle instance or the name of the entry in
<filename>tnsnames.ora</filename>. If the third parameter is not specified,
PHP uses environment variables <literal>ORACLE_SID</literal> and
<literal>TWO_TASK</literal> to determine the name of local Oracle
instance and location of <filename>tnsnames.ora</filename> accordingly.
</para>
<para>
Parameter <parameter>session_mode</parameter> is available since version
1.1 and accepts the following values: <constant>OCI_DEFAULT</constant>,
<constant>OCI_SYSOPER</constant> and <constant>OCI_SYSDBA</constant>.
If either <constant>OCI_SYSOPER</constant> or
<constant>OCI_SYSDBA</constant> were specified,
<function>oci_new_connect</function> will try to establish privileged
connection using external credentials. Privileged connections are
disabled by default. To enable them you need to set <link
linkend="ini.oci8.privileged_connect">oci8.privileged_connect</link>
to On.
</para>
<note>
<simpara>
If you're using PHP with Oracle Instant Client, you can use easy connect
naming method described here:
<ulink url="&url.oracle.oic.connect;">&url.oracle.oic.connect;</ulink>.
Basically this means you can specify "//db_host[:port]/database_name"
as database name. But if you want to use the old way of naming you
<emphasis>must</emphasis> set either <constant>ORACLE_HOME</constant> or
<constant>TNS_ADMIN</constant>.
</simpara>
</note>
&oci.charset;
<para>
The following demonstrates how you can separate connections.
<example>
<title><function>oci_new_connect</function> example</title>
<programlisting role="php">
<![CDATA[
<?php
echo "<html><pre>";
@ -68,7 +68,7 @@ $db = "";
$c1 = oci_connect("scott", "tiger", $db);
$c2 = oci_new_connect("scott", "tiger", $db);
function create_table($conn)
function create_table($conn)
{
$stmt = oci_parse($conn, "create table scott.hallo (test
varchar2(64))");
@ -76,41 +76,41 @@ varchar2(64))");
echo $conn . " created table\n\n";
}
function drop_table($conn)
function drop_table($conn)
{
$stmt = oci_parse($conn, "drop table scott.hallo");
oci_execute($stmt);
echo $conn . " dropped table\n\n";
}
function insert_data($conn)
function insert_data($conn)
{
$stmt = oci_parse($conn, "insert into scott.hallo
$stmt = oci_parse($conn, "insert into scott.hallo
values('$conn' || ' ' || to_char(sysdate,'DD-MON-YY HH24:MI:SS'))");
oci_execute($stmt, OCI_DEFAULT);
echo $conn . " inserted hallo\n\n";
}
function delete_data($conn)
function delete_data($conn)
{
$stmt = oci_parse($conn, "delete from scott.hallo");
oci_execute($stmt, OCI_DEFAULT);
echo $conn . " deleted hallo\n\n";
}
function commit($conn)
function commit($conn)
{
oci_commit($conn);
echo $conn . " committed\n\n";
}
function rollback($conn)
function rollback($conn)
{
oci_rollback($conn);
echo $conn . " rollback\n\n";
}
function select_data($conn)
function select_data($conn)
{
$stmt = oci_parse($conn, "select * from scott.hallo");
oci_execute($stmt, OCI_DEFAULT);
@ -124,23 +124,23 @@ function select_data($conn)
create_table($c1);
insert_data($c1);
select_data($c1);
select_data($c2);
select_data($c1);
select_data($c2);
rollback($c1);
rollback($c1);
select_data($c1);
select_data($c2);
select_data($c1);
select_data($c2);
insert_data($c2);
commit($c2);
insert_data($c2);
commit($c2);
select_data($c1);
select_data($c1);
delete_data($c1);
select_data($c1);
select_data($c2);
commit($c1);
delete_data($c1);
select_data($c1);
select_data($c2);
commit($c1);
select_data($c1);
select_data($c2);
@ -149,26 +149,26 @@ drop_table($c1);
echo "</pre></html>";
?>
]]>
</programlisting>
</example>
</para>
<para>
<function>oci_new_connect</function> returns &false; on error.
</para>
<note>
<para>
In PHP versions before 5.0.0 you must use <function>ocinlogon</function> instead.
This name still can be used, it was left as alias of
<function>oci_new_connect</function> for downwards compatability.
This, however, is deprecated and not recommended.
</para>
</note>
<simpara>
See also <function>oci_connect</function> and
<function>oci_pconnect</function>.
</simpara>
</refsect1>
</refentry>
</programlisting>
</example>
</para>
<para>
<function>oci_new_connect</function> returns &false; on error.
</para>
<note>
<para>
In PHP versions before 5.0.0 you must use <function>ocinlogon</function> instead.
This name still can be used, it was left as alias of
<function>oci_new_connect</function> for downwards compatability.
This, however, is deprecated and not recommended.
</para>
</note>
<para>
See also <function>oci_connect</function> and
<function>oci_pconnect</function>.
</para>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:

View file

@ -1,26 +1,26 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.5 $ -->
<refentry id="function.oci-new-cursor">
<refnamediv>
<refname>oci_new_cursor</refname>
<refpurpose>Allocates and returns a new cursor (statement handle)</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>resource</type><methodname>oci_new_cursor</methodname>
<methodparam><type>resource</type><parameter>connection</parameter></methodparam>
</methodsynopsis>
<para>
<function>oci_new_cursor</function> allocates a new statement handle on
the specified connection.
</para>
<para>
<example>
<title>Using REF CURSOR in an Oracle's stored procedure</title>
<programlisting role="php">
<!-- $Revision: 1.6 $ -->
<refentry id="function.oci-new-cursor">
<refnamediv>
<refname>oci_new_cursor</refname>
<refpurpose>Allocates and returns a new cursor (statement handle)</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>resource</type><methodname>oci_new_cursor</methodname>
<methodparam><type>resource</type><parameter>connection</parameter></methodparam>
</methodsynopsis>
<para>
<function>oci_new_cursor</function> allocates a new statement handle on
the specified connection.
</para>
<para>
<example>
<title>Using REF CURSOR in an Oracle's stored procedure</title>
<programlisting role="php">
<![CDATA[
<?php
<?php
// suppose your stored procedure info.output returns a ref cursor in :data
$conn = oci_connect("scott", "tiger");
@ -34,21 +34,21 @@ oci_execute($curs);
while ($data = oci_fetch_row($curs)) {
var_dump($data);
}
oci_free_statement($stmt);
oci_free_statement($curs);
oci_close($conn);
?>
]]>
</programlisting>
</example>
</para>
<para>
<example>
<title>Using REF CURSOR in an Oracle's select statement</title>
<programlisting role="php">
</programlisting>
</example>
</para>
<para>
<example>
<title>Using REF CURSOR in an Oracle's select statement</title>
<programlisting role="php">
<![CDATA[
<?php
<?php
echo "<html><body>";
$conn = oci_connect("scott", "tiger");
$count_cursor = "CURSOR(select count(empno) num_emps from emp " .
@ -82,22 +82,22 @@ oci_free_statement($stmt);
oci_close($conn);
?>
]]>
</programlisting>
</example>
</para>
<para>
<function>oci_new_cursor</function> returns &false; on error.
</para>
<note>
<para>
In PHP versions before 5.0.0 you must use <function>ocinewcursor</function> instead.
This name still can be used, it was left as alias of
<function>oci_new_cursor</function> for downwards compatability.
This, however, is deprecated and not recommended.
</para>
</note>
</refsect1>
</refentry>
</programlisting>
</example>
</para>
<para>
<function>oci_new_cursor</function> returns &false; on error.
</para>
<note>
<para>
In PHP versions before 5.0.0 you must use <function>ocinewcursor</function> instead.
This name still can be used, it was left as alias of
<function>oci_new_cursor</function> for downwards compatability.
This, however, is deprecated and not recommended.
</para>
</note>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:

View file

@ -1,29 +1,29 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.7 $ -->
<refentry id="function.oci-new-descriptor">
<refnamediv>
<refname>oci_new_descriptor</refname>
<refpurpose>Initializes a new empty LOB or FILE descriptor</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>OCI-Lob</type><methodname>oci_new_descriptor</methodname>
<methodparam><type>resource</type><parameter>connection</parameter></methodparam>
<methodparam choice="opt"><type>int</type><parameter>type</parameter></methodparam>
</methodsynopsis>
<para>
<function>oci_new_descriptor</function> allocates resources to hold
descriptor or LOB locator. Valid values for <parameter>type</parameter>
are: <constant>OCI_D_FILE</constant>,
<constant>OCI_D_LOB</constant> and <constant>OCI_D_ROWID</constant>.
</para>
<para>
<example>
<title><function>oci_new_descriptor</function> example</title>
<programlisting role="php">
<!-- $Revision: 1.8 $ -->
<refentry id="function.oci-new-descriptor">
<refnamediv>
<refname>oci_new_descriptor</refname>
<refpurpose>Initializes a new empty LOB or FILE descriptor</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>OCI-Lob</type><methodname>oci_new_descriptor</methodname>
<methodparam><type>resource</type><parameter>connection</parameter></methodparam>
<methodparam choice="opt"><type>int</type><parameter>type</parameter></methodparam>
</methodsynopsis>
<para>
<function>oci_new_descriptor</function> allocates resources to hold
descriptor or LOB locator. Valid values for <parameter>type</parameter>
are: <constant>OCI_D_FILE</constant>,
<constant>OCI_D_LOB</constant> and <constant>OCI_D_ROWID</constant>.
</para>
<para>
<example>
<title><function>oci_new_descriptor</function> example</title>
<programlisting role="php">
<![CDATA[
<?php
<?php
/* This script is designed to be called from a HTML form.
* It expects $user, $password, $table, $where, and $commitsize
* to be passed in from the form. The script then deletes
@ -33,26 +33,26 @@
$conn = oci_connect($user, $password);
$stmt = oci_parse($conn, "select rowid from $table $where");
$rowid = oci_new_descriptor($conn, OCI_D_ROWID);
oci_define_by_name($stmt, "ROWID", $rowid);
oci_define_by_name($stmt, "ROWID", $rowid);
oci_execute($stmt);
while (oci_fetch($stmt)) {
$nrows = oci_num_rows($stmt);
$delete = oci_parse($conn, "delete from $table where ROWID = :rid");
oci_bind_by_name($delete, ":rid", $rowid, -1, OCI_B_ROWID);
oci_execute($delete);
oci_execute($delete);
echo "$nrows\n";
if (($nrows % $commitsize) == 0) {
oci_commit($conn);
}
oci_commit($conn);
}
}
$nrows = oci_num_rows($stmt);
$nrows = oci_num_rows($stmt);
echo "$nrows deleted...\n";
oci_free_statement($stmt);
oci_free_statement($stmt);
oci_close($conn);
?>
?>
]]>
</programlisting>
<programlisting role="php">
</programlisting>
<programlisting role="php">
<![CDATA[
<?php
/* This script demonstrates file upload to LOB columns
@ -74,10 +74,10 @@ Upload file: <input type="file" name="lob_upload" /><br />
// see also the features section on file upload,
// if you would like to use secure uploads
$conn = oci_connect($user, $password);
$lob = oci_new_descriptor($conn, OCI_D_LOB);
$stmt = oci_parse($conn, "insert into $table (id, the_blob)
$stmt = oci_parse($conn, "insert into $table (id, the_blob)
values(my_seq.NEXTVAL, EMPTY_BLOB()) returning the_blob into :the_blob");
oci_bind_by_name($stmt, ':the_blob', $lob, -1, OCI_B_BLOB);
oci_execute($stmt, OCI_DEFAULT);
@ -93,15 +93,15 @@ Upload file: <input type="file" name="lob_upload" /><br />
}
?>
]]>
</programlisting>
</example>
<example>
<title><function>oci_new_descriptor</function> example</title>
<programlisting role="php">
</programlisting>
</example>
<example>
<title><function>oci_new_descriptor</function> example</title>
<programlisting role="php">
<![CDATA[
<?php
<?php
/* Calling PL/SQL stored procedures which contain clobs as input
* parameters (PHP 4 >= 4.0.6).
* parameters (PHP 4 >= 4.0.6).
* Example PL/SQL stored procedure signature is:
*
* PROCEDURE save_data
@ -124,22 +124,22 @@ Upload file: <input type="file" name="lob_upload" /><br />
oci_free_statement($stmt);
?>
]]>
</programlisting>
</example>
</para>
<para>
<function>oci_new_descriptor</function> returns &false; on error.
</para>
<note>
<para>
In PHP versions before 5.0.0 you must use <function>ocinewdescriptor</function> instead.
This name still can be used, it was left as alias of
<function>oci_new_descriptor</function> for downwards compatability.
This, however, is deprecated and not recommended.
</para>
</note>
</refsect1>
</refentry>
</programlisting>
</example>
</para>
<para>
<function>oci_new_descriptor</function> returns &false; on error.
</para>
<note>
<para>
In PHP versions before 5.0.0 you must use <function>ocinewdescriptor</function> instead.
This name still can be used, it was left as alias of
<function>oci_new_descriptor</function> for downwards compatability.
This, however, is deprecated and not recommended.
</para>
</note>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:

View file

@ -1,36 +1,34 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.2 $ -->
<refentry id="function.oci-num-fields">
<refnamediv>
<refname>oci_num_fields</refname>
<refpurpose>
Returns the number of result columns in a statement
</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>int</type><methodname>oci_num_fields</methodname>
<methodparam><type>resource</type><parameter>statement</parameter></methodparam>
</methodsynopsis>
<para>
<function>oci_num_fields</function> returns the number of columns in the
<parameter>statement</parameter>.
</para>
<para>
<example>
<title><function>oci_num_fields</function> example</title>
<programlisting role="php">
<!-- $Revision: 1.3 $ -->
<refentry id="function.oci-num-fields">
<refnamediv>
<refname>oci_num_fields</refname>
<refpurpose>Returns the number of result columns in a statement</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>int</type><methodname>oci_num_fields</methodname>
<methodparam><type>resource</type><parameter>statement</parameter></methodparam>
</methodsynopsis>
<para>
<function>oci_num_fields</function> returns the number of columns in the
<parameter>statement</parameter>.
</para>
<para>
<example>
<title><function>oci_num_fields</function> example</title>
<programlisting role="php">
<![CDATA[
<?php
echo "<pre>\n";
<?php
echo "<pre>\n";
$conn = oci_connect("scott", "tiger");
$stmt = oci_parse($conn, "select * from emp");
oci_execute($stmt);
while (oci_fetch($stmt)) {
echo "\n";
echo "\n";
$ncols = oci_num_fields($stmt);
for ($i = 1; $i <= $ncols; $i++) {
$column_name = oci_field_name($stmt, $i);
@ -39,29 +37,29 @@
}
echo "\n";
}
oci_free_statement($stmt);
oci_close($conn);
oci_free_statement($stmt);
oci_close($conn);
echo "</pre>";
?>
?>
]]>
</programlisting>
</example>
</para>
<para>
<function>oci_num_fields</function> returns &false; on error.
</para>
<note>
<para>
In PHP versions before 5.0.0 you must use <function>ocinumcols</function> instead.
This name still can be used, it was left as alias of
<function>oci_num_fields</function> for downwards compatability.
This, however, is deprecated and not recommended.
</para>
</note>
</refsect1>
</refentry>
</programlisting>
</example>
</para>
<para>
<function>oci_num_fields</function> returns &false; on error.
</para>
<note>
<para>
In PHP versions before 5.0.0 you must use <function>ocinumcols</function> instead.
This name still can be used, it was left as alias of
<function>oci_num_fields</function> for downwards compatability.
This, however, is deprecated and not recommended.
</para>
</note>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:

View file

@ -1,70 +1,70 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.4 $ -->
<refentry id="function.oci-num-rows">
<refnamediv>
<refname>oci_num_rows</refname>
<refpurpose>Returns number of rows affected during statement execution</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>int</type><methodname>oci_num_rows</methodname>
<methodparam><type>resource</type><parameter>stmt</parameter></methodparam>
</methodsynopsis>
<para>
<function>oci_num_rows</function> returns number of rows affected during statement execution.
</para>
<note>
<para>
This function <emphasis>does not</emphasis> return number of rows selected!
For SELECT statements this function will return the number of rows, that were
fetched to the buffer with <function>oci_fetch*</function> functions.
</para>
</note>
<para>
<example>
<title><function>oci_num_rows</function> example</title>
<programlisting role="php">
<!-- $Revision: 1.5 $ -->
<refentry id="function.oci-num-rows">
<refnamediv>
<refname>oci_num_rows</refname>
<refpurpose>Returns number of rows affected during statement execution</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>int</type><methodname>oci_num_rows</methodname>
<methodparam><type>resource</type><parameter>stmt</parameter></methodparam>
</methodsynopsis>
<para>
<function>oci_num_rows</function> returns number of rows affected during statement execution.
</para>
<note>
<para>
This function <emphasis>does not</emphasis> return number of rows selected!
For SELECT statements this function will return the number of rows, that were
fetched to the buffer with <function>oci_fetch*</function> functions.
</para>
</note>
<para>
<example>
<title><function>oci_num_rows</function> example</title>
<programlisting role="php">
<![CDATA[
<?php
echo "<pre>";
$conn = oci_connect("scott", "tiger");
$stmt = oci_parse($conn, "create table emp2 as select * from emp");
oci_execute($stmt);
echo oci_num_rows($stmt) . " rows inserted.<br />";
oci_free_statement($stmt);
$stmt = oci_parse($conn, "delete from emp2");
oci_execute($stmt, OCI_DEFAULT);
echo oci_num_rows($stmt) . " rows deleted.<br />";
oci_commit($conn);
oci_free_statement($stmt);
$stmt = oci_parse($conn, "drop table emp2");
oci_execute($stmt);
oci_free_statement($stmt);
oci_close($conn);
echo "</pre>";
?>
]]>
</programlisting>
</example>
</para>
<para>
<function>oci_num_rows</function> returns &false; on error.
</para>
<note>
<para>
In PHP versions before 5.0.0 you must use <function>ocirowcount</function> instead.
This name still can be used, it was left as alias of
<function>oci_num_rows</function> for downwards compatability.
This, however, is deprecated and not recommended.
</para>
</note>
</refsect1>
</refentry>
</programlisting>
</example>
</para>
<para>
<function>oci_num_rows</function> returns &false; on error.
</para>
<note>
<para>
In PHP versions before 5.0.0 you must use <function>ocirowcount</function> instead.
This name still can be used, it was left as alias of
<function>oci_num_rows</function> for downwards compatability.
This, however, is deprecated and not recommended.
</para>
</note>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:

View file

@ -1,45 +1,45 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.4 $ -->
<refentry id="function.oci-parse">
<refnamediv>
<refname>oci_parse</refname>
<refpurpose>Prepares Oracle statement for execution</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>resource</type><methodname>oci_parse</methodname>
<methodparam><type>resource</type><parameter>connection</parameter></methodparam>
<methodparam><type>string</type><parameter>query</parameter></methodparam>
</methodsynopsis>
<para>
<function>oci_parse</function> prepares the <parameter>query</parameter>
using <parameter>connection</parameter> and returns the statement
identifier, which can be used with
<function>oci_bind_by_name</function>, <function>oci_execute</function>
and other functions.
</para>
<note>
<para>
This function <emphasis>does not</emphasis> validate
<parameter>query</parameter>. The only way to find out if
<parameter>query</parameter> is valid SQL or PL/SQL statement - is to
execute it.
</para>
</note>
<para>
<function>oci_parse</function> returns &false; on error.
</para>
<note>
<para>
In PHP versions before 5.0.0 you must use <function>ociparse</function> instead.
This name still can be used, it was left as alias of
<function>oci_parse</function> for downwards compatability.
This, however, is deprecated and not recommended.
</para>
</note>
</refsect1>
</refentry>
<!-- $Revision: 1.5 $ -->
<refentry id="function.oci-parse">
<refnamediv>
<refname>oci_parse</refname>
<refpurpose>Prepares Oracle statement for execution</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>resource</type><methodname>oci_parse</methodname>
<methodparam><type>resource</type><parameter>connection</parameter></methodparam>
<methodparam><type>string</type><parameter>query</parameter></methodparam>
</methodsynopsis>
<para>
<function>oci_parse</function> prepares the <parameter>query</parameter>
using <parameter>connection</parameter> and returns the statement
identifier, which can be used with
<function>oci_bind_by_name</function>, <function>oci_execute</function>
and other functions.
</para>
<note>
<para>
This function <emphasis>does not</emphasis> validate
<parameter>query</parameter>. The only way to find out if
<parameter>query</parameter> is valid SQL or PL/SQL statement - is to
execute it.
</para>
</note>
<para>
<function>oci_parse</function> returns &false; on error.
</para>
<note>
<para>
In PHP versions before 5.0.0 you must use <function>ociparse</function> instead.
This name still can be used, it was left as alias of
<function>oci_parse</function> for downwards compatability.
This, however, is deprecated and not recommended.
</para>
</note>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:

View file

@ -1,51 +1,51 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.5 $ -->
<refentry id="function.oci-password-change">
<refnamediv>
<refname>oci_password_change</refname>
<refpurpose>Changes password of Oracle's user</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>bool</type><methodname>oci_password_change</methodname>
<methodparam><type>resource</type><parameter>connection</parameter></methodparam>
<methodparam><type>string</type><parameter>username</parameter></methodparam>
<methodparam><type>string</type><parameter>old_password</parameter></methodparam>
<methodparam><type>string</type><parameter>new_password</parameter></methodparam>
</methodsynopsis>
<methodsynopsis>
<type>resource</type><methodname>oci_password_change</methodname>
<methodparam><type>string</type><parameter>dbname</parameter></methodparam>
<methodparam><type>string</type><parameter>username</parameter></methodparam>
<methodparam><type>string</type><parameter>old_password</parameter></methodparam>
<methodparam><type>string</type><parameter>new_password</parameter></methodparam>
</methodsynopsis>
<para>
Changes password for user with <parameter>username</parameter>.
Parameters <parameter>old_password</parameter> and
<parameter>new_password</parameter> should indicate old and new passwords
respectively.
</para>
<note>
<simpara>
The second <function>oci_password_change</function> syntax is available
since version 1.1.
</simpara>
</note>
<para>
&return.success;
</para>
<note>
<para>
In PHP versions before 5.0.0 you must use <function>ocipasswordchange</function> instead.
This name still can be used, it was left as alias of
<function>oci_password_change</function> for downwards compatability.
This, however, is deprecated and not recommended.
</para>
</note>
</refsect1>
</refentry>
<!-- $Revision: 1.6 $ -->
<refentry id="function.oci-password-change">
<refnamediv>
<refname>oci_password_change</refname>
<refpurpose>Changes password of Oracle's user</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>bool</type><methodname>oci_password_change</methodname>
<methodparam><type>resource</type><parameter>connection</parameter></methodparam>
<methodparam><type>string</type><parameter>username</parameter></methodparam>
<methodparam><type>string</type><parameter>old_password</parameter></methodparam>
<methodparam><type>string</type><parameter>new_password</parameter></methodparam>
</methodsynopsis>
<methodsynopsis>
<type>resource</type><methodname>oci_password_change</methodname>
<methodparam><type>string</type><parameter>dbname</parameter></methodparam>
<methodparam><type>string</type><parameter>username</parameter></methodparam>
<methodparam><type>string</type><parameter>old_password</parameter></methodparam>
<methodparam><type>string</type><parameter>new_password</parameter></methodparam>
</methodsynopsis>
<para>
Changes password for user with <parameter>username</parameter>.
Parameters <parameter>old_password</parameter> and
<parameter>new_password</parameter> should indicate old and new passwords
respectively.
</para>
<note>
<simpara>
The second <function>oci_password_change</function> syntax is available
since version 1.1.
</simpara>
</note>
<para>
&return.success;
</para>
<note>
<para>
In PHP versions before 5.0.0 you must use <function>ocipasswordchange</function> instead.
This name still can be used, it was left as alias of
<function>oci_password_change</function> for downwards compatability.
This, however, is deprecated and not recommended.
</para>
</note>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:

View file

@ -1,90 +1,90 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.8 $ -->
<refentry id="function.oci-pconnect">
<refnamediv>
<refname>oci_pconnect</refname>
<refpurpose>Connect to an Oracle database using a persistent connection</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>resource</type><methodname>oci_pconnect</methodname>
<methodparam><type>string</type><parameter>username</parameter></methodparam>
<methodparam><type>string</type><parameter>password</parameter></methodparam>
<methodparam choice="opt"><type>string</type><parameter>db</parameter></methodparam>
<methodparam choice="opt"><type>string</type><parameter>charset</parameter></methodparam>
<methodparam choice="opt"><type>int</type><parameter>session_mode</parameter></methodparam>
</methodsynopsis>
<para>
<function>oci_pconnect</function> creates a persistent connection
to an Oracle server and logs on. Persistent connections are cached
and re-used between requests, resulting in reduced overhead on each
page load; a typical PHP application will have a single persistent
connection open against an Oracle server per Apache child process
(or PHP FastCGI/CGI process). See the <link
linkend="features.persistent-connections">Persistent Database
Connections</link> section for more information.
</para>
<note>
<simpara>
Starting with version 1.1 of the oci8 extension, the lifetime and
maximum amount of persistent Oracle connections can be tuned by setting
the following configuration values: <link
linkend="ini.oci8.persistent_timeout">oci8.persistent_timeout</link>,
<link linkend="ini.oci8.ping_interval">oci8.ping_interval</link> and
<link linkend="ini.oci8.max_persistent">oci8.max_persistent</link>.
</simpara>
</note>
<para>
The optional third parameter can either contain
the name of the local Oracle instance or the name of the entry in
<filename>tnsnames.ora</filename>. If the third parameter is not specified,
PHP uses environment variables <literal>ORACLE_SID</literal> and
<literal>TWO_TASK</literal> to determine the name of local Oracle
instance and location of <filename>tnsnames.ora</filename> accordingly.
</para>
<para>
Parameter <parameter>session_mode</parameter> is available since version
1.1 and accepts the following values: <constant>OCI_DEFAULT</constant>,
<constant>OCI_SYSOPER</constant> and <constant>OCI_SYSDBA</constant>.
If either <constant>OCI_SYSOPER</constant> or
<constant>OCI_SYSDBA</constant> were specified,
<function>oci_connect</function> will try to establish privileged
connection using external credentials. Privileged connections are
disabled by default. To enable them you need to set <link
linkend="ini.oci8.privileged_connect">oci8.privileged_connect</link>
to On.
</para>
<note>
<simpara>
If you're using PHP with Oracle Instant Client, you can use easy connect
naming method described here:
<ulink url="&url.oracle.oic.connect;">&url.oracle.oic.connect;</ulink>.
Basically this means you can specify "//db_host[:port]/database_name"
as database name. But if you want to use the old way of naming you
<emphasis>must</emphasis> set either <constant>ORACLE_HOME</constant> or
<constant>TNS_ADMIN</constant>.
</simpara>
</note>
&oci.charset;
<para>
<function>oci_pconnect</function> returns connection identifier or
&false; on error.
</para>
<note>
<para>
In PHP versions before 5.0.0 you must use <function>ociplogon</function> instead.
This name still can be used, it was left as alias of
<function>oci_pconnect</function> for downwards compatability.
This, however, is deprecated and not recommended.
</para>
</note>
<para>
See also <function>oci_connect</function> and
<function>oci_new_connect</function>.
</para>
</refsect1>
</refentry>
<!-- $Revision: 1.9 $ -->
<refentry id="function.oci-pconnect">
<refnamediv>
<refname>oci_pconnect</refname>
<refpurpose>Connect to an Oracle database using a persistent connection</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>resource</type><methodname>oci_pconnect</methodname>
<methodparam><type>string</type><parameter>username</parameter></methodparam>
<methodparam><type>string</type><parameter>password</parameter></methodparam>
<methodparam choice="opt"><type>string</type><parameter>db</parameter></methodparam>
<methodparam choice="opt"><type>string</type><parameter>charset</parameter></methodparam>
<methodparam choice="opt"><type>int</type><parameter>session_mode</parameter></methodparam>
</methodsynopsis>
<para>
<function>oci_pconnect</function> creates a persistent connection
to an Oracle server and logs on. Persistent connections are cached
and re-used between requests, resulting in reduced overhead on each
page load; a typical PHP application will have a single persistent
connection open against an Oracle server per Apache child process
(or PHP FastCGI/CGI process). See the <link
linkend="features.persistent-connections">Persistent Database
Connections</link> section for more information.
</para>
<note>
<simpara>
Starting with version 1.1 of the oci8 extension, the lifetime and
maximum amount of persistent Oracle connections can be tuned by setting
the following configuration values: <link
linkend="ini.oci8.persistent_timeout">oci8.persistent_timeout</link>,
<link linkend="ini.oci8.ping_interval">oci8.ping_interval</link> and
<link linkend="ini.oci8.max_persistent">oci8.max_persistent</link>.
</simpara>
</note>
<para>
The optional third parameter can either contain
the name of the local Oracle instance or the name of the entry in
<filename>tnsnames.ora</filename>. If the third parameter is not specified,
PHP uses environment variables <literal>ORACLE_SID</literal> and
<literal>TWO_TASK</literal> to determine the name of local Oracle
instance and location of <filename>tnsnames.ora</filename> accordingly.
</para>
<para>
Parameter <parameter>session_mode</parameter> is available since version
1.1 and accepts the following values: <constant>OCI_DEFAULT</constant>,
<constant>OCI_SYSOPER</constant> and <constant>OCI_SYSDBA</constant>.
If either <constant>OCI_SYSOPER</constant> or
<constant>OCI_SYSDBA</constant> were specified,
<function>oci_connect</function> will try to establish privileged
connection using external credentials. Privileged connections are
disabled by default. To enable them you need to set <link
linkend="ini.oci8.privileged_connect">oci8.privileged_connect</link>
to On.
</para>
<note>
<simpara>
If you're using PHP with Oracle Instant Client, you can use easy connect
naming method described here:
<ulink url="&url.oracle.oic.connect;">&url.oracle.oic.connect;</ulink>.
Basically this means you can specify "//db_host[:port]/database_name"
as database name. But if you want to use the old way of naming you
<emphasis>must</emphasis> set either <constant>ORACLE_HOME</constant> or
<constant>TNS_ADMIN</constant>.
</simpara>
</note>
&oci.charset;
<para>
<function>oci_pconnect</function> returns connection identifier or
&false; on error.
</para>
<note>
<para>
In PHP versions before 5.0.0 you must use <function>ociplogon</function> instead.
This name still can be used, it was left as alias of
<function>oci_pconnect</function> for downwards compatability.
This, however, is deprecated and not recommended.
</para>
</note>
<para>
See also <function>oci_connect</function> and
<function>oci_new_connect</function>.
</para>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:

View file

@ -1,46 +1,46 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.3 $ -->
<refentry id="function.oci-result">
<refnamediv>
<refname>oci_result</refname>
<refpurpose>Returns field's value from the fetched row</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>mixed</type><methodname>oci_result</methodname>
<methodparam><type>resource</type><parameter>statement</parameter></methodparam>
<methodparam><type>mixed</type><parameter>field</parameter></methodparam>
</methodsynopsis>
<para>
<function>oci_result</function> returns the data from the field
<parameter>field</parameter> in the current row, fetched by
<function>oci_fetch</function>. <function>oci_result</function> returns
everything as strings except for abstract types (ROWIDs, LOBs and FILEs).
<function>oci_result</function> returns &false; on error.
</para>
<para>
You can either use the column number (1-based) or the column name (in
uppercase) for the <function>field</function> parameter.
</para>
<note>
<para>
In PHP versions before 5.0.0 you must use <function>ociresult</function> instead.
This name still can be used, it was left as alias of
<function>oci_result</function> for downwards compatability.
This, however, is deprecated and not recommended.
</para>
</note>
&oci.datatypes;
<para>
See also <function>oci_fetch_array</function>,
<function>oci_fetch_assoc</function>,
<function>oci_fetch_object</function>,
<function>oci_fetch_row</function> and
<function>oci_fetch_all</function>.
</para>
</refsect1>
</refentry>
<!-- $Revision: 1.4 $ -->
<refentry id="function.oci-result">
<refnamediv>
<refname>oci_result</refname>
<refpurpose>Returns field's value from the fetched row</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>mixed</type><methodname>oci_result</methodname>
<methodparam><type>resource</type><parameter>statement</parameter></methodparam>
<methodparam><type>mixed</type><parameter>field</parameter></methodparam>
</methodsynopsis>
<para>
<function>oci_result</function> returns the data from the field
<parameter>field</parameter> in the current row, fetched by
<function>oci_fetch</function>. <function>oci_result</function> returns
everything as strings except for abstract types (ROWIDs, LOBs and FILEs).
<function>oci_result</function> returns &false; on error.
</para>
<para>
You can either use the column number (1-based) or the column name (in
uppercase) for the <function>field</function> parameter.
</para>
<note>
<para>
In PHP versions before 5.0.0 you must use <function>ociresult</function> instead.
This name still can be used, it was left as alias of
<function>oci_result</function> for downwards compatability.
This, however, is deprecated and not recommended.
</para>
</note>
&oci.datatypes;
<para>
See also <function>oci_fetch_array</function>,
<function>oci_fetch_assoc</function>,
<function>oci_fetch_object</function>,
<function>oci_fetch_row</function> and
<function>oci_fetch_all</function>.
</para>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:

View file

@ -1,44 +1,44 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.3 $ -->
<refentry id="function.oci-rollback">
<refnamediv>
<refname>oci_rollback</refname>
<refpurpose>Rolls back outstanding transaction</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>bool</type><methodname>oci_rollback</methodname>
<methodparam><type>resource</type><parameter>connection</parameter></methodparam>
</methodsynopsis>
<para>
<function>oci_rollback</function> rolls back all outstanding statements
for Oracle connection <parameter>connection</parameter>.
</para>
<para>
&return.success;
</para>
<note>
<para>
Transactions are automatically rolled back when you close
the connection, or when the script ends, whichever is soonest. You
need to explicitly call <function>oci_commit</function> to commit
the transaction, or <function>oci_rollback</function> to abort it.
</para>
</note>
<note>
<para>
In PHP versions before 5.0.0 you must use <function>ocirollback</function> instead.
This name still can be used, it was left as alias of
<function>oci_rollback</function> for downwards compatability.
This, however, is deprecated and not recommended.
</para>
</note>
<para>
See also <function>oci_commit</function>.
</para>
</refsect1>
</refentry>
<!-- $Revision: 1.4 $ -->
<refentry id="function.oci-rollback">
<refnamediv>
<refname>oci_rollback</refname>
<refpurpose>Rolls back outstanding transaction</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>bool</type><methodname>oci_rollback</methodname>
<methodparam><type>resource</type><parameter>connection</parameter></methodparam>
</methodsynopsis>
<para>
<function>oci_rollback</function> rolls back all outstanding statements
for Oracle connection <parameter>connection</parameter>.
</para>
<para>
&return.success;
</para>
<note>
<para>
Transactions are automatically rolled back when you close
the connection, or when the script ends, whichever is soonest. You
need to explicitly call <function>oci_commit</function> to commit
the transaction, or <function>oci_rollback</function> to abort it.
</para>
</note>
<note>
<para>
In PHP versions before 5.0.0 you must use <function>ocirollback</function> instead.
This name still can be used, it was left as alias of
<function>oci_rollback</function> for downwards compatability.
This, however, is deprecated and not recommended.
</para>
</note>
<para>
See also <function>oci_commit</function>.
</para>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:

View file

@ -1,24 +1,24 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.4 $ -->
<refentry id="function.oci-server-version">
<refnamediv>
<refname>oci_server_version</refname>
<refpurpose>Returns server version</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>string</type><methodname>oci_server_version</methodname>
<methodparam><type>resource</type><parameter>connection</parameter></methodparam>
</methodsynopsis>
<para>
Returns a string with version information of the Oracle server, which uses
connection <parameter>connection</parameter> or returns &false; on error.
</para>
<para>
<example>
<title><function>oci_server_version</function> example</title>
<programlisting role="php">
<!-- $Revision: 1.5 $ -->
<refentry id="function.oci-server-version">
<refnamediv>
<refname>oci_server_version</refname>
<refpurpose>Returns server version</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>string</type><methodname>oci_server_version</methodname>
<methodparam><type>resource</type><parameter>connection</parameter></methodparam>
</methodsynopsis>
<para>
Returns a string with version information of the Oracle server, which uses
connection <parameter>connection</parameter> or returns &false; on error.
</para>
<para>
<example>
<title><function>oci_server_version</function> example</title>
<programlisting role="php">
<![CDATA[
<?php
$conn = oci_connect("scott", "tiger");
@ -26,19 +26,19 @@
oci_close($conn);
?>
]]>
</programlisting>
</example>
</para>
<note>
<para>
In PHP versions before 5.0.0 you must use <function>ociserverversion</function> instead.
This name still can be used, it was left as alias of
<function>oci_server_version</function> for downwards compatability.
This, however, is deprecated and not recommended.
</para>
</note>
</refsect1>
</refentry>
</programlisting>
</example>
</para>
<note>
<para>
In PHP versions before 5.0.0 you must use <function>ociserverversion</function> instead.
This name still can be used, it was left as alias of
<function>oci_server_version</function> for downwards compatability.
This, however, is deprecated and not recommended.
</para>
</note>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:

View file

@ -1,40 +1,40 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.4 $ -->
<refentry id="function.oci-set-prefetch">
<refnamediv>
<refname>oci_set_prefetch</refname>
<refpurpose>Sets number of rows to be prefetched</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>bool</type><methodname>oci_set_prefetch</methodname>
<methodparam><type>resource</type><parameter>statement</parameter></methodparam>
<methodparam choice="opt"><type>int</type><parameter>rows</parameter></methodparam>
</methodsynopsis>
<para>
Sets the number of rows to be prefetched after successful call to
<function>oci_execute</function>. The default value for
<parameter>rows</parameter> is 1.
</para>
<note>
<para>
In PHP versions before 5.0.0 you must use <function>ocisetprefetch</function> instead.
This name still can be used, it was left as alias of
<function>oci_set_prefetch</function> for downwards compatability.
This, however, is deprecated and not recommended.
</para>
</note>
<para>
&return.success;
</para>
<simpara>
See also <link
linkend="ini.oci8.default_prefetch">oci8_.default_prefetch</link>
ini option.
</simpara>
</refsect1>
</refentry>
<!-- $Revision: 1.5 $ -->
<refentry id="function.oci-set-prefetch">
<refnamediv>
<refname>oci_set_prefetch</refname>
<refpurpose>Sets number of rows to be prefetched</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>bool</type><methodname>oci_set_prefetch</methodname>
<methodparam><type>resource</type><parameter>statement</parameter></methodparam>
<methodparam choice="opt"><type>int</type><parameter>rows</parameter></methodparam>
</methodsynopsis>
<para>
Sets the number of rows to be prefetched after successful call to
<function>oci_execute</function>. The default value for
<parameter>rows</parameter> is 1.
</para>
<note>
<para>
In PHP versions before 5.0.0 you must use <function>ocisetprefetch</function> instead.
This name still can be used, it was left as alias of
<function>oci_set_prefetch</function> for downwards compatability.
This, however, is deprecated and not recommended.
</para>
</note>
<para>
&return.success;
</para>
<simpara>
See also <link
linkend="ini.oci8.default_prefetch">oci8_.default_prefetch</link>
ini option.
</simpara>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:

View file

@ -1,72 +1,72 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.5 $ -->
<refentry id="function.oci-statement-type">
<refnamediv>
<refname>oci_statement_type</refname>
<refpurpose>Returns the type of an OCI statement</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>string</type><methodname>oci_statement_type</methodname>
<methodparam><type>resource</type><parameter>statement</parameter></methodparam>
</methodsynopsis>
<para>
<function>oci_statement_type</function> returns the query type of
statement <parameter>statement</parameter> as one of the following
values:
<orderedlist>
<listitem><simpara><literal>SELECT</literal></simpara></listitem>
<listitem><simpara><literal>UPDATE</literal></simpara></listitem>
<listitem><simpara><literal>DELETE</literal></simpara></listitem>
<listitem><simpara><literal>INSERT</literal></simpara></listitem>
<listitem><simpara><literal>CREATE</literal></simpara></listitem>
<listitem><simpara><literal>DROP</literal></simpara></listitem>
<listitem><simpara><literal>ALTER</literal></simpara></listitem>
<listitem><simpara><literal>BEGIN</literal></simpara></listitem>
<listitem><simpara><literal>DECLARE</literal></simpara></listitem>
<listitem><simpara><literal>CALL</literal> (since PHP 5.2.1 and OCI8
1.2.3)</simpara></listitem>
<listitem><simpara><literal>UNKNOWN</literal></simpara></listitem>
</orderedlist>
</para>
<para>
Parameter <parameter>statement</parameter> is a valid OCI statement
identifier, returned from <function>oci_parse</function>.
</para>
<para>
<example>
<title><function>oci_statement_type</function> example</title>
<programlisting role="php">
<!-- $Revision: 1.6 $ -->
<refentry id="function.oci-statement-type">
<refnamediv>
<refname>oci_statement_type</refname>
<refpurpose>Returns the type of an OCI statement</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>string</type><methodname>oci_statement_type</methodname>
<methodparam><type>resource</type><parameter>statement</parameter></methodparam>
</methodsynopsis>
<para>
<function>oci_statement_type</function> returns the query type of
statement <parameter>statement</parameter> as one of the following
values:
<orderedlist>
<listitem><simpara><literal>SELECT</literal></simpara></listitem>
<listitem><simpara><literal>UPDATE</literal></simpara></listitem>
<listitem><simpara><literal>DELETE</literal></simpara></listitem>
<listitem><simpara><literal>INSERT</literal></simpara></listitem>
<listitem><simpara><literal>CREATE</literal></simpara></listitem>
<listitem><simpara><literal>DROP</literal></simpara></listitem>
<listitem><simpara><literal>ALTER</literal></simpara></listitem>
<listitem><simpara><literal>BEGIN</literal></simpara></listitem>
<listitem><simpara><literal>DECLARE</literal></simpara></listitem>
<listitem><simpara><literal>CALL</literal> (since PHP 5.2.1 and OCI8
1.2.3)</simpara></listitem>
<listitem><simpara><literal>UNKNOWN</literal></simpara></listitem>
</orderedlist>
</para>
<para>
Parameter <parameter>statement</parameter> is a valid OCI statement
identifier, returned from <function>oci_parse</function>.
</para>
<para>
<example>
<title><function>oci_statement_type</function> example</title>
<programlisting role="php">
<![CDATA[
<?php
$conn = oci_connect("scott", "tiger");
$sql = "delete from emp where deptno = 10";
$stmt = oci_parse($conn, $sql);
if (oci_statement_type($stmt) == "DELETE") {
die("You are not allowed to delete from this table<br />");
}
oci_close($conn);
?>
]]>
</programlisting>
</example>
</para>
<para>
<function>oci_statement_type</function> returns &false; on error.
</para>
<note>
<para>
In PHP versions before 5.0.0 you must use <function>ocistatementtype</function> instead.
This name still can be used, it was left as alias of
<function>oci_statement_type</function> for downwards compatability.
This, however, is deprecated and not recommended.
</para>
</note>
</refsect1>
</refentry>
</programlisting>
</example>
</para>
<para>
<function>oci_statement_type</function> returns &false; on error.
</para>
<note>
<para>
In PHP versions before 5.0.0 you must use <function>ocistatementtype</function> instead.
This name still can be used, it was left as alias of
<function>oci_statement_type</function> for downwards compatability.
This, however, is deprecated and not recommended.
</para>
</note>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:

View file

@ -5,62 +5,62 @@ DO NOT TRANSLATE THIS FILE.
THE FUNCTION IT DESCRIBES WAS DEPRECATED.
-->
<!-- $Revision: 1.14 $ -->
<refentry id="function.ocifetchinto">
<refnamediv>
<refname>ocifetchinto</refname>
<refpurpose>Fetches the next row into an array</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>int</type><methodname>ocifetchinto</methodname>
<methodparam><type>resource</type><parameter>statement</parameter></methodparam>
<methodparam><type>array</type><parameter role="reference">result</parameter></methodparam>
<methodparam choice="opt"><type>int</type><parameter>mode</parameter></methodparam>
</methodsynopsis>
<note>
<para>
This function is deprecated. Recommended alternatives:
<function>oci_fetch_array</function>, <function>oci_fetch_object</function>,
<function>oci_fetch_assoc</function> and
<function>oci_fetch_row</function>.
</para>
</note>
<para>
<function>ocifetchinto</function> fetches the next row of SELECT
statement into the <parameter>result</parameter> array.
<function>ocifetchinto</function> overwrites previous content of
<parameter>result</parameter>. By default
<parameter>result</parameter> will contain a zero-based array of all
columns that are not &null;.
</para>
<para>
The <parameter>mode</parameter> parameter allows you to change the
default behaviour. You can specify more the one flag by simply adding
them up (e.g. OCI_ASSOC+OCI_RETURN_NULLS). Valid values are:
<simplelist>
<member>
<constant>OCI_ASSOC</constant> - return an associative array.
</member>
<member>
<constant>OCI_NUM</constant> - return a numeric array starting with
zero (default behaviour).
</member>
<member>
<constant>OCI_RETURN_NULLS</constant> - return the empty values for
column, which values is &null;.
</member>
<member>
<constant>OCI_RETURN_LOBS</constant> - return the value of a LOB
instead of the descriptor.
</member>
</simplelist>
</para>
<para>
<example>
<title><function>ocifetchinto</function> example</title>
<programlisting role="php">
<!-- $Revision: 1.15 $ -->
<refentry id="function.ocifetchinto">
<refnamediv>
<refname>ocifetchinto</refname>
<refpurpose>Fetches the next row into an array</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>int</type><methodname>ocifetchinto</methodname>
<methodparam><type>resource</type><parameter>statement</parameter></methodparam>
<methodparam><type>array</type><parameter role="reference">result</parameter></methodparam>
<methodparam choice="opt"><type>int</type><parameter>mode</parameter></methodparam>
</methodsynopsis>
<note>
<para>
This function is deprecated. Recommended alternatives:
<function>oci_fetch_array</function>, <function>oci_fetch_object</function>,
<function>oci_fetch_assoc</function> and
<function>oci_fetch_row</function>.
</para>
</note>
<para>
<function>ocifetchinto</function> fetches the next row of SELECT
statement into the <parameter>result</parameter> array.
<function>ocifetchinto</function> overwrites previous content of
<parameter>result</parameter>. By default
<parameter>result</parameter> will contain a zero-based array of all
columns that are not &null;.
</para>
<para>
The <parameter>mode</parameter> parameter allows you to change the
default behaviour. You can specify more the one flag by simply adding
them up (e.g. OCI_ASSOC+OCI_RETURN_NULLS). Valid values are:
<simplelist>
<member>
<constant>OCI_ASSOC</constant> - return an associative array.
</member>
<member>
<constant>OCI_NUM</constant> - return a numeric array starting with
zero (default behaviour).
</member>
<member>
<constant>OCI_RETURN_NULLS</constant> - return the empty values for
column, which values is &null;.
</member>
<member>
<constant>OCI_RETURN_LOBS</constant> - return the value of a LOB
instead of the descriptor.
</member>
</simplelist>
</para>
<para>
<example>
<title><function>ocifetchinto</function> example</title>
<programlisting role="php">
<![CDATA[
<?php
$conn = ocilogon("username", "password");
@ -75,20 +75,20 @@ while (OCIFetchInto ($statement, $row, OCI_ASSOC)) {
}
?>
]]>
</programlisting>
</example>
</para>
<para>
See also
<function>oci_fetch_array</function>,
<function>oci_fetch_object</function>,
<function>oci_fetch_assoc</function>,
<function>oci_fetch_row</function>,
<function>oci_fetch</function> and
<function>oci_execute</function>.
</para>
</refsect1>
</refentry>
</programlisting>
</example>
</para>
<para>
See also
<function>oci_fetch_array</function>,
<function>oci_fetch_object</function>,
<function>oci_fetch_assoc</function>,
<function>oci_fetch_row</function>,
<function>oci_fetch</function> and
<function>oci_execute</function>.
</para>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables: