Typos, indentation, line breaks, reordering function listing, updating some text.

git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@35288 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
Ron Chmara 2000-11-05 06:40:30 +00:00
parent f5c9a58abd
commit b9e9eeb471

View file

@ -71,7 +71,7 @@ OCIExecute($stmt, OCI_DEFAULT);
$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 @@ $sth = OCIParse ( $dbh, "begin sp_newaddress( :address_id, '$firstname',
</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 @@ OCIFreeCursor
<funcdef>int <function>OCIDefineByName</function></funcdef>
<paramdef>int <parameter>stmt</parameter></paramdef>
<paramdef>string <parameter>Column-Name</parameter></paramdef>
<paramdef>mixed &amp;<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 @@ $stmt = OCIParse($conn,"select empno, ename from emp");
/* the define MUST be done BEFORE ociexecute! */
OCIDefineByName($stmt,"EMPNO",&amp;$empno);
OCIDefineByName($stmt,"ENAME",&amp;$ename);
OCIDefineByName($stmt,"EMPNO",$empno);
OCIDefineByName($stmt,"ENAME",$ename);
OCIExecute($stmt);
@ -208,7 +178,9 @@ OCILogoff($conn);
<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 @@ OCILogoff($conn);
<paramdef>int <parameter>stmt</parameter></paramdef>
<paramdef>string <parameter>ph_name</parameter></paramdef>
<paramdef>mixed &amp;<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 @@ OCILogoff($conn);
<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 @@ OCILogoff($conn);
<programlisting>
&lt;?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 @@ OCILogoff($conn);
<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 @@ OCILogoff($conn);
<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 delete_data($conn)
function commit($conn)
{ ocicommit($conn);
echo $conn." commited\n\n";
echo $conn." committed\n\n";
}
function rollback($conn)
@ -435,8 +410,8 @@ print "&lt;/PRE>&lt;/HTML>";
<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 @@ print "&lt;/PRE>&lt;/HTML>";
<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 @@ print "&lt;/PRE>&lt;/HTML>";
</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 @@ print "&lt;/PRE>&lt;/HTML>";
<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 delete_data($conn)
function commit($conn)
{ ocicommit($conn);
echo $conn." commited\n\n";
echo $conn." committed\n\n";
}
function rollback($conn)
@ -580,11 +561,14 @@ select_data($c2);
drop_table($c1);
print "&lt;/PRE>&lt;/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 @@ print "&lt;/PRE>&lt;/HTML>";
<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 @@ print "&lt;/PRE>&lt;/HTML>";
</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 @@ print "&lt;/PRE>&lt;/HTML>";
</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 @@ print "&lt;/PRE>&lt;/HTML>";
<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 @@ print "&lt;/PRE>&lt;/HTML>";
<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 @@ Upload file: &lt;input type="file" name="lob_upload">&lt;br>
</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 @@ Upload file: &lt;input type="file" name="lob_upload">&lt;br>
OCIFreeStatement($stmt);
OCILogOff($conn);
print "&lt;/PRE>&lt;/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 @@ Upload file: &lt;input type="file" name="lob_upload">&lt;br>
<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 @@ Upload file: &lt;input type="file" name="lob_upload">&lt;br>
<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 @@ Upload file: &lt;input type="file" name="lob_upload">&lt;br>
</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 @@ Upload file: &lt;input type="file" name="lob_upload">&lt;br>
<funcdef>int <function>OCIFetchInto</function></funcdef>
<paramdef>int <parameter>stmt</parameter></paramdef>
<paramdef>array &amp;<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 @@ Upload file: &lt;input type="file" name="lob_upload">&lt;br>
</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 @@ print "$nrows Records Selected&lt;BR>\n";
OCIFreeStatement($stmt);
OCILogoff($conn);
?></programlisting></example>
?>
</programlisting>
</example>
</refsect1>
</refentry>
<refentry id="function.ocicolumnisnull">
<refnamediv>
<refname>OCIColumnIsNULL</refname>
@ -1013,12 +1018,71 @@ OCILogoff($conn);
<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>
&lt;?php
print "&lt;HTML>&lt;PRE>\n";
$conn = OCILogon("scott", "tiger");
$stmt = OCIParse($conn,"select * from emp");
OCIExecute($stmt);
print "&lt;TABLE BORDER=\"1\">";
print "&lt;TR>";
print "&lt;TH>Name&lt;/TH>";
print "&lt;TH>Type&lt;/TH>";
print "&lt;TH>Length&lt;/TH>";
print "&lt;/TR>";
$ncols = OCINumCols($stmt);
for ( $i = 1; $i &lt;= $ncols; $i++ ) {
$column_name = OCIColumnName($stmt,$i);
$column_type = OCIColumnType($stmt,$i);
$column_size = OCIColumnSize($stmt,$i);
print "&lt;TR>";
print "&lt;TD>$column_name&lt;/TD>";
print "&lt;TD>$column_type&lt;/TD>";
print "&lt;TD>$column_size&lt;/TD>";
print "&lt;/TR>";
}
OCIFreeStatement($stmt);
OCILogoff($conn);
print "&lt;/PRE>";
print "&lt;/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 @@ OCILogoff($conn);
<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>
@ -1076,15 +1140,79 @@ OCILogoff($conn);
</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.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>
&lt;?php
print "&lt;HTML>&lt;PRE>\n";
$conn = OCILogon("scott", "tiger");
$stmt = OCIParse($conn,"select * from emp");
OCIExecute($stmt);
print "&lt;TABLE BORDER=\"1\">";
print "&lt;TR>";
print "&lt;TH>Name&lt;/TH>";
print "&lt;TH>Type&lt;/TH>";
print "&lt;TH>Length&lt;/TH>";
print "&lt;/TR>";
$ncols = OCINumCols($stmt);
for ( $i = 1; $i &lt;= $ncols; $i++ ) {
$column_name = OCIColumnName($stmt,$i);
$column_type = OCIColumnType($stmt,$i);
$column_size = OCIColumnSize($stmt,$i);
print "&lt;TR>";
print "&lt;TD>$column_name&lt;/TD>";
print "&lt;TD>$column_type&lt;/TD>";
print "&lt;TD>$column_size&lt;/TD>";
print "&lt;/TR>";
}
OCIFreeStatement($stmt);
OCILogoff($conn);
print "&lt;/PRE>";
print "&lt;/HTML>\n";
?>
</programlisting>
</example>
</para>
<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 @@ OCILogoff($conn);
$conn = OCILogon("scott","tiger");
print "Server Version: " . OCIServerVersion($conn);
OCILogOff($conn);
?></programlisting></example></para>
?>
</programlisting>
</example>
</para>
</refsect1>
</refentry>
@ -1121,7 +1251,8 @@ OCILogoff($conn);
</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);
OCILogoff($conn);
print "&lt;/PRE>&lt;/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 @@ OCILogoff($conn);
</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 @@ OCILogoff($conn);
<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 @@ OCILogoff($conn);
</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 @@ OCILogoff($conn);
<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 @@ OCILogoff($conn);
</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>
@ -1296,128 +1434,12 @@ OCILogoff($conn);
</funcprototype>
</funcsynopsis>
<para>
<function>OCIFreeDesc</function> returns true if successful, or false if
unsuccessful.
<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>
&lt;?php
print "&lt;HTML>&lt;PRE>\n";
$conn = OCILogon("scott", "tiger");
$stmt = OCIParse($conn,"select * from emp");
OCIExecute($stmt);
print "&lt;TABLE BORDER=\"1\">";
print "&lt;TR>";
print "&lt;TH>Name&lt;/TH>";
print "&lt;TH>Type&lt;/TH>";
print "&lt;TH>Length&lt;/TH>";
print "&lt;/TR>";
$ncols = OCINumCols($stmt);
for ( $i = 1; $i &lt;= $ncols; $i++ ) {
$column_name = OCIColumnName($stmt,$i);
$column_type = OCIColumnType($stmt,$i);
$column_size = OCIColumnSize($stmt,$i);
print "&lt;TR>";
print "&lt;TD>$column_name&lt;/TD>";
print "&lt;TD>$column_type&lt;/TD>";
print "&lt;TD>$column_size&lt;/TD>";
print "&lt;/TR>";
}
OCIFreeStatement($stmt);
OCILogoff($conn);
print "&lt;/PRE>";
print "&lt;/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>
&lt;?php
print "&lt;HTML>&lt;PRE>\n";
$conn = OCILogon("scott", "tiger");
$stmt = OCIParse($conn,"select * from emp");
OCIExecute($stmt);
print "&lt;TABLE BORDER=\"1\">";
print "&lt;TR>";
print "&lt;TH>Name&lt;/TH>";
print "&lt;TH>Type&lt;/TH>";
print "&lt;TH>Length&lt;/TH>";
print "&lt;/TR>";
$ncols = OCINumCols($stmt);
for ( $i = 1; $i &lt;= $ncols; $i++ ) {
$column_name = OCIColumnName($stmt,$i);
$column_type = OCIColumnType($stmt,$i);
$column_size = OCIColumnSize($stmt,$i);
print "&lt;TR>";
print "&lt;TD>$column_name&lt;/TD>";
print "&lt;TD>$column_type&lt;/TD>";
print "&lt;TD>$column_size&lt;/TD>";
print "&lt;/TR>";
}
OCIFreeStatement($stmt);
OCILogoff($conn);
print "&lt;/PRE>";
print "&lt;/HTML>\n";
?>
</programlisting>
</example>
</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 @@ OCILogoff($conn);
</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 @@ OCILogoff($conn);
</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>