cvs: phpdoc /en/functions oci8.xml
| From: | Ron Chmara | Date: | Sun, 05 Nov 2000 06:40:30 +0000 |
| Subject: | cvs: phpdoc /en/functions oci8.xml | ||
| Groups: | php.doc | ||
| Request: | Send a blank email to phpdoc+get-969332789@lists.php.net to get a copy of this message | ||
ronabop Sat Nov 4 22:40:30 2000 EDT
Modified files:
/phpdoc/en/functions oci8.xml
Log:
Typos, indentation, line breaks, reordering function listing, updating some text.
Index: phpdoc/en/functions/oci8.xml diff -u phpdoc/en/functions/oci8.xml:1.14 phpdoc/en/functions/oci8.xml:1.15 --- phpdoc/en/functions/oci8.xml:1.14 Tue Oct 31 00:11:06 2000 +++ phpdoc/en/functions/oci8.xml Sat Nov 4 22:40:30 2000 @@ -71,7 +71,7 @@ $result = OCIResult($stmt, $n); if (is_object ($result)) $result = $result->load(); -// For INSERT or UPDATE statetment use: +// For INSERT or UPDATE statement use: $sql = "insert into table (field1, field2) values (field1 = 'value', field2 = empty_clob()) returning field2 into :field2"; @@ -110,37 +110,6 @@ </example> </para> </partintro> - -<!-- -OCIBindByName -OCIDefineByName -OCIColumnIsNULL -OCIColumnName -OCIColumnSize -OCIColumnType -OCIExecute -OCIFetch -OCIFetchInto -OCIFetchStatement -OCIInternalDebug -OCILogoff -OCILogon -OCIPLogon -OCINLogon -OCIError -OCICommit -OCIRollback -OCINewCursor -OCINewDescriptor -OCIRowCount -OCINumCols -OCIParse -OCIResult -OCIServerVersion -OCIStatementType -OCIFreeStatement -OCIFreeCursor ---> <refentry id="function.ocidefinebyname"> <refnamediv> @@ -156,8 +125,9 @@ <funcdef>int <function>OCIDefineByName</function></funcdef> <paramdef>int <parameter>stmt</parameter></paramdef> <paramdef>string <parameter>Column-Name</parameter></paramdef> - <paramdef>mixed &<parameter>variable</parameter></paramdef> - <paramdef>int <parameter><optional>type</optional></parameter></paramdef> + <paramdef>mixed <parameter>variable</parameter></paramdef> + <paramdef>int <parameter><optional>type</optional></parameter> + </paramdef> </funcprototype> </funcsynopsis> <para> @@ -187,8 +157,8 @@ /* the define MUST be done BEFORE ociexecute! */ -OCIDefineByName($stmt,"EMPNO",&$empno); -OCIDefineByName($stmt,"ENAME",&$ename); +OCIDefineByName($stmt,"EMPNO",$empno); +OCIDefineByName($stmt,"ENAME",$ename); OCIExecute($stmt); @@ -208,7 +178,9 @@ <refentry id="function.ocibindbyname"> <refnamediv> <refname>OCIBindByName</refname> - <refpurpose>Bind a PHP variable to an Oracle Placeholder</refpurpose> + <refpurpose> + Bind a PHP variable to an Oracle Placeholder + </refpurpose> </refnamediv> <refsect1> <title>Description</title> @@ -218,8 +190,9 @@ <paramdef>int <parameter>stmt</parameter></paramdef> <paramdef>string <parameter>ph_name</parameter></paramdef> <paramdef>mixed &<parameter>variable</parameter></paramdef> - <paramdef>int<parameter>length</parameter></paramdef> - <paramdef>int <parameter><optional>type</optional></parameter></paramdef> + <paramdef>int <parameter>length</parameter></paramdef> + <paramdef>int <parameter> + <optional>type</optional></parameter></paramdef> </funcprototype> </funcsynopsis> <para> @@ -228,7 +201,7 @@ <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> paramter sets the maximum length + <parameter>length</parameter> parameter sets the maximum length for the bind. If you set <parameter>length</parameter> to -1 <function>OCIBindByName</function> will use the current length of <parameter>variable</parameter> to set the maximum length. @@ -249,7 +222,7 @@ <programlisting> <?php /* OCIBindByPos example thies@thieso.net (980221) - inserts 3 resords into emp, and uses the ROWID for updating the + inserts 3 records into emp, and uses the ROWID for updating the records just after the insert. */ @@ -302,11 +275,11 @@ <warning> <para> It is a bad idea to use magic quotes and - <function>OciBindByName</function> simultaneously as no qouting + <function>OciBindByName</function> simultaneously as no quoting is needed on quoted variables and any quotes magically applied - will be written into your database as <function>OciBindByName</function> - is not able to distinguish magically added quotings from those added by - intention. + will be written into your database as + <function>OciBindByName</function> is not able to distinguish + magically added quotings from those added by intention. </para> </warning> </refsect1> @@ -324,7 +297,9 @@ <funcdef>int <function>OCILogon</function></funcdef> <paramdef>string <parameter>username</parameter></paramdef> <paramdef>string <parameter>password</parameter></paramdef> - <paramdef>string <parameter><optional>db</optional></parameter></paramdef> + <paramdef>string + <parameter><optional>db</optional></parameter> + </paramdef> </funcprototype> </funcsynopsis> <para> @@ -380,7 +355,7 @@ function commit($conn) { ocicommit($conn); - echo $conn." commited\n\n"; + echo $conn." committed\n\n"; } function rollback($conn) @@ -435,8 +410,8 @@ <refentry id="function.ociplogon"> <refnamediv> <refname>OCIPLogon</refname> - <refpurpose>Connect to an Oracle database and log on using a persistant connection. - Returns a new session.</refpurpose> + <refpurpose>Connect to an Oracle database and log on using a + persistant connection. Returns a new session.</refpurpose> </refnamediv> <refsect1> <title>Description</title> @@ -445,7 +420,9 @@ <funcdef>int <function>OCIPLogon</function></funcdef> <paramdef>string <parameter>username</parameter></paramdef> <paramdef>string <parameter>password</parameter></paramdef> - <paramdef>string <parameter><optional>db</optional></parameter></paramdef> + <paramdef>string + <parameter><optional>db</optional></parameter> + </paramdef> </funcprototype> </funcsynopsis> <para> @@ -459,14 +436,16 @@ </para> <simpara> See also <function>OCILogon</function> and - <function>OCINLogon</function>.</simpara> - </refsect1></refentry> + <function>OCINLogon</function>. + </simpara> + </refsect1> + </refentry> <refentry id="function.ocinlogon"> <refnamediv> <refname>OCINLogon</refname> - <refpurpose>Connect to an Oracle database and log on using a new connection. - Returns a new session.</refpurpose> + <refpurpose>Connect to an Oracle database and log on using a new + connection. Returns a new session.</refpurpose> </refnamediv> <refsect1> <title>Description</title> @@ -475,7 +454,9 @@ <funcdef>int <function>OCINLogon</function></funcdef> <paramdef>string <parameter>username</parameter></paramdef> <paramdef>string <parameter>password</parameter></paramdef> - <paramdef>string <parameter><optional>db</optional></parameter></paramdef> + <paramdef>string + <parameter><optional>db</optional></parameter> + </paramdef> </funcprototype> </funcsynopsis> <para> @@ -536,7 +517,7 @@ function commit($conn) { ocicommit($conn); - echo $conn." commited\n\n"; + echo $conn." committed\n\n"; } function rollback($conn) @@ -580,11 +561,14 @@ drop_table($c1); print "</PRE></HTML>"; -?></programlisting></example></para> +?></programlisting></example> + </para> <simpara> See also <function>OCILogon</function> and - <function>OCIPLogon</function>.</simpara> - </refsect1></refentry> + <function>OCIPLogon</function>. + </simpara> + </refsect1> + </refentry> <refentry id="function.ocilogoff"> <refnamediv> @@ -616,15 +600,18 @@ <funcprototype> <funcdef>int <function>OCIExecute</function></funcdef> <paramdef>int <parameter>statement</parameter></paramdef> - <paramdef>int <parameter><optional>mode</optional></parameter></paramdef> + <paramdef>int + <parameter><optional>mode</optional></parameter> + </paramdef> </funcprototype> </funcsynopsis> <para> - <function>OCIExecute</function> executes a previously parsed statement. - (see <function>OCIParse</function>). The optional <parameter>mode</parameter> - allows you to specify the execution-mode (default is OCI_COMMIT_ON_SUCCESS). - If you don't want statements to be commited automaticly specify OCI_DEFAULT as - your mode. + <function>OCIExecute</function> executes a previously parsed + statement. (see <function>OCIParse</function>. The optional + <parameter>mode</parameter> allows you to specify the + execution-mode (default is OCI_COMMIT_ON_SUCCESS). If you don't + want statements to be committed automaticly specify OCI_DEFAULT as + your mode. </para> </refsect1> </refentry> @@ -643,8 +630,8 @@ </funcprototype> </funcsynopsis> <para> - <function>OCICommit</function> commits all outstanding statements for - Oracle connection <parameter>connection</parameter>. + <function>OCICommit</function> commits all outstanding statements + for Oracle connection <parameter>connection</parameter>. </para> </refsect1> </refentry> @@ -663,8 +650,8 @@ </funcprototype> </funcsynopsis> <para> - <function>OCIRollback</function> rolls back all outstanding statements for - Oracle connection <parameter>connection</parameter>. + <function>OCIRollback</function> rolls back all outstanding + statements for Oracle connection <parameter>connection</parameter>. </para> </refsect1> </refentry> @@ -672,7 +659,9 @@ <refentry id="function.ocinewdescriptor"> <refnamediv> <refname>OCINewDescriptor</refname> - <refpurpose>Initialize a new empty descriptor LOB/FILE (LOB is default)</refpurpose> + <refpurpose> + Initialize a new empty descriptor LOB/FILE (LOB is default) + </refpurpose> </refnamediv> <refsect1> <title>Description</title> @@ -680,16 +669,18 @@ <funcprototype> <funcdef>string <function>OCINewDescriptor</function></funcdef> <paramdef>int <parameter>connection</parameter></paramdef> - <paramdef>int <parameter><optional>type</optional></parameter></paramdef> + <paramdef>int + <parameter><optional>type</optional></parameter> + </paramdef> </funcprototype> </funcsynopsis> <para> <function>OCINewDescriptor</function> Allocates storage to hold descriptors or LOB locators. Valid values for the valid <parameter>type</parameter> are OCI_D_FILE, OCI_D_LOB, OCI_D_ROWID. - For LOB desriptors, the methods load, save, and savefile are - associated with the descriptor, for BFILE only the load method exists. - See the second example usage hints. + For LOB descriptors, the methods load, save, and savefile are + associated with the descriptor, for BFILE only the load method + exists. See the second example usage hints. </para> <example> <title>OCINewDescriptor</title> @@ -776,7 +767,7 @@ </funcsynopsis> <para> <function>OCIRowCount</function> returns the number of rows affected - for eg update-statements. This funtions will not tell you the number + for eg update-statements. This function will not tell you the number of rows that a select will return!</para> <para> <example> @@ -799,15 +790,17 @@ OCIFreeStatement($stmt); OCILogOff($conn); print "</PRE></HTML>"; -?> </programlisting></example></para> - +?> </programlisting></example> + </para> </refsect1> </refentry> <refentry id="function.ocinumcols"> <refnamediv> <refname>OCINumCols</refname> - <refpurpose>Return the number of result columns in a statement</refpurpose> + <refpurpose> + Return the number of result columns in a statement + </refpurpose> </refnamediv> <refsect1> <title>Description</title> @@ -852,7 +845,7 @@ <refentry id="function.ociresult"> <refnamediv> <refname>OCIResult</refname> - <refpurpose>Returns coulumn value for fetched row</refpurpose> + <refpurpose>Returns column value for fetched row</refpurpose> </refnamediv> <refsect1> <title>Description</title> @@ -867,7 +860,8 @@ <function>OCIResult</function> returns the data for column <parameter>column</parameter> in the current row (see <function>OCIFetch</function>).<function>OCIResult</function> will - return everything as strings except for abstract types (ROWIDs, LOBs and FILEs). + return everything as strings except for abstract types (ROWIDs, + LOBs and FILEs). </para> </refsect1> </refentry> @@ -886,8 +880,8 @@ </funcprototype> </funcsynopsis> <para> - <function>OCIFetch</function> fetches the next row (for SELECT statements) - into the internal result-buffer. + <function>OCIFetch</function> fetches the next row (for SELECT + statements) into the internal result-buffer. </para> </refsect1> </refentry> @@ -904,31 +898,40 @@ <funcdef>int <function>OCIFetchInto</function></funcdef> <paramdef>int <parameter>stmt</parameter></paramdef> <paramdef>array &<parameter>result</parameter></paramdef> - <paramdef>int <parameter><optional>mode</optional></parameter></paramdef> + <paramdef>int + <parameter><optional>mode</optional></parameter> + </paramdef> </funcprototype> </funcsynopsis> <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 - <parameter>result</parameter> will contain a one-based array of all columns - that are not NULL. + <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 + <parameter>result</parameter> will contain a one-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 addig them up - (eg OCI_ASSOC+OCI_RETURN_NULLS). The known flags are: - + The <parameter>mode</parameter> parameter allows you to change the + default behaviour. You can specify more than one flag by simply + adding them up (eg OCI_ASSOC+OCI_RETURN_NULLS). The known flags + are: <simplelist> - <member><literal>OCI_ASSOC</literal> Return an associative array.</member> - <member><literal>OCI_NUM</literal> Return an numbered array - starting with one. (DEFAULT)</member> - <member><literal>OCI_RETURN_NULLS</literal> Return empty columns.</member> - <member><literal>OCI_RETURN_LOBS</literal> Return the value of a LOB instead of the desxriptor.</member> + <member> + <literal>OCI_ASSOC</literal> Return an associative array. + </member> + <member> + <literal>OCI_NUM</literal> Return an numbered array starting with + one. (DEFAULT) + </member> + <member> + <literal>OCI_RETURN_NULLS</literal> Return empty columns. + </member> + <member> + <literal>OCI_RETURN_LOBS</literal> Return the value of a LOB + instead of the descriptor. + </member> </simplelist> - - </para> - <para> </para> </refsect1> </refentry> @@ -949,8 +952,9 @@ </funcsynopsis> <para> <function>OCIFetchStatement</function> fetches all the rows from a - result into a user-defined array. <function>OCIFetchStatement</function> - returns the number of rows fetched. + result into a user-defined array. + <function>OCIFetchStatement</function> returns the number of rows + fetched. </para> <example> <title>OCIFetchStatement</title> @@ -990,11 +994,12 @@ OCIFreeStatement($stmt); OCILogoff($conn); - -?></programlisting></example> - +?> + </programlisting> + </example> </refsect1> </refentry> + <refentry id="function.ocicolumnisnull"> <refnamediv> <refname>OCIColumnIsNULL</refname> @@ -1013,12 +1018,71 @@ <function>OCIColumnIsNULL</function> returns true if the returned column <parameter>column</parameter> in the result from the statement <parameter>stmt</parameter> is NULL. You can either use - the column-number (1-Based) or the column-name for the <parameter>col</parameter> - parameter. + the column-number (1-Based) or the column-name for the + <parameter>col</parameter> parameter. </para> </refsect1> </refentry> + <refentry id="function.ocicolumnname"> + <refnamediv> + <refname>OCIColumnName</refname> + <refpurpose>Returns the name of a column.</refpurpose> + </refnamediv> + <refsect1> + <title>Description</title> + <funcsynopsis> + <funcprototype> + <funcdef>string <function>OCIColumnName</function></funcdef> + <paramdef>int <parameter>stmt</parameter></paramdef> + <paramdef>int <parameter>col</parameter></paramdef> + </funcprototype> + </funcsynopsis> + <simpara> + <function>OCIColumnName</function> returns the name of the column + corresponding to the column number (1-based) that is passed in. + </simpara> + <para> + <example> + <title>OCIColumnName</title> + <programlisting> +<?php + print "<HTML><PRE>\n"; + $conn = OCILogon("scott", "tiger"); + $stmt = OCIParse($conn,"select * from emp"); + OCIExecute($stmt); + print "<TABLE BORDER=\"1\">"; + print "<TR>"; + print "<TH>Name</TH>"; + print "<TH>Type</TH>"; + print "<TH>Length</TH>"; + print "</TR>"; + $ncols = OCINumCols($stmt); + for ( $i = 1; $i <= $ncols; $i++ ) { + $column_name = OCIColumnName($stmt,$i); + $column_type = OCIColumnType($stmt,$i); + $column_size = OCIColumnSize($stmt,$i); + print "<TR>"; + print "<TD>$column_name</TD>"; + print "<TD>$column_type</TD>"; + print "<TD>$column_size</TD>"; + print "</TR>"; + } + OCIFreeStatement($stmt); + OCILogoff($conn); + print "</PRE>"; + print "</HTML>\n"; +?> + </programlisting> + </example> + </para> + <simpara> + See also <function>OCINumCols</function>, + <function>OCIColumnType</function>, + and <function>OCIColumnSize</function>. + </simpara> + </refsect1> + </refentry> <refentry id="function.ocicolumnsize"> <refnamediv> @@ -1037,8 +1101,8 @@ <para> <function>OCIColumnSize</function> returns the size of the column as given by Oracle. You can either use - the column-number (1-Based) or the column-name for the <parameter>col</parameter> - parameter. + the column-number (1-Based) or the column-name for the + <parameter>col</parameter> parameter. </para> <para> <example> @@ -1075,16 +1139,80 @@ </programlisting> </example> </para> + <simpara> + See also <function>OCINumCols</function>, + <function>OCIColumnName</function>, and + <function>OCIColumnSize</function>. + </simpara> + </refsect1> + </refentry> + + <refentry id="function.ocicolumntype"> + <refnamediv> + <refname>OCIColumnType</refname> + <refpurpose>Returns the data type of a column.</refpurpose> + </refnamediv> + <refsect1> + <title>Description</title> + <funcsynopsis> + <funcprototype> + <funcdef>mixed <function>OCIColumnType</function></funcdef> + <paramdef>int <parameter>stmt</parameter></paramdef> + <paramdef>int <parameter>col</parameter></paramdef> + </funcprototype> + </funcsynopsis> + <simpara> + <function>OCIColumnType</function> returns the data type of the + column corresponding to the column number (1-based) that is passed + in. + </simpara> + <para> + <example> + <title>OCIColumnType</title> + <programlisting> +<?php + print "<HTML><PRE>\n"; + $conn = OCILogon("scott", "tiger"); + $stmt = OCIParse($conn,"select * from emp"); + OCIExecute($stmt); + print "<TABLE BORDER=\"1\">"; + print "<TR>"; + print "<TH>Name</TH>"; + print "<TH>Type</TH>"; + print "<TH>Length</TH>"; + print "</TR>"; + $ncols = OCINumCols($stmt); + for ( $i = 1; $i <= $ncols; $i++ ) { + $column_name = OCIColumnName($stmt,$i); + $column_type = OCIColumnType($stmt,$i); + $column_size = OCIColumnSize($stmt,$i); + print "<TR>"; + print "<TD>$column_name</TD>"; + print "<TD>$column_type</TD>"; + print "<TD>$column_size</TD>"; + print "</TR>"; + } + OCIFreeStatement($stmt); + OCILogoff($conn); + print "</PRE>"; + print "</HTML>\n"; +?> + </programlisting> + </example> + </para> <simpara> - See also <function>OCINumCols</function>, <function>OCIColumnName</function>, - and <function>OCIColumnSize</function>.</simpara> + See also <function>OCINumCols</function>, + <function>OCIColumnName</function>, + and <function>OCIColumnSize</function>. + </simpara> </refsect1> </refentry> <refentry id="function.ociserverversion"> <refnamediv> <refname>OCIServerVersion</refname> - <refpurpose>Return a string containing server version information.</refpurpose> + <refpurpose>Return a string containing server version + information.</refpurpose> </refnamediv> <refsect1> <title>Description</title> @@ -1102,8 +1230,10 @@ $conn = OCILogon("scott","tiger"); print "Server Version: " . OCIServerVersion($conn); OCILogOff($conn); -?></programlisting></example></para> - +?> + </programlisting> + </example> + </para> </refsect1> </refentry> @@ -1121,7 +1251,8 @@ </funcprototype> </funcsynopsis> <para> - <function>OCIStatementType</function> returns on of the following values: + <function>OCIStatementType</function> returns one of the following + values: <orderedlist> <listitem><simpara> "SELECT"</simpara></listitem> <listitem><simpara> "UPDATE"</simpara></listitem> @@ -1151,15 +1282,18 @@ OCILogoff($conn); print "</PRE></HTML>"; ?> -</programlisting></example></para> - + </programlisting> + </example> + </para> </refsect1> </refentry> <refentry id="function.ocinewcursor"> <refnamediv> <refname>OCINewCursor</refname> - <refpurpose>return a new cursor (Statement-Handle) - use this to bind ref-cursors!</refpurpose> + <refpurpose> + Return a new cursor (Statement-Handle) - use to bind ref-cursors. + </refpurpose> </refnamediv> <refsect1> <title>Description</title> @@ -1170,8 +1304,8 @@ </funcprototype> </funcsynopsis> <para> - <function>OCINewCursor</function> allocates a new statement handle on the specified - connection. + <function>OCINewCursor</function> allocates a new statement handle + on the specified connection. </para> <para> <example> @@ -1245,7 +1379,9 @@ <refentry id="function.ocifreestatement"> <refnamediv> <refname>OCIFreeStatement</refname> - <refpurpose>Free all resources associated with a statement.</refpurpose> + <refpurpose> + Free all resources associated with a statement. + </refpurpose> </refnamediv> <refsect1> <title>Description</title> @@ -1256,8 +1392,8 @@ </funcprototype> </funcsynopsis> <para> - <function>OCIFreeStatement</function> returns true if successful, or false if - unsuccessful. + <function>OCIFreeStatement</function> returns true if successful, + or false if unsuccessful. </para> </refsect1> </refentry> @@ -1265,7 +1401,9 @@ <refentry id="function.ocifreecursor"> <refnamediv> <refname>OCIFreeCursor</refname> - <refpurpose>Free all resources associated with a cursor.</refpurpose> + <refpurpose> + Free all resources associated with a cursor. + </refpurpose> </refnamediv> <refsect1> <title>Description</title> @@ -1276,8 +1414,8 @@ </funcprototype> </funcsynopsis> <para> - <function>OCIFreeCursor</function> returns true if successful, or false if - unsuccessful. + <function>OCIFreeCursor</function> returns true if successful, or + false if unsuccessful. </para> </refsect1> </refentry> @@ -1295,129 +1433,13 @@ <paramdef>object <parameter>lob</parameter></paramdef> </funcprototype> </funcsynopsis> - <para> - <function>OCIFreeDesc</function> returns true if successful, or false if - unsuccessful. - </para> - </refsect1> - </refentry> - - <refentry id="function.ocicolumnname"> - <refnamediv> - <refname>OCIColumnName</refname> - <refpurpose>Returns the name of a column.</refpurpose> - </refnamediv> - <refsect1> - <title>Description</title> - <funcsynopsis> - <funcprototype> - <funcdef>string <function>OCIColumnName</function></funcdef> - <paramdef>int <parameter>stmt</parameter></paramdef> - <paramdef>int <parameter>col</parameter></paramdef> - </funcprototype> - </funcsynopsis> - <simpara> - <function>OCIColumnName</function> returns the name of the column - corresponding to the column number (1-based) that is passed in.</simpara> - - <para> - <example> - <title>OCIColumnName</title> - <programlisting> -<?php - print "<HTML><PRE>\n"; - $conn = OCILogon("scott", "tiger"); - $stmt = OCIParse($conn,"select * from emp"); - OCIExecute($stmt); - print "<TABLE BORDER=\"1\">"; - print "<TR>"; - print "<TH>Name</TH>"; - print "<TH>Type</TH>"; - print "<TH>Length</TH>"; - print "</TR>"; - $ncols = OCINumCols($stmt); - for ( $i = 1; $i <= $ncols; $i++ ) { - $column_name = OCIColumnName($stmt,$i); - $column_type = OCIColumnType($stmt,$i); - $column_size = OCIColumnSize($stmt,$i); - print "<TR>"; - print "<TD>$column_name</TD>"; - print "<TD>$column_type</TD>"; - print "<TD>$column_size</TD>"; - print "</TR>"; - } - OCIFreeStatement($stmt); - OCILogoff($conn); - print "</PRE>"; - print "</HTML>\n"; -?> - </programlisting> - </example> - </para> - <simpara> - See also <function>OCINumCols</function>, <function>OCIColumnType</function>, - and <function>OCIColumnSize</function>.</simpara> - </refsect1> - </refentry> - - <refentry id="function.ocicolumntype"> - <refnamediv> - <refname>OCIColumnType</refname> - <refpurpose>Returns the data type of a column.</refpurpose> - </refnamediv> - <refsect1> - <title>Description</title> - <funcsynopsis> - <funcprototype> - <funcdef>mixed <function>OCIColumnType</function></funcdef> - <paramdef>int <parameter>stmt</parameter></paramdef> - <paramdef>int <parameter>col</parameter></paramdef> - </funcprototype> - </funcsynopsis> - <simpara> - <function>OCIColumnType</function> returns the data type of the column - corresponding to the column number (1-based) that is passed in.</simpara> - <para> - <example> - <title>OCIColumnType</title> - <programlisting> -<?php - print "<HTML><PRE>\n"; - $conn = OCILogon("scott", "tiger"); - $stmt = OCIParse($conn,"select * from emp"); - OCIExecute($stmt); - print "<TABLE BORDER=\"1\">"; - print "<TR>"; - print "<TH>Name</TH>"; - print "<TH>Type</TH>"; - print "<TH>Length</TH>"; - print "</TR>"; - $ncols = OCINumCols($stmt); - for ( $i = 1; $i <= $ncols; $i++ ) { - $column_name = OCIColumnName($stmt,$i); - $column_type = OCIColumnType($stmt,$i); - $column_size = OCIColumnSize($stmt,$i); - print "<TR>"; - print "<TD>$column_name</TD>"; - print "<TD>$column_type</TD>"; - print "<TD>$column_size</TD>"; - print "</TR>"; - } - OCIFreeStatement($stmt); - OCILogoff($conn); - print "</PRE>"; - print "</HTML>\n"; -?> - </programlisting> - </example> + <function>OCIFreeDesc</function> returns true if successful, or + false if unsuccessful. </para> - <simpara> - See also <function>OCINumCols</function>, <function>OCIColumnName</function>, - and <function>OCIColumnSize</function>.</simpara> - </refsect1> </refentry> + <refentry id="function.ociparse"> <refnamediv> <refname>OCIParse</refname> @@ -1433,10 +1455,11 @@ </funcprototype> </funcsynopsis> <simpara> - <function>OCIParse</function> parses the <parameter>query</parameter> - using <parameter>conn</parameter>. It returns the statement - identity if the query is valid, false if not. The - <parameter>query</parameter> can be any valid SQL statement. + <function>OCIParse</function> parses the + <parameter>query</parameter> using <parameter>conn</parameter>. + It returns the statement identity if the query is valid, false if + not. The <parameter>query</parameter> can be any valid SQL + statement. </simpara> </refsect1> </refentry> @@ -1487,8 +1510,10 @@ </funcprototype> </funcsynopsis> <simpara> - <function>OCIInternalDebug</function> enables internal debug output. Set <parameter>onoff</parameter> - to 0 to turn debug output off, 1 to turn it on.</simpara> + <function>OCIInternalDebug</function> enables internal debug + output. Set <parameter>onoff</parameter> to 0 to turn debug + output off, 1 to turn it on. + </simpara> </refsect1> </refentry> </reference>
Index: phpdoc/en/functions/oci8.xml diff -u phpdoc/en/functions/oci8.xml:1.14 phpdoc/en/functions/oci8.xml:1.15 --- phpdoc/en/functions/oci8.xml:1.14 Tue Oct 31 00:11:06 2000 +++ phpdoc/en/functions/oci8.xml Sat Nov 4 22:40:30 2000 @@ -71,7 +71,7 @@ $result = OCIResult($stmt, $n); if (is_object ($result)) $result = $result->load(); -// For INSERT or UPDATE statetment use: +// For INSERT or UPDATE statement use: $sql = "insert into table (field1, field2) values (field1 = 'value', field2 = empty_clob()) returning field2 into :field2"; @@ -110,37 +110,6 @@ </example> </para> </partintro> - -<!-- -OCIBindByName -OCIDefineByName -OCIColumnIsNULL -OCIColumnName -OCIColumnSize -OCIColumnType -OCIExecute -OCIFetch -OCIFetchInto -OCIFetchStatement -OCIInternalDebug -OCILogoff -OCILogon -OCIPLogon -OCINLogon -OCIError -OCICommit -OCIRollback -OCINewCursor -OCINewDescriptor -OCIRowCount -OCINumCols -OCIParse -OCIResult -OCIServerVersion -OCIStatementType -OCIFreeStatement -OCIFreeCursor ---> <refentry id="function.ocidefinebyname"> <refnamediv> @@ -156,8 +125,9 @@ <funcdef>int <function>OCIDefineByName</function></funcdef> <paramdef>int <parameter>stmt</parameter></paramdef> <paramdef>string <parameter>Column-Name</parameter></paramdef> - <paramdef>mixed &<parameter>variable</parameter></paramdef> - <paramdef>int <parameter><optional>type</optional></parameter></paramdef> + <paramdef>mixed <parameter>variable</parameter></paramdef> + <paramdef>int <parameter><optional>type</optional></parameter> + </paramdef> </funcprototype> </funcsynopsis> <para> @@ -187,8 +157,8 @@ /* the define MUST be done BEFORE ociexecute! */ -OCIDefineByName($stmt,"EMPNO",&$empno); -OCIDefineByName($stmt,"ENAME",&$ename); +OCIDefineByName($stmt,"EMPNO",$empno); +OCIDefineByName($stmt,"ENAME",$ename); OCIExecute($stmt); @@ -208,7 +178,9 @@ <refentry id="function.ocibindbyname"> <refnamediv> <refname>OCIBindByName</refname> - <refpurpose>Bind a PHP variable to an Oracle Placeholder</refpurpose> + <refpurpose> + Bind a PHP variable to an Oracle Placeholder + </refpurpose> </refnamediv> <refsect1> <title>Description</title> @@ -218,8 +190,9 @@ <paramdef>int <parameter>stmt</parameter></paramdef> <paramdef>string <parameter>ph_name</parameter></paramdef> <paramdef>mixed &<parameter>variable</parameter></paramdef> - <paramdef>int<parameter>length</parameter></paramdef> - <paramdef>int <parameter><optional>type</optional></parameter></paramdef> + <paramdef>int <parameter>length</parameter></paramdef> + <paramdef>int <parameter> + <optional>type</optional></parameter></paramdef> </funcprototype> </funcsynopsis> <para> @@ -228,7 +201,7 @@ <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> paramter sets the maximum length + <parameter>length</parameter> parameter sets the maximum length for the bind. If you set <parameter>length</parameter> to -1 <function>OCIBindByName</function> will use the current length of <parameter>variable</parameter> to set the maximum length. @@ -249,7 +222,7 @@ <programlisting> <?php /* OCIBindByPos example thies@thieso.net (980221) - inserts 3 resords into emp, and uses the ROWID for updating the + inserts 3 records into emp, and uses the ROWID for updating the records just after the insert. */ @@ -302,11 +275,11 @@ <warning> <para> It is a bad idea to use magic quotes and - <function>OciBindByName</function> simultaneously as no qouting + <function>OciBindByName</function> simultaneously as no quoting is needed on quoted variables and any quotes magically applied - will be written into your database as <function>OciBindByName</function> - is not able to distinguish magically added quotings from those added by - intention. + will be written into your database as + <function>OciBindByName</function> is not able to distinguish + magically added quotings from those added by intention. </para> </warning> </refsect1> @@ -324,7 +297,9 @@ <funcdef>int <function>OCILogon</function></funcdef> <paramdef>string <parameter>username</parameter></paramdef> <paramdef>string <parameter>password</parameter></paramdef> - <paramdef>string <parameter><optional>db</optional></parameter></paramdef> + <paramdef>string + <parameter><optional>db</optional></parameter> + </paramdef> </funcprototype> </funcsynopsis> <para> @@ -380,7 +355,7 @@ function commit($conn) { ocicommit($conn); - echo $conn." commited\n\n"; + echo $conn." committed\n\n"; } function rollback($conn) @@ -435,8 +410,8 @@ <refentry id="function.ociplogon"> <refnamediv> <refname>OCIPLogon</refname> - <refpurpose>Connect to an Oracle database and log on using a persistant connection. - Returns a new session.</refpurpose> + <refpurpose>Connect to an Oracle database and log on using a + persistant connection. Returns a new session.</refpurpose> </refnamediv> <refsect1> <title>Description</title> @@ -445,7 +420,9 @@ <funcdef>int <function>OCIPLogon</function></funcdef> <paramdef>string <parameter>username</parameter></paramdef> <paramdef>string <parameter>password</parameter></paramdef> - <paramdef>string <parameter><optional>db</optional></parameter></paramdef> + <paramdef>string + <parameter><optional>db</optional></parameter> + </paramdef> </funcprototype> </funcsynopsis> <para> @@ -459,14 +436,16 @@ </para> <simpara> See also <function>OCILogon</function> and - <function>OCINLogon</function>.</simpara> - </refsect1></refentry> + <function>OCINLogon</function>. + </simpara> + </refsect1> + </refentry> <refentry id="function.ocinlogon"> <refnamediv> <refname>OCINLogon</refname> - <refpurpose>Connect to an Oracle database and log on using a new connection. - Returns a new session.</refpurpose> + <refpurpose>Connect to an Oracle database and log on using a new + connection. Returns a new session.</refpurpose> </refnamediv> <refsect1> <title>Description</title> @@ -475,7 +454,9 @@ <funcdef>int <function>OCINLogon</function></funcdef> <paramdef>string <parameter>username</parameter></paramdef> <paramdef>string <parameter>password</parameter></paramdef> - <paramdef>string <parameter><optional>db</optional></parameter></paramdef> + <paramdef>string + <parameter><optional>db</optional></parameter> + </paramdef> </funcprototype> </funcsynopsis> <para> @@ -536,7 +517,7 @@ function commit($conn) { ocicommit($conn); - echo $conn." commited\n\n"; + echo $conn." committed\n\n"; } function rollback($conn) @@ -580,11 +561,14 @@ drop_table($c1); print "</PRE></HTML>"; -?></programlisting></example></para> +?></programlisting></example> + </para> <simpara> See also <function>OCILogon</function> and - <function>OCIPLogon</function>.</simpara> - </refsect1></refentry> + <function>OCIPLogon</function>. + </simpara> + </refsect1> + </refentry> <refentry id="function.ocilogoff"> <refnamediv> @@ -616,15 +600,18 @@ <funcprototype> <funcdef>int <function>OCIExecute</function></funcdef> <paramdef>int <parameter>statement</parameter></paramdef> - <paramdef>int <parameter><optional>mode</optional></parameter></paramdef> + <paramdef>int + <parameter><optional>mode</optional></parameter> + </paramdef> </funcprototype> </funcsynopsis> <para> - <function>OCIExecute</function> executes a previously parsed statement. - (see <function>OCIParse</function>). The optional <parameter>mode</parameter> - allows you to specify the execution-mode (default is OCI_COMMIT_ON_SUCCESS). - If you don't want statements to be commited automaticly specify OCI_DEFAULT as - your mode. + <function>OCIExecute</function> executes a previously parsed + statement. (see <function>OCIParse</function>. The optional + <parameter>mode</parameter> allows you to specify the + execution-mode (default is OCI_COMMIT_ON_SUCCESS). If you don't + want statements to be committed automaticly specify OCI_DEFAULT as + your mode. </para> </refsect1> </refentry> @@ -643,8 +630,8 @@ </funcprototype> </funcsynopsis> <para> - <function>OCICommit</function> commits all outstanding statements for - Oracle connection <parameter>connection</parameter>. + <function>OCICommit</function> commits all outstanding statements + for Oracle connection <parameter>connection</parameter>. </para> </refsect1> </refentry> @@ -663,8 +650,8 @@ </funcprototype> </funcsynopsis> <para> - <function>OCIRollback</function> rolls back all outstanding statements for - Oracle connection <parameter>connection</parameter>. + <function>OCIRollback</function> rolls back all outstanding + statements for Oracle connection <parameter>connection</parameter>. </para> </refsect1> </refentry> @@ -672,7 +659,9 @@ <refentry id="function.ocinewdescriptor"> <refnamediv> <refname>OCINewDescriptor</refname> - <refpurpose>Initialize a new empty descriptor LOB/FILE (LOB is default)</refpurpose> + <refpurpose> + Initialize a new empty descriptor LOB/FILE (LOB is default) + </refpurpose> </refnamediv> <refsect1> <title>Description</title> @@ -680,16 +669,18 @@ <funcprototype> <funcdef>string <function>OCINewDescriptor</function></funcdef> <paramdef>int <parameter>connection</parameter></paramdef> - <paramdef>int <parameter><optional>type</optional></parameter></paramdef> + <paramdef>int + <parameter><optional>type</optional></parameter> + </paramdef> </funcprototype> </funcsynopsis> <para> <function>OCINewDescriptor</function> Allocates storage to hold descriptors or LOB locators. Valid values for the valid <parameter>type</parameter> are OCI_D_FILE, OCI_D_LOB, OCI_D_ROWID. - For LOB desriptors, the methods load, save, and savefile are - associated with the descriptor, for BFILE only the load method exists. - See the second example usage hints. + For LOB descriptors, the methods load, save, and savefile are + associated with the descriptor, for BFILE only the load method + exists. See the second example usage hints. </para> <example> <title>OCINewDescriptor</title> @@ -776,7 +767,7 @@ </funcsynopsis> <para> <function>OCIRowCount</function> returns the number of rows affected - for eg update-statements. This funtions will not tell you the number + for eg update-statements. This function will not tell you the number of rows that a select will return!</para> <para> <example> @@ -799,15 +790,17 @@ OCIFreeStatement($stmt); OCILogOff($conn); print "</PRE></HTML>"; -?> </programlisting></example></para> - +?> </programlisting></example> + </para> </refsect1> </refentry> <refentry id="function.ocinumcols"> <refnamediv> <refname>OCINumCols</refname> - <refpurpose>Return the number of result columns in a statement</refpurpose> + <refpurpose> + Return the number of result columns in a statement + </refpurpose> </refnamediv> <refsect1> <title>Description</title> @@ -852,7 +845,7 @@ <refentry id="function.ociresult"> <refnamediv> <refname>OCIResult</refname> - <refpurpose>Returns coulumn value for fetched row</refpurpose> + <refpurpose>Returns column value for fetched row</refpurpose> </refnamediv> <refsect1> <title>Description</title> @@ -867,7 +860,8 @@ <function>OCIResult</function> returns the data for column <parameter>column</parameter> in the current row (see <function>OCIFetch</function>).<function>OCIResult</function> will - return everything as strings except for abstract types (ROWIDs, LOBs and FILEs). + return everything as strings except for abstract types (ROWIDs, + LOBs and FILEs). </para> </refsect1> </refentry> @@ -886,8 +880,8 @@ </funcprototype> </funcsynopsis> <para> - <function>OCIFetch</function> fetches the next row (for SELECT statements) - into the internal result-buffer. + <function>OCIFetch</function> fetches the next row (for SELECT + statements) into the internal result-buffer. </para> </refsect1> </refentry> @@ -904,31 +898,40 @@ <funcdef>int <function>OCIFetchInto</function></funcdef> <paramdef>int <parameter>stmt</parameter></paramdef> <paramdef>array &<parameter>result</parameter></paramdef> - <paramdef>int <parameter><optional>mode</optional></parameter></paramdef> + <paramdef>int + <parameter><optional>mode</optional></parameter> + </paramdef> </funcprototype> </funcsynopsis> <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 - <parameter>result</parameter> will contain a one-based array of all columns - that are not NULL. + <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 + <parameter>result</parameter> will contain a one-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 addig them up - (eg OCI_ASSOC+OCI_RETURN_NULLS). The known flags are: - + The <parameter>mode</parameter> parameter allows you to change the + default behaviour. You can specify more than one flag by simply + adding them up (eg OCI_ASSOC+OCI_RETURN_NULLS). The known flags + are: <simplelist> - <member><literal>OCI_ASSOC</literal> Return an associative array.</member> - <member><literal>OCI_NUM</literal> Return an numbered array - starting with one. (DEFAULT)</member> - <member><literal>OCI_RETURN_NULLS</literal> Return empty columns.</member> - <member><literal>OCI_RETURN_LOBS</literal> Return the value of a LOB instead of the desxriptor.</member> + <member> + <literal>OCI_ASSOC</literal> Return an associative array. + </member> + <member> + <literal>OCI_NUM</literal> Return an numbered array starting with + one. (DEFAULT) + </member> + <member> + <literal>OCI_RETURN_NULLS</literal> Return empty columns. + </member> + <member> + <literal>OCI_RETURN_LOBS</literal> Return the value of a LOB + instead of the descriptor. + </member> </simplelist> - - </para> - <para> </para> </refsect1> </refentry> @@ -949,8 +952,9 @@ </funcsynopsis> <para> <function>OCIFetchStatement</function> fetches all the rows from a - result into a user-defined array. <function>OCIFetchStatement</function> - returns the number of rows fetched. + result into a user-defined array. + <function>OCIFetchStatement</function> returns the number of rows + fetched. </para> <example> <title>OCIFetchStatement</title> @@ -990,11 +994,12 @@ OCIFreeStatement($stmt); OCILogoff($conn); - -?></programlisting></example> - +?> + </programlisting> + </example> </refsect1> </refentry> + <refentry id="function.ocicolumnisnull"> <refnamediv> <refname>OCIColumnIsNULL</refname> @@ -1013,12 +1018,71 @@ <function>OCIColumnIsNULL</function> returns true if the returned column <parameter>column</parameter> in the result from the statement <parameter>stmt</parameter> is NULL. You can either use - the column-number (1-Based) or the column-name for the <parameter>col</parameter> - parameter. + the column-number (1-Based) or the column-name for the + <parameter>col</parameter> parameter. </para> </refsect1> </refentry> + <refentry id="function.ocicolumnname"> + <refnamediv> + <refname>OCIColumnName</refname> + <refpurpose>Returns the name of a column.</refpurpose> + </refnamediv> + <refsect1> + <title>Description</title> + <funcsynopsis> + <funcprototype> + <funcdef>string <function>OCIColumnName</function></funcdef> + <paramdef>int <parameter>stmt</parameter></paramdef> + <paramdef>int <parameter>col</parameter></paramdef> + </funcprototype> + </funcsynopsis> + <simpara> + <function>OCIColumnName</function> returns the name of the column + corresponding to the column number (1-based) that is passed in. + </simpara> + <para> + <example> + <title>OCIColumnName</title> + <programlisting> +<?php + print "<HTML><PRE>\n"; + $conn = OCILogon("scott", "tiger"); + $stmt = OCIParse($conn,"select * from emp"); + OCIExecute($stmt); + print "<TABLE BORDER=\"1\">"; + print "<TR>"; + print "<TH>Name</TH>"; + print "<TH>Type</TH>"; + print "<TH>Length</TH>"; + print "</TR>"; + $ncols = OCINumCols($stmt); + for ( $i = 1; $i <= $ncols; $i++ ) { + $column_name = OCIColumnName($stmt,$i); + $column_type = OCIColumnType($stmt,$i); + $column_size = OCIColumnSize($stmt,$i); + print "<TR>"; + print "<TD>$column_name</TD>"; + print "<TD>$column_type</TD>"; + print "<TD>$column_size</TD>"; + print "</TR>"; + } + OCIFreeStatement($stmt); + OCILogoff($conn); + print "</PRE>"; + print "</HTML>\n"; +?> + </programlisting> + </example> + </para> + <simpara> + See also <function>OCINumCols</function>, + <function>OCIColumnType</function>, + and <function>OCIColumnSize</function>. + </simpara> + </refsect1> + </refentry> <refentry id="function.ocicolumnsize"> <refnamediv> @@ -1037,8 +1101,8 @@ <para> <function>OCIColumnSize</function> returns the size of the column as given by Oracle. You can either use - the column-number (1-Based) or the column-name for the <parameter>col</parameter> - parameter. + the column-number (1-Based) or the column-name for the + <parameter>col</parameter> parameter. </para> <para> <example> @@ -1075,16 +1139,80 @@ </programlisting> </example> </para> + <simpara> + See also <function>OCINumCols</function>, + <function>OCIColumnName</function>, and + <function>OCIColumnSize</function>. + </simpara> + </refsect1> + </refentry> + + <refentry id="function.ocicolumntype"> + <refnamediv> + <refname>OCIColumnType</refname> + <refpurpose>Returns the data type of a column.</refpurpose> + </refnamediv> + <refsect1> + <title>Description</title> + <funcsynopsis> + <funcprototype> + <funcdef>mixed <function>OCIColumnType</function></funcdef> + <paramdef>int <parameter>stmt</parameter></paramdef> + <paramdef>int <parameter>col</parameter></paramdef> + </funcprototype> + </funcsynopsis> + <simpara> + <function>OCIColumnType</function> returns the data type of the + column corresponding to the column number (1-based) that is passed + in. + </simpara> + <para> + <example> + <title>OCIColumnType</title> + <programlisting> +<?php + print "<HTML><PRE>\n"; + $conn = OCILogon("scott", "tiger"); + $stmt = OCIParse($conn,"select * from emp"); + OCIExecute($stmt); + print "<TABLE BORDER=\"1\">"; + print "<TR>"; + print "<TH>Name</TH>"; + print "<TH>Type</TH>"; + print "<TH>Length</TH>"; + print "</TR>"; + $ncols = OCINumCols($stmt); + for ( $i = 1; $i <= $ncols; $i++ ) { + $column_name = OCIColumnName($stmt,$i); + $column_type = OCIColumnType($stmt,$i); + $column_size = OCIColumnSize($stmt,$i); + print "<TR>"; + print "<TD>$column_name</TD>"; + print "<TD>$column_type</TD>"; + print "<TD>$column_size</TD>"; + print "</TR>"; + } + OCIFreeStatement($stmt); + OCILogoff($conn); + print "</PRE>"; + print "</HTML>\n"; +?> + </programlisting> + </example> + </para> <simpara> - See also <function>OCINumCols</function>, <function>OCIColumnName</function>, - and <function>OCIColumnSize</function>.</simpara> + See also <function>OCINumCols</function>, + <function>OCIColumnName</function>, + and <function>OCIColumnSize</function>. + </simpara> </refsect1> </refentry> <refentry id="function.ociserverversion"> <refnamediv> <refname>OCIServerVersion</refname> - <refpurpose>Return a string containing server version information.</refpurpose> + <refpurpose>Return a string containing server version + information.</refpurpose> </refnamediv> <refsect1> <title>Description</title> @@ -1102,8 +1230,10 @@ $conn = OCILogon("scott","tiger"); print "Server Version: " . OCIServerVersion($conn); OCILogOff($conn); -?></programlisting></example></para> - +?> + </programlisting> + </example> + </para> </refsect1> </refentry> @@ -1121,7 +1251,8 @@ </funcprototype> </funcsynopsis> <para> - <function>OCIStatementType</function> returns on of the following values: + <function>OCIStatementType</function> returns one of the following + values: <orderedlist> <listitem><simpara> "SELECT"</simpara></listitem> <listitem><simpara> "UPDATE"</simpara></listitem> @@ -1151,15 +1282,18 @@ OCILogoff($conn); print "</PRE></HTML>"; ?> -</programlisting></example></para> - + </programlisting> + </example> + </para> </refsect1> </refentry> <refentry id="function.ocinewcursor"> <refnamediv> <refname>OCINewCursor</refname> - <refpurpose>return a new cursor (Statement-Handle) - use this to bind ref-cursors!</refpurpose> + <refpurpose> + Return a new cursor (Statement-Handle) - use to bind ref-cursors. + </refpurpose> </refnamediv> <refsect1> <title>Description</title> @@ -1170,8 +1304,8 @@ </funcprototype> </funcsynopsis> <para> - <function>OCINewCursor</function> allocates a new statement handle on the specified - connection. + <function>OCINewCursor</function> allocates a new statement handle + on the specified connection. </para> <para> <example> @@ -1245,7 +1379,9 @@ <refentry id="function.ocifreestatement"> <refnamediv> <refname>OCIFreeStatement</refname> - <refpurpose>Free all resources associated with a statement.</refpurpose> + <refpurpose> + Free all resources associated with a statement. + </refpurpose> </refnamediv> <refsect1> <title>Description</title> @@ -1256,8 +1392,8 @@ </funcprototype> </funcsynopsis> <para> - <function>OCIFreeStatement</function> returns true if successful, or false if - unsuccessful. + <function>OCIFreeStatement</function> returns true if successful, + or false if unsuccessful. </para> </refsect1> </refentry> @@ -1265,7 +1401,9 @@ <refentry id="function.ocifreecursor"> <refnamediv> <refname>OCIFreeCursor</refname> - <refpurpose>Free all resources associated with a cursor.</refpurpose> + <refpurpose> + Free all resources associated with a cursor. + </refpurpose> </refnamediv> <refsect1> <title>Description</title> @@ -1276,8 +1414,8 @@ </funcprototype> </funcsynopsis> <para> - <function>OCIFreeCursor</function> returns true if successful, or false if - unsuccessful. + <function>OCIFreeCursor</function> returns true if successful, or + false if unsuccessful. </para> </refsect1> </refentry> @@ -1295,129 +1433,13 @@ <paramdef>object <parameter>lob</parameter></paramdef> </funcprototype> </funcsynopsis> - <para> - <function>OCIFreeDesc</function> returns true if successful, or false if - unsuccessful. - </para> - </refsect1> - </refentry> - - <refentry id="function.ocicolumnname"> - <refnamediv> - <refname>OCIColumnName</refname> - <refpurpose>Returns the name of a column.</refpurpose> - </refnamediv> - <refsect1> - <title>Description</title> - <funcsynopsis> - <funcprototype> - <funcdef>string <function>OCIColumnName</function></funcdef> - <paramdef>int <parameter>stmt</parameter></paramdef> - <paramdef>int <parameter>col</parameter></paramdef> - </funcprototype> - </funcsynopsis> - <simpara> - <function>OCIColumnName</function> returns the name of the column - corresponding to the column number (1-based) that is passed in.</simpara> - - <para> - <example> - <title>OCIColumnName</title> - <programlisting> -<?php - print "<HTML><PRE>\n"; - $conn = OCILogon("scott", "tiger"); - $stmt = OCIParse($conn,"select * from emp"); - OCIExecute($stmt); - print "<TABLE BORDER=\"1\">"; - print "<TR>"; - print "<TH>Name</TH>"; - print "<TH>Type</TH>"; - print "<TH>Length</TH>"; - print "</TR>"; - $ncols = OCINumCols($stmt); - for ( $i = 1; $i <= $ncols; $i++ ) { - $column_name = OCIColumnName($stmt,$i); - $column_type = OCIColumnType($stmt,$i); - $column_size = OCIColumnSize($stmt,$i); - print "<TR>"; - print "<TD>$column_name</TD>"; - print "<TD>$column_type</TD>"; - print "<TD>$column_size</TD>"; - print "</TR>"; - } - OCIFreeStatement($stmt); - OCILogoff($conn); - print "</PRE>"; - print "</HTML>\n"; -?> - </programlisting> - </example> - </para> - <simpara> - See also <function>OCINumCols</function>, <function>OCIColumnType</function>, - and <function>OCIColumnSize</function>.</simpara> - </refsect1> - </refentry> - - <refentry id="function.ocicolumntype"> - <refnamediv> - <refname>OCIColumnType</refname> - <refpurpose>Returns the data type of a column.</refpurpose> - </refnamediv> - <refsect1> - <title>Description</title> - <funcsynopsis> - <funcprototype> - <funcdef>mixed <function>OCIColumnType</function></funcdef> - <paramdef>int <parameter>stmt</parameter></paramdef> - <paramdef>int <parameter>col</parameter></paramdef> - </funcprototype> - </funcsynopsis> - <simpara> - <function>OCIColumnType</function> returns the data type of the column - corresponding to the column number (1-based) that is passed in.</simpara> - <para> - <example> - <title>OCIColumnType</title> - <programlisting> -<?php - print "<HTML><PRE>\n"; - $conn = OCILogon("scott", "tiger"); - $stmt = OCIParse($conn,"select * from emp"); - OCIExecute($stmt); - print "<TABLE BORDER=\"1\">"; - print "<TR>"; - print "<TH>Name</TH>"; - print "<TH>Type</TH>"; - print "<TH>Length</TH>"; - print "</TR>"; - $ncols = OCINumCols($stmt); - for ( $i = 1; $i <= $ncols; $i++ ) { - $column_name = OCIColumnName($stmt,$i); - $column_type = OCIColumnType($stmt,$i); - $column_size = OCIColumnSize($stmt,$i); - print "<TR>"; - print "<TD>$column_name</TD>"; - print "<TD>$column_type</TD>"; - print "<TD>$column_size</TD>"; - print "</TR>"; - } - OCIFreeStatement($stmt); - OCILogoff($conn); - print "</PRE>"; - print "</HTML>\n"; -?> - </programlisting> - </example> + <function>OCIFreeDesc</function> returns true if successful, or + false if unsuccessful. </para> - <simpara> - See also <function>OCINumCols</function>, <function>OCIColumnName</function>, - and <function>OCIColumnSize</function>.</simpara> - </refsect1> </refentry> + <refentry id="function.ociparse"> <refnamediv> <refname>OCIParse</refname> @@ -1433,10 +1455,11 @@ </funcprototype> </funcsynopsis> <simpara> - <function>OCIParse</function> parses the <parameter>query</parameter> - using <parameter>conn</parameter>. It returns the statement - identity if the query is valid, false if not. The - <parameter>query</parameter> can be any valid SQL statement. + <function>OCIParse</function> parses the + <parameter>query</parameter> using <parameter>conn</parameter>. + It returns the statement identity if the query is valid, false if + not. The <parameter>query</parameter> can be any valid SQL + statement. </simpara> </refsect1> </refentry> @@ -1487,8 +1510,10 @@ </funcprototype> </funcsynopsis> <simpara> - <function>OCIInternalDebug</function> enables internal debug output. Set <parameter>onoff</parameter> - to 0 to turn debug output off, 1 to turn it on.</simpara> + <function>OCIInternalDebug</function> enables internal debug + output. Set <parameter>onoff</parameter> to 0 to turn debug + output off, 1 to turn it on. + </simpara> </refsect1> </refentry> </reference>