cvs: phpdoc /en/reference/oci8 constants.xml reference.xml /en/reference/oci8/functions oci-bind-by-name.xml oci-cancel.xml oci-close.xml
oci-collection-append.xml oci-collection-assign.xml oci-collection-element-assign.xml oci-collection-element-get.xml oci-collection-max.xml
oci-collection-size.xml oci-collection-trim.xml oci-commit.xml oci-connect.xml oci-define-by-name.xml oci-error.xml oci-execute.xml oci-fetch-all.xml
oci-fetch-array.xml oci-fetch-assoc.xml oci-fetch-object.xml oci-fetch-row.xml oci-fetch.xml oci-field-is-null.xml oci-field-name.xml
oci-field-precision.xml oci-field-scale.xml oci-field-size.xml oci-field-type-raw.xml oci-field-type.xml oci-free-collection.xml
oci-free-descriptor.xml oci-free-statement.xml oci-internal-debug.xml oci-lob-append.xml oci-lob-close.xml oci-lob-copy.xml oci-lob-eof.xml
oci-lob-erase.xml oci-lob-export.xml oci-lob-flush.xml oci-lob-import.xml oci-lob-is-equal.xml oci-lob-load.xml oci-lob-read.xml oci-lob-rewind.xml
oci-lob-save.xml oci-lob-seek.xml oci-lob-size.xml oci-lob-tell.xml oci-lob-truncate.xml oci-lob-write-temporary.xml oci-lob-write.xml
oci-new-collection.xml oci-new-connect.xml oci-new-cursor.xml oci-new-descriptor.xml oci-num-fields.xml oci-num-rows.xml oci-parse.xml
oci-password-change.xml oci-pconnect.xml oci-result.xml oci-rollback.xml oci-server-version.xml oci-set-prefetch.xml oci-statement-type.xml
ocibindbyname.xml ocicancel.xml ocicloselob.xml ocicollappend.xml ocicollassign.xml ocicollassignelem.xml ocicollgetelem.xml ocicollmax.xml
ocicollsize.xml ocicolltrim.xml ocicolumnisnull.xml ocicolumnname.xml ocicolumnprecision.xml ocicolumnscale.xml ocicolumnsize.xml ocicolumntype.xml
ocicolumntyperaw.xml ocicommit.xml ocidefinebyname.xml ocierror.xml ociexecute.xml ocifetch.xml ocifetchinto.xml ocifreecollection.xml
ocifreecursor.xml ocifreedesc.xml ocifreestatement.xml ocigetbufferinglob.xml ociinternaldebug.xml ociloadlob.xml ocilogoff.xml ocilogon.xml
ocinewcollection.xml ocinewcursor.xml ocinewdescriptor.xml ocinlogon.xml ocinumcols.xml ociparse.xml ociplogon.xml ociresult.xml ocirollback.xml
ocirowcount.xml ocisavelob.xml ocisavelobfile.xml ociserverversion.xml ocisetbufferinglob.xml ocisetprefetch.xml ocistatementtype.xml
ociwritelobtofile.xml ociwritetemporarylob.xml

From: Date: Mon, 08 Mar 2004 14:12:18 +0000
Subject: cvs: phpdoc /en/reference/oci8 constants.xml reference.xml /en/reference/oci8/functions oci-bind-by-name.xml oci-cancel.xml oci-close.xml
oci-collection-append.xml oci-collection-assign.xml oci-collection-element-assign.xml oci-collection-element-get.xml oci-collection-max.xml
oci-collection-size.xml oci-collection-trim.xml oci-commit.xml oci-connect.xml oci-define-by-name.xml oci-error.xml oci-execute.xml oci-fetch-all.xml
oci-fetch-array.xml oci-fetch-assoc.xml oci-fetch-object.xml oci-fetch-row.xml oci-fetch.xml oci-field-is-null.xml oci-field-name.xml
oci-field-precision.xml oci-field-scale.xml oci-field-size.xml oci-field-type-raw.xml oci-field-type.xml oci-free-collection.xml
oci-free-descriptor.xml oci-free-statement.xml oci-internal-debug.xml oci-lob-append.xml oci-lob-close.xml oci-lob-copy.xml oci-lob-eof.xml
oci-lob-erase.xml oci-lob-export.xml oci-lob-flush.xml oci-lob-import.xml oci-lob-is-equal.xml oci-lob-load.xml oci-lob-read.xml oci-lob-rewind.xml
oci-lob-save.xml oci-lob-seek.xml oci-lob-size.xml oci-lob-tell.xml oci-lob-truncate.xml oci-lob-write-temporary.xml oci-lob-write.xml
oci-new-collection.xml oci-new-connect.xml oci-new-cursor.xml oci-new-descriptor.xml oci-num-fields.xml oci-num-rows.xml oci-parse.xml
oci-password-change.xml oci-pconnect.xml oci-result.xml oci-rollback.xml oci-server-version.xml oci-set-prefetch.xml oci-statement-type.xml
ocibindbyname.xml ocicancel.xml ocicloselob.xml ocicollappend.xml ocicollassign.xml ocicollassignelem.xml ocicollgetelem.xml ocicollmax.xml
ocicollsize.xml ocicolltrim.xml ocicolumnisnull.xml ocicolumnname.xml ocicolumnprecision.xml ocicolumnscale.xml ocicolumnsize.xml ocicolumntype.xml
ocicolumntyperaw.xml ocicommit.xml ocidefinebyname.xml ocierror.xml ociexecute.xml ocifetch.xml ocifetchinto.xml ocifreecollection.xml
ocifreecursor.xml ocifreedesc.xml ocifreestatement.xml ocigetbufferinglob.xml ociinternaldebug.xml ociloadlob.xml ocilogoff.xml ocilogon.xml
ocinewcollection.xml ocinewcursor.xml ocinewdescriptor.xml ocinlogon.xml ocinumcols.xml ociparse.xml ociplogon.xml ociresult.xml ocirollback.xml
ocirowcount.xml ocisavelob.xml ocisavelobfile.xml ociserverversion.xml ocisetbufferinglob.xml ocisetprefetch.xml ocistatementtype.xml
ociwritelobtofile.xml ociwritetemporarylob.xml
Groups: php.doc 
Request: Send a blank email to phpdoc+get-969359411@lists.php.net to get a copy of this message
didou Mon Mar 8 09:12:18 2004 EDT Added files: /phpdoc/en/reference/oci8/functions oci-bind-by-name.xml oci-cancel.xml oci-close.xml oci-collection-append.xml oci-collection-assign.xml oci-collection-element-assign.xml oci-collection-element-get.xml oci-collection-max.xml oci-collection-size.xml oci-collection-trim.xml oci-commit.xml oci-connect.xml oci-define-by-name.xml oci-error.xml oci-execute.xml oci-fetch-all.xml oci-fetch-array.xml oci-fetch-assoc.xml oci-fetch-object.xml oci-fetch-row.xml oci-fetch.xml oci-field-is-null.xml oci-field-name.xml oci-field-precision.xml oci-field-scale.xml oci-field-size.xml oci-field-type-raw.xml oci-field-type.xml oci-free-collection.xml oci-free-descriptor.xml oci-free-statement.xml oci-internal-debug.xml oci-lob-append.xml oci-lob-close.xml oci-lob-copy.xml oci-lob-eof.xml oci-lob-erase.xml oci-lob-export.xml oci-lob-flush.xml oci-lob-import.xml oci-lob-is-equal.xml oci-lob-load.xml oci-lob-read.xml oci-lob-rewind.xml oci-lob-save.xml oci-lob-seek.xml oci-lob-size.xml oci-lob-tell.xml oci-lob-truncate.xml oci-lob-write-temporary.xml oci-lob-write.xml oci-new-collection.xml oci-new-connect.xml oci-new-cursor.xml oci-new-descriptor.xml oci-num-fields.xml oci-num-rows.xml oci-parse.xml oci-password-change.xml oci-pconnect.xml oci-result.xml oci-rollback.xml oci-server-version.xml oci-set-prefetch.xml oci-statement-type.xml ocigetbufferinglob.xml ocisetbufferinglob.xml Removed files: /phpdoc/en/reference/oci8/functions ocibindbyname.xml ocicancel.xml ocicloselob.xml ocicollappend.xml ocicollassign.xml ocicollassignelem.xml ocicollgetelem.xml ocicollmax.xml ocicollsize.xml ocicolltrim.xml ocicolumnisnull.xml ocicolumnname.xml ocicolumnprecision.xml ocicolumnscale.xml ocicolumnsize.xml ocicolumntype.xml ocicolumntyperaw.xml ocicommit.xml ocidefinebyname.xml ocierror.xml ociexecute.xml ocifetch.xml ocifreecollection.xml ocifreecursor.xml ocifreedesc.xml ocifreestatement.xml ociinternaldebug.xml ociloadlob.xml ocilogoff.xml ocilogon.xml ocinewcollection.xml ocinewcursor.xml ocinewdescriptor.xml ocinlogon.xml ocinumcols.xml ociparse.xml ociplogon.xml ociresult.xml ocirollback.xml ocirowcount.xml ocisavelob.xml ocisavelobfile.xml ociserverversion.xml ocisetprefetch.xml ocistatementtype.xml ociwritelobtofile.xml ociwritetemporarylob.xml Modified files: /phpdoc/en/reference/oci8 constants.xml reference.xml /phpdoc/en/reference/oci8/functions ocifetchinto.xml Log: new docs, written by Antony Dovgal # need an english reviewer

