goba Fri Mar 29 13:32:49 2002 EDT Modified files: /phpdoc/en/functions oci8.xml Log: Various fixes, including - adding note to file uploads about more secure methods - uppercase all refurposes first letter - stripped very long refpursposes - removed . from end of refpurposes - added some more explanatory example titles - fixed some example PHP and HTML errors - a very small number of WS fixes may be inside two
Index: phpdoc/en/functions/oci8.xml diff -u phpdoc/en/functions/oci8.xml:1.44 phpdoc/en/functions/oci8.xml:1.45 --- phpdoc/en/functions/oci8.xml:1.44 Fri Mar 29 09:47:32 2002 +++ phpdoc/en/functions/oci8.xml Fri Mar 29 13:32:48 2002 @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.44 $ --> +<!-- $Revision: 1.45 $ --> <reference id="ref.oci8"> <title>Oracle 8 functions</title> <titleabbrev>OCI8</titleabbrev> @@ -692,7 +692,7 @@ <refnamediv> <refname>OCINewDescriptor</refname> <refpurpose> - Initialize a new empty descriptor LOB/FILE (LOB is default) + Initialize a new empty LOB or FILE descriptor </refpurpose> </refnamediv> <refsect1> @@ -703,8 +703,8 @@ <methodparam choice="opt"><type>int</type><parameter>type</parameter></methodparam> </methodsynopsis> <para> - <function>OCINewDescriptor</function> Allocates storage to hold - descriptors or LOB locators. Valid values for the valid + <function>OCINewDescriptor</function> allocates storage to hold + descriptors or LOB locators. Valid values for <parameter>type</parameter> are OCI_D_FILE, OCI_D_LOB, OCI_D_ROWID. For LOB descriptors, the methods load, save, and savefile are associated with the descriptor, for BFILE only the load method @@ -748,19 +748,24 @@ <?php /* This script demonstrates file upload to LOB columns * The formfield used for this example looks like this - * <form action="upload.php3" method="post" enctype="multipart/form-data"> + * <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.php3" method="post" enctype="multipart/form-data"> +<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"> </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 = OCILogon($user, $password); $lob = OCINewDescriptor($conn, OCI_D_LOB); $stmt = OCIParse($conn,"insert into $table (id, the_blob) @@ -876,7 +881,7 @@ </methodsynopsis> <para> <function>OCINumCols</function> returns the number of columns in a - statement + statement. </para> <example> <title>OCINumCols</title> @@ -997,7 +1002,7 @@ <refentry id="function.ocifetchstatement"> <refnamediv> <refname>OCIFetchStatement</refname> - <refpurpose>Fetch all rows of result data into an array.</refpurpose> + <refpurpose>Fetch all rows of result data into an array</refpurpose> </refnamediv> <refsect1> <title>Description</title> @@ -1061,7 +1066,7 @@ <refentry id="function.ocicolumnisnull"> <refnamediv> <refname>OCIColumnIsNULL</refname> - <refpurpose>test whether a result column is &null;</refpurpose> + <refpurpose>Test whether a result column is &null;</refpurpose> </refnamediv> <refsect1> <title>Description</title> @@ -1083,7 +1088,7 @@ <refentry id="function.ocicolumnname"> <refnamediv> <refname>OCIColumnName</refname> - <refpurpose>Returns the name of a column.</refpurpose> + <refpurpose>Returns the name of a column</refpurpose> </refnamediv> <refsect1> <title>Description</title> @@ -1123,6 +1128,7 @@ print "<TD>$column_size</TD>"; print "</TR>"; } + print "</TABLE>\n"; OCIFreeStatement($stmt); OCILogoff($conn); print "</PRE>"; @@ -1143,7 +1149,7 @@ <refentry id="function.ocicolumnsize"> <refnamediv> <refname>OCIColumnSize</refname> - <refpurpose>return result column size</refpurpose> + <refpurpose>Return result column size</refpurpose> </refnamediv> <refsect1> <title>Description</title> @@ -1206,7 +1212,7 @@ <refentry id="function.ocicolumntype"> <refnamediv> <refname>OCIColumnType</refname> - <refpurpose>Returns the data type of a column.</refpurpose> + <refpurpose>Returns the data type of a column</refpurpose> </refnamediv> <refsect1> <title>Description</title> @@ -1247,6 +1253,7 @@ print "<TD>$column_size</TD>"; print "</TR>"; } + print "</TABLE>\n"; OCIFreeStatement($stmt); OCILogoff($conn); print "</PRE>"; @@ -1268,7 +1275,7 @@ <refnamediv> <refname>OCIServerVersion</refname> <refpurpose>Return a string containing server version - information.</refpurpose> + information</refpurpose> </refnamediv> <refsect1> <title>Description</title> @@ -1296,7 +1303,7 @@ <refentry id="function.ocistatementtype"> <refnamediv> <refname>OCIStatementType</refname> - <refpurpose>Return the type of an OCI statement.</refpurpose> + <refpurpose>Return the type of an OCI statement</refpurpose> </refnamediv> <refsect1> <title>Description</title> @@ -1308,20 +1315,20 @@ <function>OCIStatementType</function> returns one of the following values: <orderedlist> - <listitem><simpara> "SELECT"</simpara></listitem> - <listitem><simpara> "UPDATE"</simpara></listitem> - <listitem><simpara> "DELETE"</simpara></listitem> - <listitem><simpara> "INSERT"</simpara></listitem> - <listitem><simpara> "CREATE"</simpara></listitem> - <listitem><simpara> "DROP"</simpara></listitem> - <listitem><simpara> "ALTER"</simpara></listitem> - <listitem><simpara> "BEGIN"</simpara></listitem> - <listitem><simpara> "DECLARE"</simpara></listitem> - <listitem><simpara> "UNKNOWN"</simpara></listitem> + <listitem><simpara>"SELECT"</simpara></listitem> + <listitem><simpara>"UPDATE"</simpara></listitem> + <listitem><simpara>"DELETE"</simpara></listitem> + <listitem><simpara>"INSERT"</simpara></listitem> + <listitem><simpara>"CREATE"</simpara></listitem> + <listitem><simpara>"DROP"</simpara></listitem> + <listitem><simpara>"ALTER"</simpara></listitem> + <listitem><simpara>"BEGIN"</simpara></listitem> + <listitem><simpara>"DECLARE"</simpara></listitem> + <listitem><simpara>"UNKNOWN"</simpara></listitem> </orderedlist></para> <para> <example> - <title>Code examples</title> + <title><function>OCIStatementType</function> examples</title> <programlisting> <![CDATA[ <?php @@ -1348,7 +1355,7 @@ <refnamediv> <refname>OCINewCursor</refname> <refpurpose> - Return a new cursor (Statement-Handle) - use to bind ref-cursors. + Return a new cursor (Statement-Handle) </refpurpose> </refnamediv> <refsect1> @@ -1415,8 +1422,8 @@ $deptno = $data["DEPTNO"]; print "<TD>$dname</TD>"; print "<TD>$deptno</TD>"; - ociexecute($data[ "EMPCNT" ]); - while (OCIFetchInto($data[ "EMPCNT" ],&$subdata,OCI_ASSOC)) { + ociexecute($data["EMPCNT"]); + while (OCIFetchInto($data["EMPCNT"],&$subdata,OCI_ASSOC)) { $num_emps = $subdata["NUM_EMPS"]; print "<TD>$num_emps</TD>"; } @@ -1438,7 +1445,7 @@ <refnamediv> <refname>OCIFreeStatement</refname> <refpurpose> - Free all resources associated with a statement. + Free all resources associated with a statement </refpurpose> </refnamediv> <refsect1> @@ -1458,7 +1465,7 @@ <refnamediv> <refname>OCIFreeCursor</refname> <refpurpose> - Free all resources associated with a cursor. + Free all resources associated with a cursor </refpurpose> </refnamediv> <refsect1> @@ -1477,7 +1484,7 @@ <refentry id="function.ocifreedesc"> <refnamediv> <refname>OCIFreeDesc</refname> - <refpurpose>Deletes a large object descriptor.</refpurpose> + <refpurpose>Deletes a large object descriptor</refpurpose> </refnamediv> <refsect1> <title>Description</title> @@ -1513,11 +1520,11 @@ </simpara> </refsect1> </refentry> + <refentry id="function.ocierror"> <refnamediv> <refname>OCIError</refname> - <refpurpose>Return the last error of stmt|conn|global. - If no error happened returns &false;. + <refpurpose>Return the last error of stmt|conn|global </refpurpose> </refnamediv> <refsect1> @@ -1543,8 +1550,7 @@ <refnamediv> <refname>OCIInternalDebug</refname> <refpurpose> - Enables or disables internal debug output. By default it is - disabled + Enables or disables internal debug output </refpurpose> </refnamediv> <refsect1> @@ -1582,7 +1588,7 @@ <refentry id="function.ocisetprefetch"> <refnamediv> <refname>OCISetPrefetch</refname> - <refpurpose>sets number of rows to be prefetched</refpurpose> + <refpurpose>Sets number of rows to be prefetched</refpurpose> </refnamediv> <refsect1> <title>Description</title>