merge user comments and add another example

git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@290493 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
Christopher Jones 2009-11-11 00:36:58 +00:00
parent 3832307b72
commit ece206b8dd

View file

@ -96,6 +96,33 @@
<refsect1 role="examples">
&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):"&nbsp;")."</td>\n";
}
echo "</tr>\n";
}
echo "</table>\n";
?>
]]>
</programlisting>
</example>
</para>
<para>
<example>
<title><function>oci_execute</function> without specifying a mode example</title>
@ -191,6 +218,15 @@ for ($i = 1; $i <= oci_num_fields($statement); ++$i) {
commit any uncommitted transaction.
</para>
</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