http://cvs.php.net/diff.php/phpdoc/en/reference/oci8/constants.xml?r1=1.2&r2=1.3&ty=u Index: phpdoc/en/reference/oci8/constants.xml diff -u phpdoc/en/reference/oci8/constants.xml:1.2 phpdoc/en/reference/oci8/constants.xml:1.3 --- phpdoc/en/reference/oci8/constants.xml:1.2 Wed May 28 19:03:09 2003 +++ phpdoc/en/reference/oci8/constants.xml Mon Mar 8 09:12:16 2004 @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.2 $ --> +<!-- $Revision: 1.3 $ --> <section id="oci8.constants"> &reftitle.constants; &extension.constants; @@ -11,7 +11,8 @@ </term> <listitem> <simpara> - + Statement execution mode. Statement is not committed + automatically when using this mode. </simpara> </listitem> </varlistentry> @@ -22,7 +23,8 @@ </term> <listitem> <simpara> - + Statement execution mode. Use this mode if you don't want + to really execute query, but only get select-list description. </simpara> </listitem> </varlistentry> @@ -33,7 +35,8 @@ </term> <listitem> <simpara> - + Statement execution mode. Statement is automatically commited after + <function>oci_execute</function> call. </simpara> </listitem> </varlistentry> @@ -44,13 +47,18 @@ </term> <listitem> <simpara> - + Statement fetch mode. Used when the application knows + in advance exactly how many rows it will be fetching. + This mode turns prefetching off for Oracle release 8 + or later mode. Cursor is cancelled after the desired + rows are fetched and may result in reduced server-side + resource usage. </simpara> </listitem> </varlistentry> <varlistentry> <term> - <constant>SQLT_BFILEE</constant> + <constant>OCI_SYSDATE</constant> (<type>integer</type>) </term> <listitem> @@ -61,84 +69,91 @@ </varlistentry> <varlistentry> <term> - <constant>SQLT_CFILEE</constant> + <constant>OCI_B_BFILE</constant> (<type>integer</type>) </term> <listitem> <simpara> - + Used with <function>oci_bind_by_name</function> when + binding BFILEs. </simpara> </listitem> </varlistentry> <varlistentry> <term> - <constant>SQLT_CLOB</constant> + <constant>OCI_B_CFILEE</constant> (<type>integer</type>) </term> <listitem> <simpara> - + Used with <function>oci_bind_by_name</function> when + binding CFILEs. </simpara> </listitem> </varlistentry> <varlistentry> <term> - <constant>SQLT_BLOB</constant> + <constant>OCI_B_CLOB</constant> (<type>integer</type>) </term> <listitem> <simpara> - + Used with <function>oci_bind_by_name</function> when + binding CLOBs. </simpara> </listitem> </varlistentry> <varlistentry> <term> - <constant>SQLT_RDD</constant> + <constant>OCI_B_BLOB</constant> (<type>integer</type>) </term> <listitem> <simpara> - + Used with <function>oci_bind_by_name</function> when + binding BLOBs. </simpara> </listitem> </varlistentry> <varlistentry> <term> - <constant>OCI_B_SQLT_NTY</constant> + <constant>OCI_B_ROWID</constant> (<type>integer</type>) </term> <listitem> <simpara> - + Used with <function>oci_bind_by_name</function> when + binding ROWIDs. </simpara> </listitem> </varlistentry> <varlistentry> <term> - <constant>OCI_SYSDATE</constant> + <constant>OCI_B_CURSOR</constant> (<type>integer</type>) </term> <listitem> <simpara> - + Used with <function>oci_bind_by_name</function> when + binding cursors, previously allocated with <function>oci_new_descriptor</function>. </simpara> </listitem> </varlistentry> <varlistentry> <term> - <constant>OCI_B_BFILE</constant> + <constant>OCI_B_NTY</constant> (<type>integer</type>) </term> <listitem> <simpara> - + Used with <function>oci_bind_by_name</function> when + binding named data types. </simpara> </listitem> </varlistentry> <varlistentry> <term> - <constant>OCI_B_CFILEE</constant> + <constant>OCI_B_BIN</constant> (<type>integer</type>) </term> <listitem> @@ -149,56 +164,67 @@ </varlistentry> <varlistentry> <term> - <constant>OCI_B_CLOB</constant> + <constant>SQLT_BFILEE</constant> (<type>integer</type>) </term> <listitem> <simpara> - + The same as <constant>OCI_B_BFILE</constant>. </simpara> </listitem> </varlistentry> <varlistentry> <term> - <constant>OCI_B_BLOB</constant> + <constant>SQLT_CFILEE</constant> (<type>integer</type>) </term> <listitem> <simpara> - + The same as <constant>OCI_B_CFILEE</constant>. </simpara> </listitem> </varlistentry> <varlistentry> <term> - <constant>OCI_B_ROWID</constant> + <constant>SQLT_CLOB</constant> (<type>integer</type>) </term> <listitem> <simpara> - + The same as <constant>OCI_B_CLOB</constant>. </simpara> </listitem> </varlistentry> <varlistentry> <term> - <constant>OCI_B_CURSOR</constant> + <constant>SQLT_BLOB</constant> (<type>integer</type>) </term> <listitem> <simpara> - + The same as <constant>OCI_B_BLOB</constant>. </simpara> </listitem> </varlistentry> <varlistentry> <term> - <constant>OCI_B_BIN</constant> + <constant>SQLT_RDD</constant> (<type>integer</type>) </term> <listitem> <simpara> - + The same as <constant>OCI_B_ROWID</constant>. + </simpara> + </listitem> + </varlistentry> + <varlistentry> + <term> + <constant>SQLT_NTY</constant> + (<type>integer</type>) + </term> + <listitem> + <simpara> + The same as <constant>OCI_B_NTY</constant>. </simpara> </listitem> </varlistentry> @@ -209,7 +235,7 @@ </term> <listitem> <simpara> - + Default mode of <function>oci_fetch_all</function>. </simpara> </listitem> </varlistentry> @@ -220,7 +246,7 @@ </term> <listitem> <simpara> - + Alternative mode of <function>oci_fetch_all</function>. </simpara> </listitem> </varlistentry> @@ -231,7 +257,9 @@ </term> <listitem> <simpara> - + Used with <function>oci_fetch_all</function> and + <function>oci_fetch_array</function> to get an associative + array as a result. </simpara> </listitem> </varlistentry> @@ -242,7 +270,9 @@ </term> <listitem> <simpara> - + Used with <function>oci_fetch_all</function> and + <function>oci_fetch_array</function> to get an enumerated + array as a result. </simpara> </listitem> </varlistentry> @@ -253,7 +283,9 @@ </term> <listitem> <simpara> - + Used with <function>oci_fetch_all</function> and + <function>oci_fetch_array</function> to get an array with + both associative and number indices. </simpara> </listitem> </varlistentry> @@ -264,7 +296,8 @@ </term> <listitem> <simpara> - + Used with <function>oci_fetch_array</function> to get + empty array elements if field's value is &null;. </simpara> </listitem> </varlistentry> @@ -275,7 +308,8 @@ </term> <listitem> <simpara> - + Used with <function>oci_fetch_array</function> to get + value of LOB instead of the descriptor. </simpara> </listitem> </varlistentry> @@ -286,7 +320,8 @@ </term> <listitem> <simpara> - + This flag tells <function>oci_new_descriptor</function> to + initialize new FILE descriptor. </simpara> </listitem> </varlistentry> @@ -297,7 +332,8 @@ </term> <listitem> <simpara> - + This flag tells <function>oci_new_descriptor</function> to + initialize new LOB descriptor. </simpara> </listitem> </varlistentry> @@ -308,7 +344,8 @@ </term> <listitem> <simpara> - + This flag tells <function>oci_new_descriptor</function> to + initialize new ROWID descriptor. </simpara> </listitem> </varlistentry> @@ -319,7 +356,7 @@ </term> <listitem> <simpara> - + The same as <constant>OCI_DTYPE_FILE</constant>. </simpara> </listitem> </varlistentry> @@ -330,7 +367,7 @@ </term> <listitem> <simpara> - + The same as <constant>OCI_DTYPE_LOB</constant>. </simpara> </listitem> </varlistentry> @@ -341,7 +378,7 @@ </term> <listitem> <simpara> - + The same as <constant>OCI_DTYPE_ROWID</constant>. </simpara> </listitem> </varlistentry> http://cvs.php.net/diff.php/phpdoc/en/reference/oci8/reference.xml?r1=1.12&r2=1.13&ty=u Index: phpdoc/en/reference/oci8/reference.xml diff -u phpdoc/en/reference/oci8/reference.xml:1.12 phpdoc/en/reference/oci8/reference.xml:1.13 --- phpdoc/en/reference/oci8/reference.xml:1.12 Tue Feb 24 03:46:09 2004 +++ phpdoc/en/reference/oci8/reference.xml Mon Mar 8 09:12:16 2004 @@ -1,29 +1,32 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.12 $ --> +<!-- $Revision: 1.13 $ --> <reference id="ref.oci8"> - <title>Oracle 8 Functions</title> + <title>Oracle 8 functions</title> <titleabbrev>OCI8</titleabbrev> <partintro> <section id="oci8.intro"> &reftitle.intro; <para> - These functions allow you to access Oracle8 and Oracle7 databases. - It uses the Oracle8 Call-Interface (OCI8) + These functions allow you to access Oracle9, Oracle8 and Oracle7 databases. + It uses the Oracle Call Interface (OCI). </para> <para> This extension is more flexible than the - <link linkend="ref.oracle">standard Oracle</link> + <link linkend="ref.oracle">old Oracle</link> extension. It supports binding of global and local PHP variables to Oracle placeholders, has full LOB, FILE and ROWID support and allows you to use user-supplied define variables. + You are recommended to use this extension instead of + <link linkend="ref.oracle">old Oracle</link> extension where + possible. </para> </section> <section id="oci8.requirements"> &reftitle.required; <para> - You will need the Oracle8 client libraries to use this extension. + You will need the Oracle client libraries to use this extension. Windows users will need at least Oracle version 8.1 to use the <filename>php_oci8.dll</filename> dll. </para> http://cvs.php.net/diff.php/phpdoc/en/reference/oci8/functions/ocifetchinto.xml?r1=1.9&r2=1.10&ty=u Index: phpdoc/en/reference/oci8/functions/ocifetchinto.xml diff -u phpdoc/en/reference/oci8/functions/ocifetchinto.xml:1.9 phpdoc/en/reference/oci8/functions/ocifetchinto.xml:1.10 --- phpdoc/en/reference/oci8/functions/ocifetchinto.xml:1.9 Thu Dec 18 09:14:37 2003 +++ phpdoc/en/reference/oci8/functions/ocifetchinto.xml Mon Mar 8 09:12:17 2004 @@ -1,6 +1,5 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.9 $ --> -<!-- splitted from ./en/functions/oci8.xml, last change in rev 1.2 --> +<!-- $Revision: 1.10 $ --> <refentry id="function.ocifetchinto"> <refnamediv> <refname>ocifetchinto</refname> @@ -10,43 +9,51 @@ <title>Description</title> <methodsynopsis> <type>int</type><methodname>ocifetchinto</methodname> - <methodparam><type>resource</type><parameter>stmt</parameter></methodparam> + <methodparam><type>resource</type><parameter>statement</parameter></methodparam> <methodparam><type>array</type><parameter>&amp;result</parameter></methodparam> <methodparam choice="opt"><type>int</type><parameter>mode</parameter></methodparam> </methodsynopsis> + <note> + <para> + This function is deprecated. You're recommended to use + <function>oci_fetch_array</function>, <function>oci_fetch_object</function>, + <function>oci_fetch_assoc</function> and + <function>oci_fetch_row</function> instead. + </para> + </note> <para> - <function>ocifetchinto</function> fetches the next row (for SELECT - statements) into the <parameter>result</parameter> array. - <function>ocifetchinto</function> will overwrite the previous - content of <parameter>result</parameter>. By default + <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 than one flag by simply - adding them up (e.g. OCI_ASSOC+OCI_RETURN_NULLS). The known flags - are: + 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. + <constant>OCI_ASSOC</constant> - return an associative array. </member> <member> - <constant>OCI_NUM</constant> Return an numbered array starting with - zero. (DEFAULT) + <constant>OCI_NUM</constant> - return a numeric array starting with + zero (default behaviour). </member> <member> - <constant>OCI_RETURN_NULLS</constant> Return empty columns. + <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 + <constant>OCI_RETURN_LOBS</constant> - return the value of a LOB instead of the descriptor. </member> </simplelist> </para> <para> <example> - <title>A simple <function>ocifetchinto</function> example</title> + <title><function>ocifetchinto</function> example</title> <programlisting role="php"> <![CDATA[ <?php @@ -66,8 +73,13 @@ </example> </para> <para> - See also <function>ocifetch</function> and - <function>ociexecute</function>. + 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> http://cvs.php.net/co.php/phpdoc/en/reference/oci8/functions/oci-bind-by-name.xml?r=1.1&p=1 Index: phpdoc/en/reference/oci8/functions/oci-bind-by-name.xml +++ phpdoc/en/reference/oci8/functions/oci-bind-by-name.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- $Revision: 1.1 $ --> <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>&amp;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 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 <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> variable tells Oracle, what kind of descriptor you want to use. Possible values are: <itemizedlist> <listitem> <para> <constant>OCI_B_FILE</constant> - for BFILEs; </para> </listitem> <listitem> <para> <constant>OCI_B_CFILE</constant> - for CFILEs; </para> </listitem> <listitem> <para> <constant>OCI_B_CLOB</constant> - for CLOBs; </para> </listitem> <listitem> <para> <constant>OCI_B_BLOB</constant> - for BLOBs; </para> </listitem> <listitem> <para> <constant>OCI_B_ROWID</constant> - for ROWIDs; </para> </listitem> <listitem> <para> <constant>OCI_B_NTY</constant> - for named datatypes; </para> </listitem> <listitem> <para> <constant>OCI_B_CURSOR</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 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 :rid "); $data = array( 1111 => "Larry", 2222 => "Bill", 3333 => "Jim" ); $rowid = oci_new_descriptor($conn, OCI_D_ROWID); oci_bind_by_name($stmt, ":empno", $empno, 32); oci_bind_by_name($stmt, ":ename", $ename, 32); oci_bind_by_name($stmt, ":rid", $rowid, -1, OCI_B_ROWID); $update = oci_parse($conn, " UPDATE emp SET sal = :sal WHERE ROWID = :rid "); oci_bind_by_name($update, ":rid", $rowid, -1, OCI_B_ROWID); oci_bind_by_name($update, ":sal", $sal, 32); $sal = 10000; while (list($empno, $ename) = each($data)) { oci_execute($stmt); oci_execute($update); } $rowid->free(); oci_free_statement($update); oci_free_statement($stmt); $stmt = oci_parse($conn, " SELECT * FROM emp WHERE empno IN (1111,2222,3333) "); oci_execute($stmt); while ($row = oci_fetch_assoc($stmt)) { var_dump($row); } oci_free_statement($stmt); /* delete our "junk" from the emp table.... */ $stmt = oci_parse($conn, " DELETE FROM emp WHERE empno IN (1111,2222,3333) "); oci_execute($stmt); oci_free_statement($stmt); oci_close($conn); ?> ]]> </programlisting> </example> </para> <para> Remember, that 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'); $query = "INSERT INTO test_table VALUES(:id, :text)"; $statement = oci_parse($query); oci_bind_by_name($statement, ":id", 1); oci_bind_by_name($statement, ":text", "trailing spaces follow "); oci_execute($statement); /* This code will insert into DB string 'trailing spaces follow', without trailing spaces */ ?> ]]> </programlisting> </example> </para> <para> <example> <title><function>oci_bind_by_name</function> example</title> <programlisting role="php"> <![CDATA[ <?php $connection = oci_connect('apelsin','kanistra'); $query = "INSERT INTO test_table VALUES(:id, 'trailing spaces follow ')"; $statement = oci_parse($query); oci_bind_by_name($statement, ":id", 1); oci_execute($statement); /* And this code will add 'trailing spaces follow ', preserving trailing whitespaces */ ?> ]]> </programlisting> </example> </para> <warning> <para> It is a bad idea to 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 by intention. </para> </warning> <para> &return.success; </para> </refsect1> </refentry> <!-- Keep this comment at the end of the file Local variables: mode: sgml sgml-omittag:t sgml-shorttag:t sgml-minimize-attributes:nil sgml-always-quote-attributes:t sgml-indent-step:1 sgml-indent-data:t indent-tabs-mode:nil sgml-parent-document:nil sgml-default-dtd-file:"../../../../manual.ced" sgml-exposed-tags:nil sgml-local-catalogs:nil sgml-local-ecat-files:nil End: vim600: syn=xml fen fdm=syntax fdl=2 si vim: et tw=78 syn=sgml vi: ts=1 sw=1 --> http://cvs.php.net/co.php/phpdoc/en/reference/oci8/functions/oci-cancel.xml?r=1.1&p=1 Index: phpdoc/en/reference/oci8/functions/oci-cancel.xml +++ phpdoc/en/reference/oci8/functions/oci-cancel.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- $Revision: 1.1 $ --> <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> If you do not want read more data from a cursor, then call <function>oci_cancel</function> to free resources and to cancel reading from it. </para> <para> &return.success; </para> </refsect1> </refentry> <!-- Keep this comment at the end of the file Local variables: mode: sgml sgml-omittag:t sgml-shorttag:t sgml-minimize-attributes:nil sgml-always-quote-attributes:t sgml-indent-step:1 sgml-indent-data:t indent-tabs-mode:nil sgml-parent-document:nil sgml-default-dtd-file:"../../../../manual.ced" sgml-exposed-tags:nil sgml-local-catalogs:nil sgml-local-ecat-files:nil End: vim600: syn=xml fen fdm=syntax fdl=2 si vim: et tw=78 syn=sgml vi: ts=1 sw=1 --> http://cvs.php.net/co.php/phpdoc/en/reference/oci8/functions/oci-close.xml?r=1.1&p=1 Index: phpdoc/en/reference/oci8/functions/oci-close.xml +++ phpdoc/en/reference/oci8/functions/oci-close.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- $Revision: 1.1 $ --> <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> At this moment <function>oci_close</function> does nothing and it's usage is not required. </para> </note> <para> &return.success; </para> </refsect1> </refentry> <!-- Keep this comment at the end of the file Local variables: mode: sgml sgml-omittag:t sgml-shorttag:t sgml-minimize-attributes:nil sgml-always-quote-attributes:t sgml-indent-step:1 sgml-indent-data:t indent-tabs-mode:nil sgml-parent-document:nil sgml-default-dtd-file:"../../../../manual.ced" sgml-exposed-tags:nil sgml-local-catalogs:nil sgml-local-ecat-files:nil End: vim600: syn=xml fen fdm=syntax fdl=2 si vim: et tw=78 syn=sgml vi: ts=1 sw=1 --> http://cvs.php.net/co.php/phpdoc/en/reference/oci8/functions/oci-collection-append.xml?r=1.1&p=1 Index: phpdoc/en/reference/oci8/functions/oci-collection-append.xml +++ phpdoc/en/reference/oci8/functions/oci-collection-append.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- $Revision: 1.1 $ --> <refentry id="function.oci-collection-append"> <refnamediv> <refname>collection->append</refname> <refpurpose>Appends an object to the collection</refpurpose> </refnamediv> <refsect1> <title>Description</title> <methodsynopsis> <type>bool</type><methodname>collection->append</methodname> <methodparam><type>mixed</type><parameter>value</parameter></methodparam> </methodsynopsis> <para> Appends an object to the end of the collection. Parameter <parameter>value</parameter> can be a string or a number. </para> <para> &return.success; </para> </refsect1> </refentry> <!-- Keep this comment at the end of the file Local variables: mode: sgml sgml-omittag:t sgml-shorttag:t sgml-minimize-attributes:nil sgml-always-quote-attributes:t sgml-indent-step:1 sgml-indent-data:t indent-tabs-mode:nil sgml-parent-document:nil sgml-default-dtd-file:"../../../../manual.ced" sgml-exposed-tags:nil sgml-local-catalogs:nil sgml-local-ecat-files:nil End: vim600: syn=xml fen fdm=syntax fdl=2 si vim: et tw=78 syn=sgml vi: ts=1 sw=1 --> http://cvs.php.net/co.php/phpdoc/en/reference/oci8/functions/oci-collection-assign.xml?r=1.1&p=1 Index: phpdoc/en/reference/oci8/functions/oci-collection-assign.xml +++ phpdoc/en/reference/oci8/functions/oci-collection-assign.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- $Revision: 1.1 $ --> <refentry id="function.oci-collection-assign"> <refnamediv> <refname>collection->assign</refname> <refpurpose>Assigns a value to the collection from another existing collection</refpurpose> </refnamediv> <refsect1> <title>Description</title> <methodsynopsis> <type>bool</type><methodname>collection->assign</methodname> <methodparam><type>object</type><parameter>from</parameter></methodparam> </methodsynopsis> <para> Assigns a value to the collection from another, already created collection. Both collections should be created with <function>oci_new_collection</function> before you can use them. </para> <para> &return.success; </para> </refsect1> </refentry> <!-- Keep this comment at the end of the file Local variables: mode: sgml sgml-omittag:t sgml-shorttag:t sgml-minimize-attributes:nil sgml-always-quote-attributes:t sgml-indent-step:1 sgml-indent-data:t indent-tabs-mode:nil sgml-parent-document:nil sgml-default-dtd-file:"../../../../manual.ced" sgml-exposed-tags:nil sgml-local-catalogs:nil sgml-local-ecat-files:nil End: vim600: syn=xml fen fdm=syntax fdl=2 si vim: et tw=78 syn=sgml vi: ts=1 sw=1 --> http://cvs.php.net/co.php/phpdoc/en/reference/oci8/functions/oci-collection-element-assign.xml?r=1.1&p=1 Index: phpdoc/en/reference/oci8/functions/oci-collection-element-assign.xml +++ phpdoc/en/reference/oci8/functions/oci-collection-element-assign.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- $Revision: 1.1 $ --> <refentry id="function.oci-collection-element-assign"> <refnamediv> <refname>collection->assignElem</refname> <refpurpose>Assigns a value to the element of the collection</refpurpose> </refnamediv> <refsect1> <title>Description</title> <methodsynopsis> <type>bool</type><methodname>collection->assignElem</methodname> <methodparam><type>int</type><parameter>index</parameter></methodparam> <methodparam><type>mixed</type><parameter>value</parameter></methodparam> </methodsynopsis> <para> Assigns a value to the element with index <parameter>index</parameter> Parameter <parameter>value</parameter> can be a string or a number. </para> <para> &return.success; </para> </refsect1> </refentry> <!-- Keep this comment at the end of the file Local variables: mode: sgml sgml-omittag:t sgml-shorttag:t sgml-minimize-attributes:nil sgml-always-quote-attributes:t sgml-indent-step:1 sgml-indent-data:t indent-tabs-mode:nil sgml-parent-document:nil sgml-default-dtd-file:"../../../../manual.ced" sgml-exposed-tags:nil sgml-local-catalogs:nil sgml-local-ecat-files:nil End: vim600: syn=xml fen fdm=syntax fdl=2 si vim: et tw=78 syn=sgml vi: ts=1 sw=1 --> http://cvs.php.net/co.php/phpdoc/en/reference/oci8/functions/oci-collection-element-get.xml?r=1.1&p=1 Index: phpdoc/en/reference/oci8/functions/oci-collection-element-get.xml +++ phpdoc/en/reference/oci8/functions/oci-collection-element-get.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- $Revision: 1.1 $ --> <refentry id="function.oci-collection-element-get"> <refnamediv> <refname>collection->getElem</refname> <refpurpose>Returns value of the element</refpurpose> </refnamediv> <refsect1> <title>Description</title> <methodsynopsis> <type>mixed</type><methodname>collection->getElem</methodname> <methodparam><type>int</type><parameter>index</parameter></methodparam> </methodsynopsis> <para> Method <function>collection->getElem</function> returns value of the element with index <parameter>index</parameter> (1-based). </para> <para> <function>collection->getElem</function> will return &false; if such element doesn't exist; &null; if element is &null;; string if element is column of a string datatype or number if element is numeric field. </para> <para> <function>collection->getElem</function> will return &false; in case of error. </para> </refsect1> </refentry> <!-- Keep this comment at the end of the file Local variables: mode: sgml sgml-omittag:t sgml-shorttag:t sgml-minimize-attributes:nil sgml-always-quote-attributes:t sgml-indent-step:1 sgml-indent-data:t indent-tabs-mode:nil sgml-parent-document:nil sgml-default-dtd-file:"../../../../manual.ced" sgml-exposed-tags:nil sgml-local-catalogs:nil sgml-local-ecat-files:nil End: vim600: syn=xml fen fdm=syntax fdl=2 si vim: et tw=78 syn=sgml vi: ts=1 sw=1 --> http://cvs.php.net/co.php/phpdoc/en/reference/oci8/functions/oci-collection-max.xml?r=1.1&p=1 Index: phpdoc/en/reference/oci8/functions/oci-collection-max.xml +++ phpdoc/en/reference/oci8/functions/oci-collection-max.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- $Revision: 1.1 $ --> <refentry id="function.oci-collection-max"> <refnamediv> <refname>collection->max</refname> <refpurpose>Gets the maximum number of elements in the collection</refpurpose> </refnamediv> <refsect1> <title>Description</title> <methodsynopsis> <type>int</type><methodname>collection->max</methodname> <void /> </methodsynopsis> <para> Returns the maximum number of elements in the collection. If the returned value is 0, then the number of elements is not limited. <function>collection->max</function> returns &false; in case of error. </para> <para> See also <function>oci_collection_size</function>. </para> </refsect1> </refentry> <!-- Keep this comment at the end of the file Local variables: mode: sgml sgml-omittag:t sgml-shorttag:t sgml-minimize-attributes:nil sgml-always-quote-attributes:t sgml-indent-step:1 sgml-indent-data:t indent-tabs-mode:nil sgml-parent-document:nil sgml-default-dtd-file:"../../../../manual.ced" sgml-exposed-tags:nil sgml-local-catalogs:nil sgml-local-ecat-files:nil End: vim600: syn=xml fen fdm=syntax fdl=2 si vim: et tw=78 syn=sgml vi: ts=1 sw=1 --> http://cvs.php.net/co.php/phpdoc/en/reference/oci8/functions/oci-collection-size.xml?r=1.1&p=1 Index: phpdoc/en/reference/oci8/functions/oci-collection-size.xml +++ phpdoc/en/reference/oci8/functions/oci-collection-size.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- $Revision: 1.1 $ --> <refentry id="function.oci-collection-size"> <refnamediv> <refname>collection->size</refname> <refpurpose>Returns size of the collection</refpurpose> </refnamediv> <refsect1> <title>Description</title> <methodsynopsis> <type>int</type><methodname>collection->size</methodname> <void /> </methodsynopsis> <para> Returns the number of elements in the collection. </para> <para> See also <function>oci_collection_max</function>. </para> </refsect1> </refentry> <!-- Keep this comment at the end of the file Local variables: mode: sgml sgml-omittag:t sgml-shorttag:t sgml-minimize-attributes:nil sgml-always-quote-attributes:t sgml-indent-step:1 sgml-indent-data:t indent-tabs-mode:nil sgml-parent-document:nil sgml-default-dtd-file:"../../../../manual.ced" sgml-exposed-tags:nil sgml-local-catalogs:nil sgml-local-ecat-files:nil End: vim600: syn=xml fen fdm=syntax fdl=2 si vim: et tw=78 syn=sgml vi: ts=1 sw=1 --> http://cvs.php.net/co.php/phpdoc/en/reference/oci8/functions/oci-collection-trim.xml?r=1.1&p=1 Index: phpdoc/en/reference/oci8/functions/oci-collection-trim.xml +++ phpdoc/en/reference/oci8/functions/oci-collection-trim.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- $Revision: 1.1 $ --> <refentry id="function.oci-collection-trim"> <refnamediv> <refname>collection->trim</refname> <refpurpose>Trims elements from the end of the collection</refpurpose> </refnamediv> <refsect1> <title>Description</title> <methodsynopsis> <type>bool</type><methodname>collection->trim</methodname> <methodparam><type>int</type><parameter>num</parameter></methodparam> </methodsynopsis> <para> Trims <parameter>num</parameter> of elements from the end of the collection. </para> <para> &return.success; </para> <para> See also <function>oci_collection_size</function>. </para> </refsect1> </refentry> <!-- Keep this comment at the end of the file Local variables: mode: sgml sgml-omittag:t sgml-shorttag:t sgml-minimize-attributes:nil sgml-always-quote-attributes:t sgml-indent-step:1 sgml-indent-data:t indent-tabs-mode:nil sgml-parent-document:nil sgml-default-dtd-file:"../../../../manual.ced" sgml-exposed-tags:nil sgml-local-catalogs:nil sgml-local-ecat-files:nil End: vim600: syn=xml fen fdm=syntax fdl=2 si vim: et tw=78 syn=sgml vi: ts=1 sw=1 --> http://cvs.php.net/co.php/phpdoc/en/reference/oci8/functions/oci-commit.xml?r=1.1&p=1 Index: phpdoc/en/reference/oci8/functions/oci-commit.xml +++ phpdoc/en/reference/oci8/functions/oci-commit.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- $Revision: 1.1 $ --> <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 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 ('Maxim', 'Maletsky') "); /* Execute statement OCI_DEFAULT tells oci_execute() not to commit statement immediately */ oci_execute($stmt, OCI_DEFAULT); /* .... Parsing and executing other statements here ... .... */ // Commit transaction $committed = oci_commit($conn); // Test whether commit was successful. If error occurred, return error message if (!$committed) { $error = oci_error($conn); echo 'Commit failed. Oracle reports: ' . $error['message']; } ?> ]]> </programlisting> </example> </para> <para> &return.success; </para> <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: mode: sgml sgml-omittag:t sgml-shorttag:t sgml-minimize-attributes:nil sgml-always-quote-attributes:t sgml-indent-step:1 sgml-indent-data:t indent-tabs-mode:nil sgml-parent-document:nil sgml-default-dtd-file:"../../../../manual.ced" sgml-exposed-tags:nil sgml-local-catalogs:nil sgml-local-ecat-files:nil End: vim600: syn=xml fen fdm=syntax fdl=2 si vim: et tw=78 syn=sgml vi: ts=1 sw=1 --> http://cvs.php.net/co.php/phpdoc/en/reference/oci8/functions/oci-connect.xml?r=1.1&p=1 Index: phpdoc/en/reference/oci8/functions/oci-connect.xml +++ phpdoc/en/reference/oci8/functions/oci-connect.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- $Revision: 1.1 $ --> <refentry id="function.oci-connect"> <refnamediv> <refname>oci_connect</refname> <refpurpose>Establishes a connection to 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> </methodsynopsis> <para> <function>oci_connect</function> returns 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> <note> <simpara> <function>oci_connect</function> <emphasis>does not</emphasis> reestablish connection, if connection with such parameters was established before. In this case, <function>oci_connect</function> will return identifier of previously opened connection. This means, that you cannot use this function to separate transactions. But if really you want to separate them, you can use <function>oci_new_connect</function>. </simpara> </note> <para> <example> <title><function>oci_connect</function> example</title> <programlisting role="php"> <![CDATA[ <?php echo "<pre>"; $db = ""; $c1 = oci_connect("scott", "tiger", $db); $c2 = oci_connect("scott", "tiger", $db); 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) { $stmt = oci_parse($conn, "drop table scott.hallo"); oci_execute($stmt); echo $conn . " dropped table\n\n"; } function insert_data($conn) { $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) { $stmt = oci_parse($conn, "delete from scott.hallo"); oci_execute($stmt, OCI_DEFAULT); echo $conn . " deleted hallo\n\n"; } function commit($conn) { oci_commit($conn); echo $conn . " committed\n\n"; } function rollback($conn) { oci_rollback($conn); echo $conn . " rollback\n\n"; } function select_data($conn) { $stmt = oci_parse($conn, "select * from scott.hallo"); oci_execute($stmt, OCI_DEFAULT); echo $conn."----selecting\n\n"; while (oci_fetch($stmt)) { echo $conn . " [" . oci_result($stmt, "TEST") . "]\n\n"; } echo $conn . "----done\n\n"; } create_table($c1); 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); rollback($c1); // Rollback using c1 select_data($c1); // Both inserts have been rolled back select_data($c2); insert_data($c2); // Insert a row using c2 commit($c2); // Commit using c2 select_data($c1); // Result of c2 insert is returned delete_data($c1); // Delete all rows in table using c1 select_data($c1); // No rows returned select_data($c2); // No rows returned commit($c1); // Commit using c1 select_data($c1); // No rows returned select_data($c2); // No rows returned drop_table($c1); echo "</pre>"; ?> ]]> </programlisting> </example> </para> <para> <function>oci_connect</function> returns &false; if an error occured. </para> <simpara> See also <function>oci_pconnect</function> and <function>oci_new_connect</function>. </simpara> </refsect1> </refentry> <!-- Keep this comment at the end of the file Local variables: mode: sgml sgml-omittag:t sgml-shorttag:t sgml-minimize-attributes:nil sgml-always-quote-attributes:t sgml-indent-step:1 sgml-indent-data:t indent-tabs-mode:nil sgml-parent-document:nil sgml-default-dtd-file:"../../../../manual.ced" sgml-exposed-tags:nil sgml-local-catalogs:nil sgml-local-ecat-files:nil End: vim600: syn=xml fen fdm=syntax fdl=2 si vim: et tw=78 syn=sgml vi: ts=1 sw=1 --> http://cvs.php.net/co.php/phpdoc/en/reference/oci8/functions/oci-define-by-name.xml?r=1.1&p=1 Index: phpdoc/en/reference/oci8/functions/oci-define-by-name.xml +++ phpdoc/en/reference/oci8/functions/oci-define-by-name.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- $Revision: 1.1 $ --> <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>&amp;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. Be careful that Oracle uses ALL-UPPERCASE column names, whereby in your select you can also write 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 given! </para> <para> If you need to define an abstract datatype (LOB/ROWID/BFILE) you need to 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) */ $conn = oci_connect("scott", "tiger"); $stmt = oci_parse($conn, "SELECT empno, ename FROM emp"); /* the define MUST be done BEFORE oci_execute! */ oci_define_by_name($stmt, "EMPNO", $empno); oci_define_by_name($stmt, "ENAME", $ename); oci_execute($stmt); while (oci_fetch($stmt)) { echo "empno:" . $empno . "\n"; echo "ename:" . $ename . "\n"; } oci_free_statement($stmt); oci_close($conn); ?> ]]> </programlisting> </example> </refsect1> </refentry> <!-- Keep this comment at the end of the file Local variables: mode: sgml sgml-omittag:t sgml-shorttag:t sgml-minimize-attributes:nil sgml-always-quote-attributes:t sgml-indent-step:1 sgml-indent-data:t indent-tabs-mode:nil sgml-parent-document:nil sgml-default-dtd-file:"../../../../manual.ced" sgml-exposed-tags:nil sgml-local-catalogs:nil sgml-local-ecat-files:nil End: vim600: syn=xml fen fdm=syntax fdl=2 si vim: et tw=78 syn=sgml vi: ts=1 sw=1 --> http://cvs.php.net/co.php/phpdoc/en/reference/oci8/functions/oci-error.xml?r=1.1&p=1 Index: phpdoc/en/reference/oci8/functions/oci-error.xml +++ phpdoc/en/reference/oci8/functions/oci-error.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- $Revision: 1.1 $ --> <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>ocierror</methodname> <methodparam choice="opt"><type>resource</type><parameter>source</parameter></methodparam> </methodsynopsis> <para> <function>oci_error</function> returns the last error found. If the optional <parameter>source</parameter> is not provided, the last error encountered is returned. You can use connection or statement resources as value of parameter <parameter>source</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> </refsect1> </refentry> <!-- Keep this comment at the end of the file Local variables: mode: sgml sgml-omittag:t sgml-shorttag:t sgml-minimize-attributes:nil sgml-always-quote-attributes:t sgml-indent-step:1 sgml-indent-data:t indent-tabs-mode:nil sgml-parent-document:nil sgml-default-dtd-file:"../../../../manual.ced" sgml-exposed-tags:nil sgml-local-catalogs:nil sgml-local-ecat-files:nil End: vim600: syn=xml fen fdm=syntax fdl=2 si vim: et tw=78 syn=sgml vi: ts=1 sw=1 --> http://cvs.php.net/co.php/phpdoc/en/reference/oci8/functions/oci-execute.xml?r=1.1&p=1 Index: phpdoc/en/reference/oci8/functions/oci-execute.xml +++ phpdoc/en/reference/oci8/functions/oci-execute.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- $Revision: 1.1 $ --> <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> &return.success; </para> </refsect1> </refentry> <!-- Keep this comment at the end of the file Local variables: mode: sgml sgml-omittag:t sgml-shorttag:t sgml-minimize-attributes:nil sgml-always-quote-attributes:t sgml-indent-step:1 sgml-indent-data:t indent-tabs-mode:nil sgml-parent-document:nil sgml-default-dtd-file:"../../../../manual.ced" sgml-exposed-tags:nil sgml-local-catalogs:nil sgml-local-ecat-files:nil End: vim600: syn=xml fen fdm=syntax fdl=2 si vim: et tw=78 syn=sgml vi: ts=1 sw=1 --> http://cvs.php.net/co.php/phpdoc/en/reference/oci8/functions/oci-fetch-all.xml?r=1.1&p=1 Index: phpdoc/en/reference/oci8/functions/oci-fetch-all.xml +++ phpdoc/en/reference/oci8/functions/oci-fetch-all.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- $Revision: 1.1 $ --> <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>&amp;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 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> <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) */ $conn = oci_connect("scott", "tiger"); $stmt = oci_parse($conn, "select * from emp"); oci_execute($stmt); $nrows = oci_fetch_all($stmt, $results); if ($nrows > 0) { echo "<table border=\"1\">\n"; echo "<tr>\n"; while (list($key, $val) = each($results)) { echo "<th>$key</th>\n"; } echo "</tr>\n"; for ($i = 0; $i < $nrows; $i++) { reset($results); echo "<tr>\n"; while ($column = each($results)) { $data = $column['value']; echo "<td>$data[$i]</td>\n"; } echo "</tr>\n"; } 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> <para> <function>oci_fetch_all</function> returns &false; in case of error. </para> </refsect1> </refentry> <!-- Keep this comment at the end of the file Local variables: mode: sgml sgml-omittag:t sgml-shorttag:t sgml-minimize-attributes:nil sgml-always-quote-attributes:t sgml-indent-step:1 sgml-indent-data:t indent-tabs-mode:nil sgml-parent-document:nil sgml-default-dtd-file:"../../../../manual.ced" sgml-exposed-tags:nil sgml-local-catalogs:nil sgml-local-ecat-files:nil End: vim600: syn=xml fen fdm=syntax fdl=2 si vim: et tw=78 syn=sgml vi: ts=1 sw=1 --> http://cvs.php.net/co.php/phpdoc/en/reference/oci8/functions/oci-fetch-array.xml?r=1.1&p=1 Index: phpdoc/en/reference/oci8/functions/oci-fetch-array.xml +++ phpdoc/en/reference/oci8/functions/oci-fetch-array.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- $Revision: 1.1 $ --> <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 is no more rows in the result. </para> <para> <function>oci_fetch_array</function> returns an array with both associative and numeric indices. </para> <para> Optional second paramater 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> Don't forget, that 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"); $query = "SELECT id, name FROM fruits"; $statement = oci_parse ($connection, $query); oci_execute ($statement); while ($row = oci_fetch_array ($statement, OCI_BOTH)) { echo $row[0]." and ".$row['ID']." is the same<br>"; echo $row[1]." and ".$row['NAME']." is the same<br>"; } ?> ]]> </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"); $query = "SELECT id, name, lob_field FROM fruits"; $statement = oci_parse ($connection, $query); oci_execute ($statement); while ($row = oci_fetch_array ($statement, OCI_NUM)) { echo $row[0]."<br>"; echo $row[1]."<br>"; echo $row[2]->read(100)."<br>"; //this will output first 100 bytes from LOB } ?> ]]> </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"); $query = "SELECT id, name, lob_field FROM fruits"; $statement = oci_parse ($connection, $query); oci_execute ($statement); while ($row = oci_fetch_array ($statement, OCI_NUM)) { echo $row['ID']."<br>"; echo $row['NAME']."<br>"; echo $row['LOB_FIELD']."<br>"; //this will output "Object id #1" } ?> ]]> </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"); $query = "SELECT id, name, lob_field FROM fruits"; $statement = oci_parse ($connection, $query); oci_execute ($statement); while ($row = oci_fetch_array ($statement, OCI_NUM)) { echo $row[0]."<br>"; echo $row[1]."<br>"; echo $row['LOB_FIELD']."<br>"; //this will output LOB's content } ?> ]]> </programlisting> </example> </para> <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: mode: sgml sgml-omittag:t sgml-shorttag:t sgml-minimize-attributes:nil sgml-always-quote-attributes:t sgml-indent-step:1 sgml-indent-data:t indent-tabs-mode:nil sgml-parent-document:nil sgml-default-dtd-file:"../../../../manual.ced" sgml-exposed-tags:nil sgml-local-catalogs:nil sgml-local-ecat-files:nil End: vim600: syn=xml fen fdm=syntax fdl=2 si vim: et tw=78 syn=sgml vi: ts=1 sw=1 --> http://cvs.php.net/co.php/phpdoc/en/reference/oci8/functions/oci-fetch-assoc.xml?r=1.1&p=1 Index: phpdoc/en/reference/oci8/functions/oci-fetch-assoc.xml +++ phpdoc/en/reference/oci8/functions/oci-fetch-assoc.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- $Revision: 1.1 $ --> <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> <para> Subsequent call to <function>oci_fetch_assoc</function> will return next row or &false; if there is no more rows. </para> <note> <simpara> Don't forget, that Oracle returns all field names in uppercase and associative indices in the result array will be uppercased too. </simpara> </note> <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: mode: sgml sgml-omittag:t sgml-shorttag:t sgml-minimize-attributes:nil sgml-always-quote-attributes:t sgml-indent-step:1 sgml-indent-data:t indent-tabs-mode:nil sgml-parent-document:nil sgml-default-dtd-file:"../../../../manual.ced" sgml-exposed-tags:nil sgml-local-catalogs:nil sgml-local-ecat-files:nil End: vim600: syn=xml fen fdm=syntax fdl=2 si vim: et tw=78 syn=sgml vi: ts=1 sw=1 --> http://cvs.php.net/co.php/phpdoc/en/reference/oci8/functions/oci-fetch-object.xml?r=1.1&p=1 Index: phpdoc/en/reference/oci8/functions/oci-fetch-object.xml +++ phpdoc/en/reference/oci8/functions/oci-fetch-object.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- $Revision: 1.1 $ --> <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> <para> Subsequent call to <function>oci_fetch_object</function> will return next row from the result or &false; if there is no more rows. </para> <note> <simpara> Don't forget, that Oracle returns all field names in uppercase and attributes' names in the result object will be uppercased too. </simpara> </note> <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: mode: sgml sgml-omittag:t sgml-shorttag:t sgml-minimize-attributes:nil sgml-always-quote-attributes:t sgml-indent-step:1 sgml-indent-data:t indent-tabs-mode:nil sgml-parent-document:nil sgml-default-dtd-file:"../../../../manual.ced" sgml-exposed-tags:nil sgml-local-catalogs:nil sgml-local-ecat-files:nil End: vim600: syn=xml fen fdm=syntax fdl=2 si vim: et tw=78 syn=sgml vi: ts=1 sw=1 --> http://cvs.php.net/co.php/phpdoc/en/reference/oci8/functions/oci-fetch-row.xml?r=1.1&p=1 Index: phpdoc/en/reference/oci8/functions/oci-fetch-row.xml +++ phpdoc/en/reference/oci8/functions/oci-fetch-row.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- $Revision: 1.1 $ --> <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> Call to <function>oci_fetch_row</function> is identical to call 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> <para> Subsequent call to <function>oci_fetch_row</function> will return next row from the result data or &false; if there is no more rows. </para> <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: mode: sgml sgml-omittag:t sgml-shorttag:t sgml-minimize-attributes:nil sgml-always-quote-attributes:t sgml-indent-step:1 sgml-indent-data:t indent-tabs-mode:nil sgml-parent-document:nil sgml-default-dtd-file:"../../../../manual.ced" sgml-exposed-tags:nil sgml-local-catalogs:nil sgml-local-ecat-files:nil End: vim600: syn=xml fen fdm=syntax fdl=2 si vim: et tw=78 syn=sgml vi: ts=1 sw=1 --> http://cvs.php.net/co.php/phpdoc/en/reference/oci8/functions/oci-fetch.xml?r=1.1&p=1 Index: phpdoc/en/reference/oci8/functions/oci-fetch.xml +++ phpdoc/en/reference/oci8/functions/oci-fetch.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- $Revision: 1.1 $ --> <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> </refsect1> </refentry> <!-- Keep this comment at the end of the file Local variables: mode: sgml sgml-omittag:t sgml-shorttag:t sgml-minimize-attributes:nil sgml-always-quote-attributes:t sgml-indent-step:1 sgml-indent-data:t indent-tabs-mode:nil sgml-parent-document:nil sgml-default-dtd-file:"../../../../manual.ced" sgml-exposed-tags:nil sgml-local-catalogs:nil sgml-local-ecat-files:nil End: vim600: syn=xml fen fdm=syntax fdl=2 si vim: et tw=78 syn=sgml vi: ts=1 sw=1 --> http://cvs.php.net/co.php/phpdoc/en/reference/oci8/functions/oci-field-is-null.xml?r=1.1&p=1 Index: phpdoc/en/reference/oci8/functions/oci-field-is-null.xml +++ phpdoc/en/reference/oci8/functions/oci-field-is-null.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- $Revision: 1.1 $ --> <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> </refsect1> </refentry> <!-- Keep this comment at the end of the file Local variables: mode: sgml sgml-omittag:t sgml-shorttag:t sgml-minimize-attributes:nil sgml-always-quote-attributes:t sgml-indent-step:1 sgml-indent-data:t indent-tabs-mode:nil sgml-parent-document:nil sgml-default-dtd-file:"../../../../manual.ced" sgml-exposed-tags:nil sgml-local-catalogs:nil sgml-local-ecat-files:nil End: vim600: syn=xml fen fdm=syntax fdl=2 si vim: et tw=78 syn=sgml vi: ts=1 sw=1 --> http://cvs.php.net/co.php/phpdoc/en/reference/oci8/functions/oci-field-name.xml?r=1.1&p=1 Index: phpdoc/en/reference/oci8/functions/oci-field-name.xml +++ phpdoc/en/reference/oci8/functions/oci-field-name.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- $Revision: 1.1 $ --> <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) that is passed in. </para> <para> <example> <title><function>oci_field_name</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\">"; 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); ?> ]]> </programlisting> </example> </para> <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: mode: sgml sgml-omittag:t sgml-shorttag:t sgml-minimize-attributes:nil sgml-always-quote-attributes:t sgml-indent-step:1 sgml-indent-data:t indent-tabs-mode:nil sgml-parent-document:nil sgml-default-dtd-file:"../../../../manual.ced" sgml-exposed-tags:nil sgml-local-catalogs:nil sgml-local-ecat-files:nil End: vim600: syn=xml fen fdm=syntax fdl=2 si vim: et tw=78 syn=sgml vi: ts=1 sw=1 --> http://cvs.php.net/co.php/phpdoc/en/reference/oci8/functions/oci-field-precision.xml?r=1.1&p=1 Index: phpdoc/en/reference/oci8/functions/oci-field-precision.xml +++ phpdoc/en/reference/oci8/functions/oci-field-precision.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- $Revision: 1.1 $ --> <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 columnt is NUMBER. Else it's NUMBER(precision, scale). </para> <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: mode: sgml sgml-omittag:t sgml-shorttag:t sgml-minimize-attributes:nil sgml-always-quote-attributes:t sgml-indent-step:1 sgml-indent-data:t indent-tabs-mode:nil sgml-parent-document:nil sgml-default-dtd-file:"../../../../manual.ced" sgml-exposed-tags:nil sgml-local-catalogs:nil sgml-local-ecat-files:nil End: vim600: syn=xml fen fdm=syntax fdl=2 si vim: et tw=78 syn=sgml vi: ts=1 sw=1 --> http://cvs.php.net/co.php/phpdoc/en/reference/oci8/functions/oci-field-scale.xml?r=1.1&p=1 Index: phpdoc/en/reference/oci8/functions/oci-field-scale.xml +++ phpdoc/en/reference/oci8/functions/oci-field-scale.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- $Revision: 1.1 $ --> <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 columnt is NUMBER. Else it's NUMBER(precision, scale). </para> <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: mode: sgml sgml-omittag:t sgml-shorttag:t sgml-minimize-attributes:nil sgml-always-quote-attributes:t sgml-indent-step:1 sgml-indent-data:t indent-tabs-mode:nil sgml-parent-document:nil sgml-default-dtd-file:"../../../../manual.ced" sgml-exposed-tags:nil sgml-local-catalogs:nil sgml-local-ecat-files:nil End: vim600: syn=xml fen fdm=syntax fdl=2 si vim: et tw=78 syn=sgml vi: ts=1 sw=1 --> http://cvs.php.net/co.php/phpdoc/en/reference/oci8/functions/oci-field-size.xml?r=1.1&p=1 Index: phpdoc/en/reference/oci8/functions/oci-field-size.xml +++ phpdoc/en/reference/oci8/functions/oci-field-size.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- $Revision: 1.1 $ --> <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 the column 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 $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>"; oci_free_statement($stmt); oci_close($conn); ?> ]]> </programlisting> </example> </para> <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: mode: sgml sgml-omittag:t sgml-shorttag:t sgml-minimize-attributes:nil sgml-always-quote-attributes:t sgml-indent-step:1 sgml-indent-data:t indent-tabs-mode:nil sgml-parent-document:nil sgml-default-dtd-file:"../../../../manual.ced" sgml-exposed-tags:nil sgml-local-catalogs:nil sgml-local-ecat-files:nil End: vim600: syn=xml fen fdm=syntax fdl=2 si vim: et tw=78 syn=sgml vi: ts=1 sw=1 --> http://cvs.php.net/co.php/phpdoc/en/reference/oci8/functions/oci-field-type-raw.xml?r=1.1&p=1 Index: phpdoc/en/reference/oci8/functions/oci-field-type-raw.xml +++ phpdoc/en/reference/oci8/functions/oci-field-type-raw.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- $Revision: 1.1 $ --> <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> <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: mode: sgml sgml-omittag:t sgml-shorttag:t sgml-minimize-attributes:nil sgml-always-quote-attributes:t sgml-indent-step:1 sgml-indent-data:t indent-tabs-mode:nil sgml-parent-document:nil sgml-default-dtd-file:"../../../../manual.ced" sgml-exposed-tags:nil sgml-local-catalogs:nil sgml-local-ecat-files:nil End: vim600: syn=xml fen fdm=syntax fdl=2 si vim: et tw=78 syn=sgml vi: ts=1 sw=1 --> http://cvs.php.net/co.php/phpdoc/en/reference/oci8/functions/oci-field-type.xml?r=1.1&p=1 Index: phpdoc/en/reference/oci8/functions/oci-field-type.xml +++ phpdoc/en/reference/oci8/functions/oci-field-type.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- $Revision: 1.1 $ --> <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>ocicolumntype</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 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\">"; 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); ?> ]]> </programlisting> </example> </para> <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: mode: sgml sgml-omittag:t sgml-shorttag:t sgml-minimize-attributes:nil sgml-always-quote-attributes:t sgml-indent-step:1 sgml-indent-data:t indent-tabs-mode:nil sgml-parent-document:nil sgml-default-dtd-file:"../../../../manual.ced" sgml-exposed-tags:nil sgml-local-catalogs:nil sgml-local-ecat-files:nil End: vim600: syn=xml fen fdm=syntax fdl=2 si vim: et tw=78 syn=sgml vi: ts=1 sw=1 --> http://cvs.php.net/co.php/phpdoc/en/reference/oci8/functions/oci-free-collection.xml?r=1.1&p=1 Index: phpdoc/en/reference/oci8/functions/oci-free-collection.xml +++ phpdoc/en/reference/oci8/functions/oci-free-collection.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- $Revision: 1.1 $ --> <refentry id="function.oci-free-collection"> <refnamediv> <refname>collection->free</refname> <refpurpose>Frees resources associated with collection object</refpurpose> </refnamediv> <refsect1> <title>Description</title> <methodsynopsis> <type>bool</type><methodname>collection->free</methodname> <void /> </methodsynopsis> <para> Frees resources associated with collection object. </para> <para> &return.success; </para> </refsect1> </refentry> <!-- Keep this comment at the end of the file Local variables: mode: sgml sgml-omittag:t sgml-shorttag:t sgml-minimize-attributes:nil sgml-always-quote-attributes:t sgml-indent-step:1 sgml-indent-data:t indent-tabs-mode:nil sgml-parent-document:nil sgml-default-dtd-file:"../../../../manual.ced" sgml-exposed-tags:nil sgml-local-catalogs:nil sgml-local-ecat-files:nil End: vim600: syn=xml fen fdm=syntax fdl=2 si vim: et tw=78 syn=sgml vi: ts=1 sw=1 --> http://cvs.php.net/co.php/phpdoc/en/reference/oci8/functions/oci-free-descriptor.xml?r=1.1&p=1 Index: phpdoc/en/reference/oci8/functions/oci-free-descriptor.xml +++ phpdoc/en/reference/oci8/functions/oci-free-descriptor.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- $Revision: 1.1 $ --> <refentry id="function.oci-free-descriptor"> <refnamediv> <refname>descriptor->free</refname> <refpurpose>Frees resources associated with descriptor</refpurpose> </refnamediv> <refsect1> <title>Description</title> <methodsynopsis> <type>bool</type><methodname>descriptor->free</methodname> <void /> </methodsynopsis> <para> <function>descriptor->free</function> frees resources associated with descriptor, previously allocated with <function>oci_new_descriptor</function>. </para> <para> &return.success; </para> </refsect1> </refentry> <!-- Keep this comment at the end of the file Local variables: mode: sgml sgml-omittag:t sgml-shorttag:t sgml-minimize-attributes:nil sgml-always-quote-attributes:t sgml-indent-step:1 sgml-indent-data:t indent-tabs-mode:nil sgml-parent-document:nil sgml-default-dtd-file:"../../../../manual.ced" sgml-exposed-tags:nil sgml-local-catalogs:nil sgml-local-ecat-files:nil End: vim600: syn=xml fen fdm=syntax fdl=2 si vim: et tw=78 syn=sgml vi: ts=1 sw=1 --> http://cvs.php.net/co.php/phpdoc/en/reference/oci8/functions/oci-free-statement.xml?r=1.1&p=1 Index: phpdoc/en/reference/oci8/functions/oci-free-statement.xml +++ phpdoc/en/reference/oci8/functions/oci-free-statement.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- $Revision: 1.1 $ --> <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> <!-- Keep this comment at the end of the file Local variables: mode: sgml sgml-omittag:t sgml-shorttag:t sgml-minimize-attributes:nil sgml-always-quote-attributes:t sgml-indent-step:1 sgml-indent-data:t indent-tabs-mode:nil sgml-parent-document:nil sgml-default-dtd-file:"../../../../manual.ced" sgml-exposed-tags:nil sgml-local-catalogs:nil sgml-local-ecat-files:nil End: vim600: syn=xml fen fdm=syntax fdl=2 si vim: et tw=78 syn=sgml vi: ts=1 sw=1 --> http://cvs.php.net/co.php/phpdoc/en/reference/oci8/functions/oci-internal-debug.xml?r=1.1&p=1 Index: phpdoc/en/reference/oci8/functions/oci-internal-debug.xml +++ phpdoc/en/reference/oci8/functions/oci-internal-debug.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- $Revision: 1.1 $ --> <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> <simpara> <function>oci_internal_debug</function> enables internal debug output. Set <parameter>onoff</parameter> to 0 to turn debug output off and 1 to turn it on. </simpara> </refsect1> </refentry> <!-- Keep this comment at the end of the file Local variables: mode: sgml sgml-omittag:t sgml-shorttag:t sgml-minimize-attributes:nil sgml-always-quote-attributes:t sgml-indent-step:1 sgml-indent-data:t indent-tabs-mode:nil sgml-parent-document:nil sgml-default-dtd-file:"../../../../manual.ced" sgml-exposed-tags:nil sgml-local-catalogs:nil sgml-local-ecat-files:nil End: vim600: syn=xml fen fdm=syntax fdl=2 si vim: et tw=78 syn=sgml vi: ts=1 sw=1 --> http://cvs.php.net/co.php/phpdoc/en/reference/oci8/functions/oci-lob-append.xml?r=1.1&p=1 Index: phpdoc/en/reference/oci8/functions/oci-lob-append.xml +++ phpdoc/en/reference/oci8/functions/oci-lob-append.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- $Revision: 1.1 $ --> <refentry id="function.oci-lob-append"> <refnamediv> <refname>lob->append</refname> <refpurpose>Appends data from the large object to another large object</refpurpose> </refnamediv> <refsect1> <title>Description</title> <methodsynopsis> <type>boolean</type><methodname>lob->append</methodname> <methodparam><type>object</type><parameter>lob_from</parameter></methodparam> </methodsynopsis> <para> Appends data from the large object to the end of another large object. </para> <para> Writing to the large object with <function>lob->append</function> will fail, if buffering was enabled before. So, you <emphasis>have to</emphasis> disable buffering before appending. Probably you'll need to flush buffers with <function>oci_lob_flush</function> before disabling buffering. </para> <para> &return.success; </para> <para> See also <function>oci_lob_flush</function>, <function>ocisetbufferinglob</function> and <function>ocigetbufferinglob</function>. </para> </refsect1> </refentry> <!-- Keep this comment at the end of the file Local variables: mode: sgml sgml-omittag:t sgml-shorttag:t sgml-minimize-attributes:nil sgml-always-quote-attributes:t sgml-indent-step:1 sgml-indent-data:t indent-tabs-mode:nil sgml-parent-document:nil sgml-default-dtd-file:"../../../../manual.ced" sgml-exposed-tags:nil sgml-local-catalogs:nil sgml-local-ecat-files:nil End: vim600: syn=xml fen fdm=syntax fdl=2 si vim: et tw=78 syn=sgml vi: ts=1 sw=1 --> http://cvs.php.net/co.php/phpdoc/en/reference/oci8/functions/oci-lob-close.xml?r=1.1&p=1 Index: phpdoc/en/reference/oci8/functions/oci-lob-close.xml +++ phpdoc/en/reference/oci8/functions/oci-lob-close.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- $Revision: 1.1 $ --> <refentry id="function.oci-lob-close"> <refnamediv> <refname>lob->close</refname> <refpurpose>Closes LOB descriptor</refpurpose> </refnamediv> <refsect1> <title>Description</title> <methodsynopsis> <type>bool</type><methodname>lob->close</methodname> <void /> </methodsynopsis> <para> <function>lob->close</function> closes descriptor of LOB or FILE. This function should be used only with <function>lob->writeTemporary</function>. </para> <para> &return.success; </para> <para> See also <function>oci_lob_write_temporary</function> </para> </refsect1> </refentry> <!-- Keep this comment at the end of the file Local variables: mode: sgml sgml-omittag:t sgml-shorttag:t sgml-minimize-attributes:nil sgml-always-quote-attributes:t sgml-indent-step:1 sgml-indent-data:t indent-tabs-mode:nil sgml-parent-document:nil sgml-default-dtd-file:"../../../../manual.ced" sgml-exposed-tags:nil sgml-local-catalogs:nil sgml-local-ecat-files:nil End: vim600: syn=xml fen fdm=syntax fdl=2 si vim: et tw=78 syn=sgml vi: ts=1 sw=1 --> http://cvs.php.net/co.php/phpdoc/en/reference/oci8/functions/oci-lob-copy.xml?r=1.1&p=1 Index: phpdoc/en/reference/oci8/functions/oci-lob-copy.xml +++ phpdoc/en/reference/oci8/functions/oci-lob-copy.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- $Revision: 1.1 $ --> <refentry id="function.oci-lob-copy"> <refnamediv> <refname>oci_lob_copy</refname> <refpurpose>Copies large object</refpurpose> </refnamediv> <refsect1> <title>Description</title> <methodsynopsis> <type>int</type><methodname>oci_lob_copy</methodname> <methodparam choice="opt"><type>int</type><parameter>length</parameter></methodparam> </methodsynopsis> <para> Copies large object or a part of large object to another large object. Parameter <parameter>length</parameter> indicates the length of data to be copied. Old data of LOB-recipient will be overwritten. </para> <para> If you need to copy a particular part of LOB to a particular position of LOB, you can use <function>oci_lob_seek</function> to move internal pointers of LOBs. </para> <para> &return.success; </para> </refsect1> </refentry> <!-- Keep this comment at the end of the file Local variables: mode: sgml sgml-omittag:t sgml-shorttag:t sgml-minimize-attributes:nil sgml-always-quote-attributes:t sgml-indent-step:1 sgml-indent-data:t indent-tabs-mode:nil sgml-parent-document:nil sgml-default-dtd-file:"../../../../manual.ced" sgml-exposed-tags:nil sgml-local-catalogs:nil sgml-local-ecat-files:nil End: vim600: syn=xml fen fdm=syntax fdl=2 si vim: et tw=78 syn=sgml vi: ts=1 sw=1 --> http://cvs.php.net/co.php/phpdoc/en/reference/oci8/functions/oci-lob-eof.xml?r=1.1&p=1 Index: phpdoc/en/reference/oci8/functions/oci-lob-eof.xml +++ phpdoc/en/reference/oci8/functions/oci-lob-eof.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- $Revision: 1.1 $ --> <refentry id="function.oci-lob-eof"> <refnamediv> <refname>lob->eof</refname> <refpurpose>Tests for end-of-file on a large object's descriptor</refpurpose> </refnamediv> <refsect1> <title>Description</title> <methodsynopsis> <type>boolean</type><methodname>lob->eof</methodname> <void /> </methodsynopsis> <para> Returns &true; if internal pointer of large object is at the end of LOB. Otherwise returns &false;. </para> <para> See also <function>oci_lob_size</function>. </para> </refsect1> </refentry> <!-- Keep this comment at the end of the file Local variables: mode: sgml sgml-omittag:t sgml-shorttag:t sgml-minimize-attributes:nil sgml-always-quote-attributes:t sgml-indent-step:1 sgml-indent-data:t indent-tabs-mode:nil sgml-parent-document:nil sgml-default-dtd-file:"../../../../manual.ced" sgml-exposed-tags:nil sgml-local-catalogs:nil sgml-local-ecat-files:nil End: vim600: syn=xml fen fdm=syntax fdl=2 si vim: et tw=78 syn=sgml vi: ts=1 sw=1 --> http://cvs.php.net/co.php/phpdoc/en/reference/oci8/functions/oci-lob-erase.xml?r=1.1&p=1 Index: phpdoc/en/reference/oci8/functions/oci-lob-erase.xml +++ phpdoc/en/reference/oci8/functions/oci-lob-erase.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- $Revision: 1.1 $ --> <refentry id="function.oci-lob-erase"> <refnamediv> <refname>lob->erase</refname> <refpurpose>Erases a specified portion of the internal LOB data</refpurpose> </refnamediv> <refsect1> <title>Description</title> <methodsynopsis> <type>int</type><methodname>lob->erase</methodname> <methodparam choice="opt"><type>int</type><parameter>offset</parameter></methodparam> <methodparam choice="opt"><type>int</type><parameter>length</parameter></methodparam> </methodsynopsis> <para> Erases a specified portion of the internal LOB data starting at a specified <parameter>offset</parameter>. Parameters <parameter>length</parameter> and <parameter>offset</parameter> are optional. <function>lob->erase</function> erases all LOB data by default. </para> <para> For BLOBs, erasing means that the existing LOB value is overwritten with zero-bytes. For CLOBs, the existing LOB value is overwritten with spaces. </para> <para> <function>lob->erase</function> returns the actual number of characters/bytes erased or &false; in case of error. </para> </refsect1> </refentry> <!-- Keep this comment at the end of the file Local variables: mode: sgml sgml-omittag:t sgml-shorttag:t sgml-minimize-attributes:nil sgml-always-quote-attributes:t sgml-indent-step:1 sgml-indent-data:t indent-tabs-mode:nil sgml-parent-document:nil sgml-default-dtd-file:"../../../../manual.ced" sgml-exposed-tags:nil sgml-local-catalogs:nil sgml-local-ecat-files:nil End: vim600: syn=xml fen fdm=syntax fdl=2 si vim: et tw=78 syn=sgml vi: ts=1 sw=1 --> http://cvs.php.net/co.php/phpdoc/en/reference/oci8/functions/oci-lob-export.xml?r=1.1&p=1 Index: phpdoc/en/reference/oci8/functions/oci-lob-export.xml +++ phpdoc/en/reference/oci8/functions/oci-lob-export.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- $Revision: 1.1 $ --> <refentry id="function.oci-lob-export"> <refnamediv> <refname>lob->export</refname> <refpurpose>Exports LOB's contents to a file</refpurpose> </refnamediv> <refsect1> <title>Description</title> <methodsynopsis> <type>bool</type><methodname>ociwritelobtofile</methodname> <methodparam><type>string</type><parameter>filename</parameter></methodparam> <methodparam choice="opt"><type>int</type><parameter>start</parameter></methodparam> <methodparam choice="opt"><type>int</type><parameter>length</parameter></methodparam> </methodsynopsis> <para> Exports LOB's contents to a file, which name is given in parameter <parameter>filename</parameter>. Optional parameter <parameter>start</parameter> indicates from what position to start export and parameter <parameter>length</parameter> - length of data to be exported. </para> <para> &return.success; </para> </refsect1> </refentry> <!-- Keep this comment at the end of the file Local variables: mode: sgml sgml-omittag:t sgml-shorttag:t sgml-minimize-attributes:nil sgml-always-quote-attributes:t sgml-indent-step:1 sgml-indent-data:t indent-tabs-mode:nil sgml-parent-document:nil sgml-default-dtd-file:"../../../../manual.ced" sgml-exposed-tags:nil sgml-local-catalogs:nil sgml-local-ecat-files:nil End: vim600: syn=xml fen fdm=syntax fdl=2 si vim: et tw=78 syn=sgml vi: ts=1 sw=1 --> http://cvs.php.net/co.php/phpdoc/en/reference/oci8/functions/oci-lob-flush.xml?r=1.1&p=1 Index: phpdoc/en/reference/oci8/functions/oci-lob-flush.xml +++ phpdoc/en/reference/oci8/functions/oci-lob-flush.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- $Revision: 1.1 $ --> <refentry id="function.oci-lob-flush"> <refnamediv> <refname>lob->flush</refname> <refpurpose>Flushes/writes buffer of the LOB to the server</refpurpose> </refnamediv> <refsect1> <title>Description</title> <methodsynopsis> <type>bool</type><methodname>lob->flush</methodname> <methodparam choice="opt"><type>int</type><parameter>flag</parameter></methodparam> </methodsynopsis> <para> <function>lob->flush</function> actually writes data to the server. By default, resources are not freed, but using flag <constant>OCI_LOB_BUFFER_FREE</constant> you can do it explicitly. Be sure you know what you're doing - next read/write operation to the same part of LOB will involve a round-trip to the server and initialize new buffer resources. That's why it's recommended to use <constant>OCI_LOB_BUFFER_FREE</constant> flag only when you are not going to work with the LOB anymore. </para> <para> <function>lob->flush</function> returns &false; if buffering was not enabled or an error occured. </para> <para> &return.success; </para> </refsect1> </refentry> <!-- Keep this comment at the end of the file Local variables: mode: sgml sgml-omittag:t sgml-shorttag:t sgml-minimize-attributes:nil sgml-always-quote-attributes:t sgml-indent-step:1 sgml-indent-data:t indent-tabs-mode:nil sgml-parent-document:nil sgml-default-dtd-file:"../../../../manual.ced" sgml-exposed-tags:nil sgml-local-catalogs:nil sgml-local-ecat-files:nil End: vim600: syn=xml fen fdm=syntax fdl=2 si vim: et tw=78 syn=sgml vi: ts=1 sw=1 --> http://cvs.php.net/co.php/phpdoc/en/reference/oci8/functions/oci-lob-import.xml?r=1.1&p=1 Index: phpdoc/en/reference/oci8/functions/oci-lob-import.xml +++ phpdoc/en/reference/oci8/functions/oci-lob-import.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- $Revision: 1.1 $ --> <refentry id="function.oci-lob-import"> <refnamediv> <refname>lob->import</refname> <refpurpose>Imports file data to the LOB</refpurpose> </refnamediv> <refsect1> <title>Description</title> <methodsynopsis> <type>bool</type><methodname>lob->import</methodname> <methodparam><type>string</type><parameter>filename</parameter></methodparam> </methodsynopsis> <para> Writes data from <parameter>filename</parameter> in to the current position of large object. </para> <para> &return.success; </para> </refsect1> </refentry> <!-- Keep this comment at the end of the file Local variables: mode: sgml sgml-omittag:t sgml-shorttag:t sgml-minimize-attributes:nil sgml-always-quote-attributes:t sgml-indent-step:1 sgml-indent-data:t indent-tabs-mode:nil sgml-parent-document:nil sgml-default-dtd-file:"../../../../manual.ced" sgml-exposed-tags:nil sgml-local-catalogs:nil sgml-local-ecat-files:nil End: vim600: syn=xml fen fdm=syntax fdl=2 si vim: et tw=78 syn=sgml vi: ts=1 sw=1 --> http://cvs.php.net/co.php/phpdoc/en/reference/oci8/functions/oci-lob-is-equal.xml?r=1.1&p=1 Index: phpdoc/en/reference/oci8/functions/oci-lob-is-equal.xml +++ phpdoc/en/reference/oci8/functions/oci-lob-is-equal.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- $Revision: 1.1 $ --> <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>object</type><parameter>lob1</parameter></methodparam> <methodparam><type>object</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: mode: sgml sgml-omittag:t sgml-shorttag:t sgml-minimize-attributes:nil sgml-always-quote-attributes:t sgml-indent-step:1 sgml-indent-data:t indent-tabs-mode:nil sgml-parent-document:nil sgml-default-dtd-file:"../../../../manual.ced" sgml-exposed-tags:nil sgml-local-catalogs:nil sgml-local-ecat-files:nil End: vim600: syn=xml fen fdm=syntax fdl=2 si vim: et tw=78 syn=sgml vi: ts=1 sw=1 --> http://cvs.php.net/co.php/phpdoc/en/reference/oci8/functions/oci-lob-load.xml?r=1.1&p=1 Index: phpdoc/en/reference/oci8/functions/oci-lob-load.xml +++ phpdoc/en/reference/oci8/functions/oci-lob-load.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- $Revision: 1.1 $ --> <refentry id="function.oci-lob-load"> <refnamediv> <refname>lob->load</refname> <refpurpose>Returns large object's contents</refpurpose> </refnamediv> <refsect1> <title>Description</title> <methodsynopsis> <type>string</type><methodname>lob->load</methodname> <void /> </methodsynopsis> <para> Returns large object's contents. Remember, that really <emphasis>large</emphasis> objects can or cannot fit in a variable, which size is limited with <link linkend="ini.memory-limit">memory_limit</link>. So, in most cases it's recommended to use <function>oci_lob_read</function> instead. In case of error <function>lob->load</function> returns &false;. </para> </refsect1> </refentry> <!-- Keep this comment at the end of the file Local variables: mode: sgml sgml-omittag:t sgml-shorttag:t sgml-minimize-attributes:nil sgml-always-quote-attributes:t sgml-indent-step:1 sgml-indent-data:t indent-tabs-mode:nil sgml-parent-document:nil sgml-default-dtd-file:"../../../../manual.ced" sgml-exposed-tags:nil sgml-local-catalogs:nil sgml-local-ecat-files:nil End: vim600: syn=xml fen fdm=syntax fdl=2 si vim: et tw=78 syn=sgml vi: ts=1 sw=1 --> http://cvs.php.net/co.php/phpdoc/en/reference/oci8/functions/oci-lob-read.xml?r=1.1&p=1 Index: phpdoc/en/reference/oci8/functions/oci-lob-read.xml +++ phpdoc/en/reference/oci8/functions/oci-lob-read.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- $Revision: 1.1 $ --> <refentry id="function.oci-lob-read"> <refnamediv> <refname>lob->read</refname> <refpurpose>Reads part of large object</refpurpose> </refnamediv> <refsect1> <title>Description</title> <methodsynopsis> <type>string</type><methodname>lob->read</methodname> <methodparam><type>int</type><parameter>length</parameter></methodparam> </methodsynopsis> <para> Reads <parameter>length</parameter> bytes from the current position of LOB's internal pointer. Reading stops when <parameter>length</parameter> bytes have been read or end of large object is reached. Internal pointer of large object will be shifted on the amount of bytes have been read. </para> <para> Returns &false; in case of error. </para> <para> See also <function>oci_lob_eof</function>, <function>oci_lob_seek</function>, <function>oci_lob_tell</function> and <function>oci_lob_write</function>. </para> </refsect1> </refentry> <!-- Keep this comment at the end of the file Local variables: mode: sgml sgml-omittag:t sgml-shorttag:t sgml-minimize-attributes:nil sgml-always-quote-attributes:t sgml-indent-step:1 sgml-indent-data:t indent-tabs-mode:nil sgml-parent-document:nil sgml-default-dtd-file:"../../../../manual.ced" sgml-exposed-tags:nil sgml-local-catalogs:nil sgml-local-ecat-files:nil End: vim600: syn=xml fen fdm=syntax fdl=2 si vim: et tw=78 syn=sgml vi: ts=1 sw=1 --> http://cvs.php.net/co.php/phpdoc/en/reference/oci8/functions/oci-lob-rewind.xml?r=1.1&p=1 Index: phpdoc/en/reference/oci8/functions/oci-lob-rewind.xml +++ phpdoc/en/reference/oci8/functions/oci-lob-rewind.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- $Revision: 1.1 $ --> <refentry id="function.oci-lob-rewind"> <refnamediv> <refname>lob->rewind</refname> <refpurpose>Moves the internal pointer to the beginning of the large object</refpurpose> </refnamediv> <refsect1> <title>Description</title> <methodsynopsis> <type>boolean</type><methodname>lob->rewind</methodname> <void /> </methodsynopsis> <para> Sets the internal pointer to the beginning of the large object. </para> <para> &return.success; </para> <para> See also <function>oci_lob_seek</function> and <function>oci_lob_tell</function>. </para> </refsect1> </refentry> <!-- Keep this comment at the end of the file Local variables: mode: sgml sgml-omittag:t sgml-shorttag:t sgml-minimize-attributes:nil sgml-always-quote-attributes:t sgml-indent-step:1 sgml-indent-data:t indent-tabs-mode:nil sgml-parent-document:nil sgml-default-dtd-file:"../../../../manual.ced" sgml-exposed-tags:nil sgml-local-catalogs:nil sgml-local-ecat-files:nil End: vim600: syn=xml fen fdm=syntax fdl=2 si vim: et tw=78 syn=sgml vi: ts=1 sw=1 --> http://cvs.php.net/co.php/phpdoc/en/reference/oci8/functions/oci-lob-save.xml?r=1.1&p=1 Index: phpdoc/en/reference/oci8/functions/oci-lob-save.xml +++ phpdoc/en/reference/oci8/functions/oci-lob-save.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- $Revision: 1.1 $ --> <refentry id="function.oci-lob-save"> <refnamediv> <refname>lob->save</refname> <refpurpose>Saves data to the large object</refpurpose> </refnamediv> <refsect1> <title>Description</title> <methodsynopsis> <type>bool</type><methodname>lob->save</methodname> <methodparam><type>string</type><parameter>data</parameter></methodparam> <methodparam choice="opt"><type>int</type><parameter>offset</parameter></methodparam> </methodsynopsis> <para> Saves <parameter>data</parameter> to the large object. Parameter <parameter>offset</parameter> can be used to indicate offset from the beginning of the large object. </para> <para> &return.success; </para> <para> See also <function>oci_lob_write</function> and <function>oci_lob_import</function>. </para> </refsect1> </refentry> <!-- Keep this comment at the end of the file Local variables: mode: sgml sgml-omittag:t sgml-shorttag:t sgml-minimize-attributes:nil sgml-always-quote-attributes:t sgml-indent-step:1 sgml-indent-data:t indent-tabs-mode:nil sgml-parent-document:nil sgml-default-dtd-file:"../../../../manual.ced" sgml-exposed-tags:nil sgml-local-catalogs:nil sgml-local-ecat-files:nil End: vim600: syn=xml fen fdm=syntax fdl=2 si vim: et tw=78 syn=sgml vi: ts=1 sw=1 --> http://cvs.php.net/co.php/phpdoc/en/reference/oci8/functions/oci-lob-seek.xml?r=1.1&p=1 Index: phpdoc/en/reference/oci8/functions/oci-lob-seek.xml +++ phpdoc/en/reference/oci8/functions/oci-lob-seek.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- $Revision: 1.1 $ --> <refentry id="function.oci-lob-seek"> <refnamediv> <refname>lob->seek</refname> <refpurpose>Sets the internal pointer of the large object</refpurpose> </refnamediv> <refsect1> <title>Description</title> <methodsynopsis> <type>boolean</type><methodname>lob->seek</methodname> <methodparam><type>int</type><parameter>offset</parameter></methodparam> <methodparam choice="opt"><type>int</type><parameter>whence</parameter></methodparam> </methodsynopsis> <para> Sets the internal pointer of the large object. Parameter <parameter>offset</parameter> indicates the amount of bytes, on which internal pointer should be moved from the position, pointed by <parameter>whence</parameter>: <simplelist> <member> <constant>OCI_SEEK_SET</constant> - sets the position equal to <parameter>offset</parameter> </member> <member> <constant>OCI_SEEK_CUR</constant> - adds <parameter>offset</parameter> bytes to the current position </member> <member> <constant>OCI_SEEK_END</constant> - adds <parameter>offset</parameter> bytes to the end of large object (use negative value to move to a position before the end of large object) </member> </simplelist> </para> <para> See also <function>oci_lob_rewind</function> and <function>oci_lob_tell</function>. </para> </refsect1> </refentry> <!-- Keep this comment at the end of the file Local variables: mode: sgml sgml-omittag:t sgml-shorttag:t sgml-minimize-attributes:nil sgml-always-quote-attributes:t sgml-indent-step:1 sgml-indent-data:t indent-tabs-mode:nil sgml-parent-document:nil sgml-default-dtd-file:"../../../../manual.ced" sgml-exposed-tags:nil sgml-local-catalogs:nil sgml-local-ecat-files:nil End: vim600: syn=xml fen fdm=syntax fdl=2 si vim: et tw=78 syn=sgml vi: ts=1 sw=1 --> http://cvs.php.net/co.php/phpdoc/en/reference/oci8/functions/oci-lob-size.xml?r=1.1&p=1 Index: phpdoc/en/reference/oci8/functions/oci-lob-size.xml +++ phpdoc/en/reference/oci8/functions/oci-lob-size.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- $Revision: 1.1 $ --> <refentry id="function.oci-lob-size"> <refnamediv> <refname>lob->size</refname> <refpurpose>Returns size of large object</refpurpose> </refnamediv> <refsect1> <title>Description</title> <methodsynopsis> <type>int</type><methodname>lob->size</methodname> <void /> </methodsynopsis> <para> Returns length of large object value or &false; in case of error. Empty objects have zero length. </para> </refsect1> </refentry> <!-- Keep this comment at the end of the file Local variables: mode: sgml sgml-omittag:t sgml-shorttag:t sgml-minimize-attributes:nil sgml-always-quote-attributes:t sgml-indent-step:1 sgml-indent-data:t indent-tabs-mode:nil sgml-parent-document:nil sgml-default-dtd-file:"../../../../manual.ced" sgml-exposed-tags:nil sgml-local-catalogs:nil sgml-local-ecat-files:nil End: vim600: syn=xml fen fdm=syntax fdl=2 si vim: et tw=78 syn=sgml vi: ts=1 sw=1 --> http://cvs.php.net/co.php/phpdoc/en/reference/oci8/functions/oci-lob-tell.xml?r=1.1&p=1 Index: phpdoc/en/reference/oci8/functions/oci-lob-tell.xml +++ phpdoc/en/reference/oci8/functions/oci-lob-tell.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- $Revision: 1.1 $ --> <refentry id="function.oci-lob-tell"> <refnamediv> <refname>lob->tell</refname> <refpurpose>Returns current position of internal pointer of large object</refpurpose> </refnamediv> <refsect1> <title>Description</title> <methodsynopsis> <type>int</type><methodname>lob->tell</methodname> <void /> </methodsynopsis> <para> Returns current position of LOB's internal pointer or &false; if an error occured. </para> <para> See also <function>oci_lob_size</function> and <function>oci_lob_eof</function>. </para> </refsect1> </refentry> <!-- Keep this comment at the end of the file Local variables: mode: sgml sgml-omittag:t sgml-shorttag:t sgml-minimize-attributes:nil sgml-always-quote-attributes:t sgml-indent-step:1 sgml-indent-data:t indent-tabs-mode:nil sgml-parent-document:nil sgml-default-dtd-file:"../../../../manual.ced" sgml-exposed-tags:nil sgml-local-catalogs:nil sgml-local-ecat-files:nil End: vim600: syn=xml fen fdm=syntax fdl=2 si vim: et tw=78 syn=sgml vi: ts=1 sw=1 --> http://cvs.php.net/co.php/phpdoc/en/reference/oci8/functions/oci-lob-truncate.xml?r=1.1&p=1 Index: phpdoc/en/reference/oci8/functions/oci-lob-truncate.xml +++ phpdoc/en/reference/oci8/functions/oci-lob-truncate.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- $Revision: 1.1 $ --> <refentry id="function.oci-lob-truncate"> <refnamediv> <refname>lob->truncate</refname> <refpurpose>Truncates large object</refpurpose> </refnamediv> <refsect1> <title>Description</title> <methodsynopsis> <type>boolean</type><methodname>lob->truncate</methodname> <methodparam choice="opt"><type>int</type><parameter>length</parameter></methodparam> </methodsynopsis> <para> If parameter <parameter>length</parameter> is given, <function>lob->truncate</function> truncates large object to <parameter>length</parameter> bytes. Otherwise, <function>lob->truncate</function> will purge the LOB completely. </para> <para> &return.success; </para> <para> See also <function>oci_lob_erase</function>. </para> </refsect1> </refentry> <!-- Keep this comment at the end of the file Local variables: mode: sgml sgml-omittag:t sgml-shorttag:t sgml-minimize-attributes:nil sgml-always-quote-attributes:t sgml-indent-step:1 sgml-indent-data:t indent-tabs-mode:nil sgml-parent-document:nil sgml-default-dtd-file:"../../../../manual.ced" sgml-exposed-tags:nil sgml-local-catalogs:nil sgml-local-ecat-files:nil End: vim600: syn=xml fen fdm=syntax fdl=2 si vim: et tw=78 syn=sgml vi: ts=1 sw=1 --> http://cvs.php.net/co.php/phpdoc/en/reference/oci8/functions/oci-lob-write-temporary.xml?r=1.1&p=1 Index: phpdoc/en/reference/oci8/functions/oci-lob-write-temporary.xml +++ phpdoc/en/reference/oci8/functions/oci-lob-write-temporary.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- $Revision: 1.1 $ --> <refentry id="function.oci-lob-write-temporary"> <refnamediv> <refname>lob->writeTemporary</refname> <refpurpose>Writes temporary large object</refpurpose> </refnamediv> <refsect1> <title>Description</title> <methodsynopsis> <type>bool</type><methodname>lob->writeTemporary</methodname> <methodparam><type>string</type><parameter>data</parameter></methodparam> <methodparam choice="opt"><type>int</type><parameter>lob_type</parameter></methodparam> </methodsynopsis> <para> Creates a temporary large object and writes <parameter>data</parameter> to it. </para> <para> Parameter <parameter>lob_type</parameter> can be one of the following: <simplelist> <member> <constant>OCI_TEMP_BLOB</constant> is used to create temporary BLOBs </member> <member> <constant>OCI_TEMP_CLOB</constant> is used to create temporary CLOBs </member> </simplelist> </para> <para> <function>lob->writeTemporary</function> creates CLOB by default. </para> <para> You should use <function>oci_lob_close</function> when the work with the object is over. </para> <para> &return.success; </para> <para> See also <function>oci_lob_close</function>. </para> </refsect1> </refentry> <!-- Keep this comment at the end of the file Local variables: mode: sgml sgml-omittag:t sgml-shorttag:t sgml-minimize-attributes:nil sgml-always-quote-attributes:t sgml-indent-step:1 sgml-indent-data:t indent-tabs-mode:nil sgml-parent-document:nil sgml-default-dtd-file:"../../../../manual.ced" sgml-exposed-tags:nil sgml-local-catalogs:nil sgml-local-ecat-files:nil End: vim600: syn=xml fen fdm=syntax fdl=2 si vim: et tw=78 syn=sgml vi: ts=1 sw=1 --> http://cvs.php.net/co.php/phpdoc/en/reference/oci8/functions/oci-lob-write.xml?r=1.1&p=1 Index: phpdoc/en/reference/oci8/functions/oci-lob-write.xml +++ phpdoc/en/reference/oci8/functions/oci-lob-write.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- $Revision: 1.1 $ --> <refentry id="function.oci-lob-write"> <refnamediv> <refname>lob->write</refname> <refpurpose>Writes data to the large object</refpurpose> </refnamediv> <refsect1> <title>Description</title> <methodsynopsis> <type>int</type><methodname>lob->write</methodname> <methodparam><type>string</type><parameter>data</parameter></methodparam> <methodparam choice="opt"><type>int</type><parameter>length</parameter></methodparam> </methodsynopsis> <para> Writes data from the parameter <parameter>data</parameter> into the current position of LOB's internal pointer. If the parameter <parameter>length</parameter> is given, writing will stop after <parameter>length</parameter> bytes have been written or the end of <parameter>data</parameter> is reached, whichever comes first. </para> <para> <function>lob->write</function> returns the number of bytes written or &false; in case of error. </para> <para> See also <function>oci_lob_read</function>. </para> </refsect1> </refentry> <!-- Keep this comment at the end of the file Local variables: mode: sgml sgml-omittag:t sgml-shorttag:t sgml-minimize-attributes:nil sgml-always-quote-attributes:t sgml-indent-step:1 sgml-indent-data:t indent-tabs-mode:nil sgml-parent-document:nil sgml-default-dtd-file:"../../../../manual.ced" sgml-exposed-tags:nil sgml-local-catalogs:nil sgml-local-ecat-files:nil End: vim600: syn=xml fen fdm=syntax fdl=2 si vim: et tw=78 syn=sgml vi: ts=1 sw=1 --> http://cvs.php.net/co.php/phpdoc/en/reference/oci8/functions/oci-new-collection.xml?r=1.1&p=1 Index: phpdoc/en/reference/oci8/functions/oci-new-collection.xml +++ phpdoc/en/reference/oci8/functions/oci-new-collection.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- $Revision: 1.1 $ --> <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>object</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 new collection object. Parameter <parameter>tdo</parameter> should be a valid named type (uppercased). Third, optional parameter <parameter>schema</parameter> should point to the scheme, where the named type was created. <function>oci_new_collection</function> uses name of the current user as default value of <parameter>scheme</parameter>. </para> <para> <function>oci_new_collection</function> returns &false; on error. </para> </refsect1> </refentry> <!-- Keep this comment at the end of the file Local variables: mode: sgml sgml-omittag:t sgml-shorttag:t sgml-minimize-attributes:nil sgml-always-quote-attributes:t sgml-indent-step:1 sgml-indent-data:t indent-tabs-mode:nil sgml-parent-document:nil sgml-default-dtd-file:"../../../../manual.ced" sgml-exposed-tags:nil sgml-local-catalogs:nil sgml-local-ecat-files:nil End: vim600: syn=xml fen fdm=syntax fdl=2 si vim: et tw=78 syn=sgml vi: ts=1 sw=1 --> http://cvs.php.net/co.php/phpdoc/en/reference/oci8/functions/oci-new-connect.xml?r=1.1&p=1 Index: phpdoc/en/reference/oci8/functions/oci-new-connect.xml +++ phpdoc/en/reference/oci8/functions/oci-new-connect.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- $Revision: 1.1 $ --> <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> </methodsynopsis> <para> <function>oci_new_connect</function> creates a new connection to an Oracle server and logs on. 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 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> <function>oci_new_connect</function> forces creation of a new connection. This should be used if you need to isolate a set of transactions. By default, connection are shared and several calls of <function>oci_connect</function> will return the same connection identifier. </para> <para> This exposed demonstrates how you can separate connections. <example> <title><function>oci_new_connect</function> example</title> <programlisting role="php"> <![CDATA[ <?php echo "<html><pre>"; $db = ""; $c1 = oci_connect("scott", "tiger", $db); $c2 = oci_new_connect("scott", "tiger", $db); 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) { $stmt = oci_parse($conn, "drop table scott.hallo"); oci_execute($stmt); echo $conn . " dropped table\n\n"; } function insert_data($conn) { $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) { $stmt = oci_parse($conn, "delete from scott.hallo"); oci_execute($stmt, OCI_DEFAULT); echo $conn . " deleted hallo\n\n"; } function commit($conn) { oci_commit($conn); echo $conn . " committed\n\n"; } function rollback($conn) { oci_rollback($conn); echo $conn . " rollback\n\n"; } function select_data($conn) { $stmt = oci_parse($conn, "select * from scott.hallo"); oci_execute($stmt, OCI_DEFAULT); echo $conn . "----selecting\n\n"; while (oci_fetch($stmt)) { echo $conn . " <" . oci_result($stmt, "TEST") . ">\n\n"; } echo $conn . "----done\n\n"; } create_table($c1); insert_data($c1); select_data($c1); select_data($c2); rollback($c1); select_data($c1); select_data($c2); insert_data($c2); commit($c2); select_data($c1); delete_data($c1); select_data($c1); select_data($c2); commit($c1); select_data($c1); select_data($c2); drop_table($c1); echo "</pre></html>"; ?> ]]> </programlisting> </example> </para> <para> <function>oci_new_connect</function> returns &false; on error. </para> <simpara> See also <function>oci_connect</function> and <function>oci_pconnect</function>. </simpara> </refsect1> </refentry> <!-- Keep this comment at the end of the file Local variables: mode: sgml sgml-omittag:t sgml-shorttag:t sgml-minimize-attributes:nil sgml-always-quote-attributes:t sgml-indent-step:1 sgml-indent-data:t indent-tabs-mode:nil sgml-parent-document:nil sgml-default-dtd-file:"../../../../manual.ced" sgml-exposed-tags:nil sgml-local-catalogs:nil sgml-local-ecat-files:nil End: vim600: syn=xml fen fdm=syntax fdl=2 si vim: et tw=78 syn=sgml vi: ts=1 sw=1 --> http://cvs.php.net/co.php/phpdoc/en/reference/oci8/functions/oci-new-cursor.xml?r=1.1&p=1 Index: phpdoc/en/reference/oci8/functions/oci-new-cursor.xml +++ phpdoc/en/reference/oci8/functions/oci-new-cursor.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- $Revision: 1.1 $ --> <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 // suppose your stored procedure info.output returns a ref cursor in :data $conn = oci_connect("scott", "tiger"); $curs = oci_new_cursor($conn); $stmt = oci_parse($conn, "begin info.output(:data); end;"); oci_bind_by_name($stmt, "data", &$curs, -1, OCI_B_CURSOR); oci_execute($stmt); 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"> <![CDATA[ <?php echo "<html><body>"; $conn = oci_connect("scott", "tiger"); $count_cursor = "CURSOR(select count(empno) num_emps from emp " . "where emp.deptno = dept.deptno) as EMPCNT from dept"; $stmt = oci_parse($conn, "select deptno,dname,$count_cursor"); oci_execute($stmt); echo "<table border=\"1\">"; echo "<tr>"; echo "<th>DEPT NAME</th>"; echo "<th>DEPT #</th>"; echo "<th># EMPLOYEES</th>"; echo "</tr>"; while ($data = oci_fetch_assoc($stmt)) { echo "<tr>"; $dname = $data["DNAME"]; $deptno = $data["DEPTNO"]; echo "<td>$dname</td>"; echo "<td>$deptno</td>"; oci_execute($data["EMPCNT"]); while ($subdata = oci_fetch_assoc($data["EMPCNT"])) { $num_emps = $subdata["NUM_EMPS"]; echo "<td>$num_emps</td>"; } echo "</tr>"; } echo "</table>"; echo "</body></html>"; oci_free_statement($stmt); oci_close($conn); ?> ]]> </programlisting> </example> </para> <para> <function>oci_new_cursor</function> returns &false; on error; </para> </refsect1> </refentry> <!-- Keep this comment at the end of the file Local variables: mode: sgml sgml-omittag:t sgml-shorttag:t sgml-minimize-attributes:nil sgml-always-quote-attributes:t sgml-indent-step:1 sgml-indent-data:t indent-tabs-mode:nil sgml-parent-document:nil sgml-default-dtd-file:"../../../../manual.ced" sgml-exposed-tags:nil sgml-local-catalogs:nil sgml-local-ecat-files:nil End: vim600: syn=xml fen fdm=syntax fdl=2 si vim: et tw=78 syn=sgml vi: ts=1 sw=1 --> http://cvs.php.net/co.php/phpdoc/en/reference/oci8/functions/oci-new-descriptor.xml?r=1.1&p=1 Index: phpdoc/en/reference/oci8/functions/oci-new-descriptor.xml +++ phpdoc/en/reference/oci8/functions/oci-new-descriptor.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- $Revision: 1.1 $ --> <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>object</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 /* 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 * the selected rows using the ROWID and commits after each * set of $commitsize rows. (Use with care, there is no rollback) */ $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_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); echo "$nrows\n"; if (($nrows % $commitsize) == 0) { oci_commit($conn); } } $nrows = oci_num_rows($stmt); echo "$nrows deleted...\n"; oci_free_statement($stmt); oci_close($conn); ?> ]]> </programlisting> <programlisting role="php"> <![CDATA[ <?php /* This script demonstrates file upload to LOB columns * The formfield used for this example looks like this * <form action="upload.php" method="post" enctype="multipart/form-data"> * <input type="file" name="lob_upload" /> * ... */ if (!isset($lob_upload) || $lob_upload == 'none'){ ?> <form action="upload.php" method="post" enctype="multipart/form-data"> Upload file: <input type="file" name="lob_upload" /><br /> <input type="submit" value="Upload" /> - <input type="reset" value="Reset" /> </form> <?php } else { // $lob_upload contains the temporary filename of the uploaded file // 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) 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); if ($lob->savefile($lob_upload)){ oci_execute($conn); echo "Blob successfully uploaded\n"; }else{ echo "Couldn't upload Blob\n"; } oci_free_descriptor($lob); oci_free_statement($stmt); oci_close($conn); } ?> ]]> </programlisting> </example> <example> <title><function>oci_new_descriptor</function> example</title> <programlisting role="php"> <![CDATA[ <?php /* Calling PL/SQL stored procedures which contain clobs as input * parameters (PHP 4 >= 4.0.6). * Example PL/SQL stored procedure signature is: * * PROCEDURE save_data * Argument Name Type In/Out Default? * ------------------------------ ----------------------- ------ -------- * KEY NUMBER(38) IN * DATA CLOB IN * */ $conn = oci_connect($user, $password); $stmt = oci_parse($conn, "begin save_data(:key, :data); end;"); $clob = oci_new_descriptor($conn, OCI_D_LOB); oci_bind_by_name($stmt, ':key', $key); oci_bind_by_name($stmt, ':data', $clob, -1, OCI_B_CLOB); $clob->write($data); oci_execute($stmt, OCI_DEFAULT); oci_commit($conn); $clob->free(); oci_free_statement($stmt); ?> ]]> </programlisting> </example> </para> <para> <function>oci_new_descriptor</function> returns &false; on error. </para> </refsect1> </refentry> <!-- Keep this comment at the end of the file Local variables: mode: sgml sgml-omittag:t sgml-shorttag:t sgml-minimize-attributes:nil sgml-always-quote-attributes:t sgml-indent-step:1 sgml-indent-data:t indent-tabs-mode:nil sgml-parent-document:nil sgml-default-dtd-file:"../../../../manual.ced" sgml-exposed-tags:nil sgml-local-catalogs:nil sgml-local-ecat-files:nil End: vim600: syn=xml fen fdm=syntax fdl=2 si vim: et tw=78 syn=sgml vi: ts=1 sw=1 --> http://cvs.php.net/co.php/phpdoc/en/reference/oci8/functions/oci-num-fields.xml?r=1.1&p=1 Index: phpdoc/en/reference/oci8/functions/oci-num-fields.xml +++ phpdoc/en/reference/oci8/functions/oci-num-fields.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- $Revision: 1.1 $ --> <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"; $conn = oci_connect("scott", "tiger"); $stmt = oci_parse($conn, "select * from emp"); oci_execute($stmt); while (oci_fetch($stmt)) { echo "\n"; $ncols = oci_num_fields($stmt); for ($i = 1; $i <= $ncols; $i++) { $column_name = oci_field_name($stmt, $i); $column_value = oci_result($stmt, $i); echo $column_name . ': ' . $column_value . "\n"; } echo "\n"; } oci_free_statement($stmt); oci_close($conn); echo "</pre>"; ?> ]]> </programlisting> </example> </para> <para> <function>oci_num_fields</function> returns &false; on error. </para> </refsect1> </refentry> <!-- Keep this comment at the end of the file Local variables: mode: sgml sgml-omittag:t sgml-shorttag:t sgml-minimize-attributes:nil sgml-always-quote-attributes:t sgml-indent-step:1 sgml-indent-data:t indent-tabs-mode:nil sgml-parent-document:nil sgml-default-dtd-file:"../../../../manual.ced" sgml-exposed-tags:nil sgml-local-catalogs:nil sgml-local-ecat-files:nil End: vim600: syn=xml fen fdm=syntax fdl=2 si vim: et tw=78 syn=sgml vi: ts=1 sw=1 --> http://cvs.php.net/co.php/phpdoc/en/reference/oci8/functions/oci-num-rows.xml?r=1.1&p=1 Index: phpdoc/en/reference/oci8/functions/oci-num-rows.xml +++ phpdoc/en/reference/oci8/functions/oci-num-rows.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- $Revision: 1.1 $ --> <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> </refsect1> </refentry> <!-- Keep this comment at the end of the file Local variables: mode: sgml sgml-omittag:t sgml-shorttag:t sgml-minimize-attributes:nil sgml-always-quote-attributes:t sgml-indent-step:1 sgml-indent-data:t indent-tabs-mode:nil sgml-parent-document:nil sgml-default-dtd-file:"../../../../manual.ced" sgml-exposed-tags:nil sgml-local-catalogs:nil sgml-local-ecat-files:nil End: vim600: syn=xml fen fdm=syntax fdl=2 si vim: et tw=78 syn=sgml vi: ts=1 sw=1 --> http://cvs.php.net/co.php/phpdoc/en/reference/oci8/functions/oci-parse.xml?r=1.1&p=1 Index: phpdoc/en/reference/oci8/functions/oci-parse.xml +++ phpdoc/en/reference/oci8/functions/oci-parse.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- $Revision: 1.1 $ --> <refentry id="function.oci-parse"> <refnamediv> <refname>oci_parse</refname> <refpurpose>Parses a query and returns an Oracle statement identifier</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> parses the <parameter>query</parameter> using <parameter>connection</parameter> and returns the statement identifier if the <parameter>query</parameter> is valid or &false; if not. The <parameter>query</parameter> can be any valid SQL statement or PL/SQL block. </para> <para> <function>oci_parse</function> returns &false; on error. </para> </refsect1> </refentry> <!-- Keep this comment at the end of the file Local variables: mode: sgml sgml-omittag:t sgml-shorttag:t sgml-minimize-attributes:nil sgml-always-quote-attributes:t sgml-indent-step:1 sgml-indent-data:t indent-tabs-mode:nil sgml-parent-document:nil sgml-default-dtd-file:"../../../../manual.ced" sgml-exposed-tags:nil sgml-local-catalogs:nil sgml-local-ecat-files:nil End: vim600: syn=xml fen fdm=syntax fdl=2 si vim: et tw=78 syn=sgml vi: ts=1 sw=1 --> http://cvs.php.net/co.php/phpdoc/en/reference/oci8/functions/oci-password-change.xml?r=1.1&p=1 Index: phpdoc/en/reference/oci8/functions/oci-password-change.xml +++ phpdoc/en/reference/oci8/functions/oci-password-change.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- $Revision: 1.1 $ --> <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>boolean</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> <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 accordingly. </para> <para> &return.success; </para> </refsect1> </refentry> <!-- Keep this comment at the end of the file Local variables: mode: sgml sgml-omittag:t sgml-shorttag:t sgml-minimize-attributes:nil sgml-always-quote-attributes:t sgml-indent-step:1 sgml-indent-data:t indent-tabs-mode:nil sgml-parent-document:nil sgml-default-dtd-file:"../../../../manual.ced" sgml-exposed-tags:nil sgml-local-catalogs:nil sgml-local-ecat-files:nil End: vim600: syn=xml fen fdm=syntax fdl=2 si vim: et tw=78 syn=sgml vi: ts=1 sw=1 --> http://cvs.php.net/co.php/phpdoc/en/reference/oci8/functions/oci-pconnect.xml?r=1.1&p=1 Index: phpdoc/en/reference/oci8/functions/oci-pconnect.xml +++ phpdoc/en/reference/oci8/functions/oci-pconnect.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- $Revision: 1.1 $ --> <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> </methodsynopsis> <para> <function>oci_pconnect</function> creates a new persistent connection to an Oracle server and logs on. 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 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> <function>oci_pconnect</function> returns connection identifier or &false; on error. </para> <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: mode: sgml sgml-omittag:t sgml-shorttag:t sgml-minimize-attributes:nil sgml-always-quote-attributes:t sgml-indent-step:1 sgml-indent-data:t indent-tabs-mode:nil sgml-parent-document:nil sgml-default-dtd-file:"../../../../manual.ced" sgml-exposed-tags:nil sgml-local-catalogs:nil sgml-local-ecat-files:nil End: vim600: syn=xml fen fdm=syntax fdl=2 si vim: et tw=78 syn=sgml vi: ts=1 sw=1 --> http://cvs.php.net/co.php/phpdoc/en/reference/oci8/functions/oci-result.xml?r=1.1&p=1 Index: phpdoc/en/reference/oci8/functions/oci-result.xml +++ phpdoc/en/reference/oci8/functions/oci-result.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- $Revision: 1.1 $ --> <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> <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: mode: sgml sgml-omittag:t sgml-shorttag:t sgml-minimize-attributes:nil sgml-always-quote-attributes:t sgml-indent-step:1 sgml-indent-data:t indent-tabs-mode:nil sgml-parent-document:nil sgml-default-dtd-file:"../../../../manual.ced" sgml-exposed-tags:nil sgml-local-catalogs:nil sgml-local-ecat-files:nil End: vim600: syn=xml fen fdm=syntax fdl=2 si vim: et tw=78 syn=sgml vi: ts=1 sw=1 --> http://cvs.php.net/co.php/phpdoc/en/reference/oci8/functions/oci-rollback.xml?r=1.1&p=1 Index: phpdoc/en/reference/oci8/functions/oci-rollback.xml +++ phpdoc/en/reference/oci8/functions/oci-rollback.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- $Revision: 1.1 $ --> <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> <para> See also <function>oci_commit</function>. </para> </refsect1> </refentry> <!-- Keep this comment at the end of the file Local variables: mode: sgml sgml-omittag:t sgml-shorttag:t sgml-minimize-attributes:nil sgml-always-quote-attributes:t sgml-indent-step:1 sgml-indent-data:t indent-tabs-mode:nil sgml-parent-document:nil sgml-default-dtd-file:"../../../../manual.ced" sgml-exposed-tags:nil sgml-local-catalogs:nil sgml-local-ecat-files:nil End: vim600: syn=xml fen fdm=syntax fdl=2 si vim: et tw=78 syn=sgml vi: ts=1 sw=1 --> http://cvs.php.net/co.php/phpdoc/en/reference/oci8/functions/oci-server-version.xml?r=1.1&p=1 Index: phpdoc/en/reference/oci8/functions/oci-server-version.xml +++ phpdoc/en/reference/oci8/functions/oci-server-version.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- $Revision: 1.1 $ --> <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 string with version information of Oracle server, which uses connection <parameter>connection</parameter> or &false; on error. </para> <para> <example> <title><function>oci_server_version</function> example</title> <programlisting role="php"> <![CDATA[ <?php $conn = oci_connect("scott", "tiger"); echo "Server Version: " . oci_server_version($conn); oci_close($conn); ?> ]]> </programlisting> </example> </para> </refsect1> </refentry> <!-- Keep this comment at the end of the file Local variables: mode: sgml sgml-omittag:t sgml-shorttag:t sgml-minimize-attributes:nil sgml-always-quote-attributes:t sgml-indent-step:1 sgml-indent-data:t indent-tabs-mode:nil sgml-parent-document:nil sgml-default-dtd-file:"../../../../manual.ced" sgml-exposed-tags:nil sgml-local-catalogs:nil sgml-local-ecat-files:nil End: vim600: syn=xml fen fdm=syntax fdl=2 si vim: et tw=78 syn=sgml vi: ts=1 sw=1 --> http://cvs.php.net/co.php/phpdoc/en/reference/oci8/functions/oci-set-prefetch.xml?r=1.1&p=1 Index: phpdoc/en/reference/oci8/functions/oci-set-prefetch.xml +++ phpdoc/en/reference/oci8/functions/oci-set-prefetch.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- $Revision: 1.1 $ --> <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><type>int</type><parameter>rows</parameter></methodparam> </methodsynopsis> <para> Sets the number of rows to be prefetched after successfull call to <function>oci_execute</function>. The default value for <parameter>rows</parameter> is 1. </para> <para> &return.success; </para> </refsect1> </refentry> <!-- Keep this comment at the end of the file Local variables: mode: sgml sgml-omittag:t sgml-shorttag:t sgml-minimize-attributes:nil sgml-always-quote-attributes:t sgml-indent-step:1 sgml-indent-data:t indent-tabs-mode:nil sgml-parent-document:nil sgml-default-dtd-file:"../../../../manual.ced" sgml-exposed-tags:nil sgml-local-catalogs:nil sgml-local-ecat-files:nil End: vim600: syn=xml fen fdm=syntax fdl=2 si vim: et tw=78 syn=sgml vi: ts=1 sw=1 --> http://cvs.php.net/co.php/phpdoc/en/reference/oci8/functions/oci-statement-type.xml?r=1.1&p=1 Index: phpdoc/en/reference/oci8/functions/oci-statement-type.xml +++ phpdoc/en/reference/oci8/functions/oci-statement-type.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- $Revision: 1.1 $ --> <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 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>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> </refsect1> </refentry> <!-- Keep this comment at the end of the file Local variables: mode: sgml sgml-omittag:t sgml-shorttag:t sgml-minimize-attributes:nil sgml-always-quote-attributes:t sgml-indent-step:1 sgml-indent-data:t indent-tabs-mode:nil sgml-parent-document:nil sgml-default-dtd-file:"../../../../manual.ced" sgml-exposed-tags:nil sgml-local-catalogs:nil sgml-local-ecat-files:nil End: vim600: syn=xml fen fdm=syntax fdl=2 si vim: et tw=78 syn=sgml vi: ts=1 sw=1 --> http://cvs.php.net/co.php/phpdoc/en/reference/oci8/functions/ocigetbufferinglob.xml?r=1.1&p=1 Index: phpdoc/en/reference/oci8/functions/ocigetbufferinglob.xml +++ phpdoc/en/reference/oci8/functions/ocigetbufferinglob.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- $Revision: 1.1 $ --> <refentry id="function.ocigetbufferinglob"> <refnamediv> <refname>lob->getBuffering</refname> <refpurpose>Returns current state of buffering for large object</refpurpose> </refnamediv> <refsect1> <title>Description</title> <methodsynopsis> <type>boolean</type><methodname>lob->getBuffering</methodname> <void/> </methodsynopsis> <para> Returns &false; if buffering for the large object is off and &true; if buffering is used. </para> <para> See also <function>ocisetbufferinglob</function>. </para> </refsect1> </refentry> <!-- Keep this comment at the end of the file Local variables: mode: sgml sgml-omittag:t sgml-shorttag:t sgml-minimize-attributes:nil sgml-always-quote-attributes:t sgml-indent-step:1 sgml-indent-data:t indent-tabs-mode:nil sgml-parent-document:nil sgml-default-dtd-file:"../../../../manual.ced" sgml-exposed-tags:nil sgml-local-catalogs:nil sgml-local-ecat-files:nil End: vim600: syn=xml fen fdm=syntax fdl=2 si vim: et tw=78 syn=sgml vi: ts=1 sw=1 --> http://cvs.php.net/co.php/phpdoc/en/reference/oci8/functions/ocisetbufferinglob.xml?r=1.1&p=1 Index: phpdoc/en/reference/oci8/functions/ocisetbufferinglob.xml +++ phpdoc/en/reference/oci8/functions/ocisetbufferinglob.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- $Revision: 1.1 $ --> <refentry id="function.ocisetbufferinglob"> <refnamediv> <refname>lob->setBuffering</refname> <refpurpose>Changes current state of buffering for large object</refpurpose> </refnamediv> <refsect1> <title>Description</title> <methodsynopsis> <type>bool</type><methodname>lob->setBuffering</methodname> <methodparam><type>bool</type><parameter>on_off</parameter></methodparam> </methodsynopsis> <para> <function>lob->setBuffering</function> turns on or off buffering for the large object, depending on the value of the <parameter>on_off</parameter> parameter. Repeated call to <function>lob->setBuffering</function> with the same flag will return &true;. </para> <para> Using of this function may provide perfomance improvements by buffering small reads and writes of LOBs by reducing the number of network round-trips and LOB versions. <function>oci_lob_flush</function> should be used to flush buffers, when you have finished to work with the large object. </para> <para> &return.success; </para> <para> See also <function>ocigetbufferinglob</function>. </para> </refsect1> </refentry> <!-- Keep this comment at the end of the file Local variables: mode: sgml sgml-omittag:t sgml-shorttag:t sgml-minimize-attributes:nil sgml-always-quote-attributes:t sgml-indent-step:1 sgml-indent-data:t indent-tabs-mode:nil sgml-parent-document:nil sgml-default-dtd-file:"../../../../manual.ced" sgml-exposed-tags:nil sgml-local-catalogs:nil sgml-local-ecat-files:nil End: vim600: syn=xml fen fdm=syntax fdl=2 si vim: et tw=78 syn=sgml vi: ts=1 sw=1 -->
« previous php.doc (#969359411) next »