svn: /phpdoc/en/trunk/reference/oci8/functions/ oci-execute.xml
| From: | Christopher Jones | Date: | Wed, 11 Nov 2009 00:36:58 +0000 |
| Subject: | svn: /phpdoc/en/trunk/reference/oci8/functions/ oci-execute.xml | ||
| Groups: | php.doc.cvs | ||
| Request: | Send a blank email to doc-cvs+get-5313@lists.php.net to get a copy of this message | ||
sixd Wed, 11 Nov 2009 00:36:58 +0000
Revision: http://svn.php.net/viewvc?view=revision&revision=290493
Log:
merge user comments and add another example
Changed paths:
U phpdoc/en/trunk/reference/oci8/functions/oci-execute.xml
Modified: phpdoc/en/trunk/reference/oci8/functions/oci-execute.xml
===================================================================
--- phpdoc/en/trunk/reference/oci8/functions/oci-execute.xml 2009-11-11 00:11:07 UTC (rev 290492)
+++ phpdoc/en/trunk/reference/oci8/functions/oci-execute.xml 2009-11-11 00:36:58 UTC (rev 290493)
@@ -98,6 +98,33 @@
&reftitle.examples;
<para>
<example>
+ <title><function>oci_execute</function> for queries</title>
+ <programlisting role="php">
+<![CDATA[
+<?php
+
+$connection = oci_connect("hr", "welcome", "localhost/XE");
+
+$statement = oci_parse($connection, "SELECT * FROM employees");
+oci_execute($statement);
+
+echo "<table border='1'>\n";
+while ($row = oci_fetch_array($statement, OCI_ASSOC+OCI_RETURN_NULLS)) {
+ echo "<tr>\n";
+ foreach ($row as $item) {
+ echo " <td>".($item!==null?htmlentities($item,
ENT_QUOTES):" ")."</td>\n";
+ }
+ echo "</tr>\n";
+}
+echo "</table>\n";
+
+?>
+]]>
+ </programlisting>
+ </example>
+ </para>
+ <para>
+ <example>
<title><function>oci_execute</function> without specifying a mode
example</title>
<programlisting role="php">
<![CDATA[
@@ -193,6 +220,15 @@
</note>
<note>
<para>
+ Because the <function>oci_execute</function> function generally
+ sends the statement to the
+ database, <function>oci_execute</function> can identify some
+ statement syntax errors that the lightweight,
+ local <function>oci_parse</function> function does not.
+ </para>
+ </note>
+ <note>
+ <para>
In PHP versions before 5.0.0 you must
use <function>ociexecute</function> instead.
&oci.name.compat.note;