cvs: phpdoc-zh /reference/oci8/functions ocibindbyname.xml ocicommit.xml ociserverversion.xml ocistatementtype.xml
| From: | Xiao shengwen | Date: | Sat, 03 Jan 2004 10:43:17 +0000 |
| Subject: | cvs: phpdoc-zh /reference/oci8/functions ocibindbyname.xml ocicommit.xml ociserverversion.xml ocistatementtype.xml | ||
| Groups: | php.doc.zh | ||
| Request: | Send a blank email to doc-zh+get-1819@lists.php.net to get a copy of this message | ||
yincheng Sat Jan 3 05:43:17 2004 EDT
Modified files:
/phpdoc-zh/reference/oci8/functions ocibindbyname.xml ocicommit.xml
ociserverversion.xml
ocistatementtype.xml
Log:
update
Index: phpdoc-zh/reference/oci8/functions/ocibindbyname.xml
diff -u phpdoc-zh/reference/oci8/functions/ocibindbyname.xml:1.6
phpdoc-zh/reference/oci8/functions/ocibindbyname.xml:1.7
--- phpdoc-zh/reference/oci8/functions/ocibindbyname.xml:1.6 Mon Dec 15 01:21:03 2003
+++ phpdoc-zh/reference/oci8/functions/ocibindbyname.xml Sat Jan 3 05:43:16 2004
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.6 $ -->
+<!-- $Revision: 1.7 $ -->
<!-- $Author: yincheng $ -->
-<!-- EN-Revision: 1.9 Maintainer: yincheng Status: ready -->
+<!-- EN-Revision: 1.11 Maintainer: yincheng Status: ready -->
<!-- CREDITS: xuke, Gregory -->
<!-- splitted from ./en/functions/oci8.xml, last change in rev 1.2 -->
<refentry id="function.ocibindbyname">
@@ -43,27 +43,27 @@
records just after the insert.
*/
-$conn = OCILogon("scott","tiger");
+$conn = OCILogon("scott", "tiger");
-$stmt = OCIParse($conn,"insert into emp (empno, ename) ".
- "values (:empno,:ename) ".
+$stmt = OCIParse($conn, "insert into emp (empno, ename) " .
+ "values (:empno,:ename) " .
"returning ROWID into :rid");
$data = array(1111 => "Larry", 2222 => "Bill", 3333 =>
"Jim");
-$rowid = OCINewDescriptor($conn,OCI_D_ROWID);
+$rowid = OCINewDescriptor($conn, OCI_D_ROWID);
-OCIBindByName($stmt,":empno",$empno,32);
-OCIBindByName($stmt,":ename",$ename,32);
-OCIBindByName($stmt,":rid",$rowid,-1,OCI_B_ROWID);
-
-$update = OCIParse($conn,"update emp set sal = :sal where ROWID = :rid");
-OCIBindByName($update,":rid",$rowid,-1,OCI_B_ROWID);
-OCIBindByName($update,":sal",$sal,32);
+OCIBindByName($stmt, ":empno", $empno, 32);
+OCIBindByName($stmt, ":ename", $ename, 32);
+OCIBindByName($stmt, ":rid", $rowid, -1, OCI_B_ROWID);
+
+$update = OCIParse($conn, "update emp set sal = :sal where ROWID = :rid");
+OCIBindByName($update, ":rid", $rowid, -1, OCI_B_ROWID);
+OCIBindByName($update, ":sal", $sal, 32);
$sal = 10000;
-while (list($empno,$ename) = each($data)) {
+while (list($empno, $ename) = each($data)) {
OCIExecute($stmt);
OCIExecute($update);
}
@@ -73,15 +73,15 @@
OCIFreeStatement($update);
OCIFreeStatement($stmt);
-$stmt = OCIParse($conn,"select * from emp where empno in (1111,2222,3333)");
+$stmt = OCIParse($conn, "select * from emp where empno in (1111,2222,3333)");
OCIExecute($stmt);
-while (OCIFetchInto($stmt,&$arr,OCI_ASSOC)) {
+while (OCIFetchInto($stmt, &$arr, OCI_ASSOC)) {
var_dump($arr);
}
OCIFreeStatement($stmt);
/* delete our "junk" from the emp table.... */
-$stmt = OCIParse($conn,"delete from emp where empno in (1111,2222,3333)");
+$stmt = OCIParse($conn, "delete from emp where empno in (1111,2222,3333)");
OCIExecute($stmt);
OCIFreeStatement($stmt);
Index: phpdoc-zh/reference/oci8/functions/ocicommit.xml
diff -u phpdoc-zh/reference/oci8/functions/ocicommit.xml:1.6
phpdoc-zh/reference/oci8/functions/ocicommit.xml:1.7
--- phpdoc-zh/reference/oci8/functions/ocicommit.xml:1.6 Mon Dec 15 00:55:10 2003
+++ phpdoc-zh/reference/oci8/functions/ocicommit.xml Sat Jan 3 05:43:16 2004
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.6 $ -->
+<!-- $Revision: 1.7 $ -->
<!-- $Author: yincheng $ -->
-<!-- EN-Revision: 1.11 Maintainer: yincheng Status: ready -->
+<!-- EN-Revision: 1.12 Maintainer: yincheng Status: ready -->
<!-- splitted from ./en/functions/oci8.xml, last change in rev 1.2 -->
<refentry id="function.ocicommit">
<refnamediv>
@@ -38,7 +38,7 @@
$committed = OCICommit($conn);
// Test whether commit was successful. If error occurred, return error message
- if(!$committed) {
+ if (!$committed) {
$error = OCIError($conn);
echo 'Commit failed. Oracle reports: ' . $error['message'];
}
Index: phpdoc-zh/reference/oci8/functions/ociserverversion.xml
diff -u phpdoc-zh/reference/oci8/functions/ociserverversion.xml:1.3
phpdoc-zh/reference/oci8/functions/ociserverversion.xml:1.4
--- phpdoc-zh/reference/oci8/functions/ociserverversion.xml:1.3 Mon Dec 15 00:55:10 2003
+++ phpdoc-zh/reference/oci8/functions/ociserverversion.xml Sat Jan 3 05:43:16 2004
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.3 $ -->
+<!-- $Revision: 1.4 $ -->
<!-- $Author: yincheng $ -->
-<!-- EN-Revision: 1.4 Maintainer: yincheng Status: ready -->
+<!-- EN-Revision: 1.5 Maintainer: yincheng Status: ready -->
<!-- splitted from ./en/functions/oci8.xml, last change in rev 1.2 -->
<refentry id="function.ociserverversion">
<refnamediv>
@@ -20,8 +20,8 @@
<programlisting role="php">
<![CDATA[
<?php
- $conn = OCILogon("scott","tiger");
- print "Server Version: " . OCIServerVersion($conn);
+ $conn = OCILogon("scott", "tiger");
+ echo "Server Version: " . OCIServerVersion($conn);
OCILogOff($conn);
?>
]]>
Index: phpdoc-zh/reference/oci8/functions/ocistatementtype.xml
diff -u phpdoc-zh/reference/oci8/functions/ocistatementtype.xml:1.3
phpdoc-zh/reference/oci8/functions/ocistatementtype.xml:1.4
--- phpdoc-zh/reference/oci8/functions/ocistatementtype.xml:1.3 Mon Dec 15 01:03:49 2003
+++ phpdoc-zh/reference/oci8/functions/ocistatementtype.xml Sat Jan 3 05:43:16 2004
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.3 $ -->
+<!-- $Revision: 1.4 $ -->
<!-- $Author: yincheng $ -->
-<!-- EN-Revision: 1.6 Maintainer: yincheng Status: ready -->
+<!-- EN-Revision: 1.7 Maintainer: yincheng Status: ready -->
<!-- splitted from ./en/functions/oci8.xml, last change in rev 1.2 -->
<refentry id="function.ocistatementtype">
<refnamediv>
@@ -34,17 +34,13 @@
<programlisting role="php">
<![CDATA[
<?php
- print "<PRE>";
$conn = OCILogon("scott","tiger");
$sql = "delete from emp where deptno = 10";
-
$stmt = OCIParse($conn,$sql);
if ( OCIStatementType($stmt) == "DELETE" ) {
die ("You are not allowed to delete from this table<BR>");
}
-
OCILogoff($conn);
- print "</PRE>";
?>
]]>
</programlisting>