CVS update: php3/doc/functions
| From: | thies | Date: | Sun, 21 Feb 1999 12:27:48 +0000 |
| Subject: | CVS update: php3/doc/functions | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-4180@lists.php.net to get a copy of this message | ||
Date: Sunday February 21, 1999 @ 7:27
Author: thies
Update of /repository/php3/doc/functions
In directory asf:/u/temp/cvs-serv23156
Modified Files:
oci8.sgml
Log Message:
getting there...
Index: php3/doc/functions/oci8.sgml
diff -c php3/doc/functions/oci8.sgml:1.4 php3/doc/functions/oci8.sgml:1.5
*** php3/doc/functions/oci8.sgml:1.4 Fri Feb 19 12:48:34 1999
--- php3/doc/functions/oci8.sgml Sun Feb 21 07:27:48 1999
***************
*** 126,131 ****
--- 126,185 ----
(Character-File), SQLT_CLOB (Character-LOB), SQLT_BLOB
(Binary-LOB) and SQLT_RDD (ROWID).
</para>
+ <example>
+ <title>OCIDefineByName</title>
+ <programlisting>
+ <?php
+ /* OCIBindByPos example thies@digicol.de (980221)
+
+ inserts 3 resords into emp, and uses the ROWID for updating the
+ records just after the insert.
+ */
+
+ $conn = OCILogon("scott","tiger");
+
+ $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);
+
+ 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)) {
+ OCIExecute($stmt);
+ OCIExecute($update);
+ }
+
+ $rowid->free();
+
+ OCIFreeStatement($update);
+ OCIFreeStatement($stmt);
+
+ $stmt = OCIParse($conn,"select * from emp where empno in (1111,2222,3333)");
+ OCIExecute($stmt);
+ 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)");
+ OCIExecute($stmt);
+ OCIFreeStatement($stmt);
+
+ OCILogoff($conn);
+ ?></programlisting></example>
</refsect1>
</refentry>
***************
*** 139,150 ****
<funcsynopsis>
<funcdef>int <function>OCIColumnIsNULL</function></funcdef>
<paramdef>int <parameter>stmt</parameter></paramdef>
! <paramdef>int <parameter>column</parameter></paramdef>
</funcsynopsis>
<para>
<function>OCIColumnIsNULL</function> returns true if the returned
column <parameter>col</parameter> in the result from the
! statement <parameter>stmt</parameter> is NULL.
</para>
</refsect1>
</refentry>
--- 193,206 ----
<funcsynopsis>
<funcdef>int <function>OCIColumnIsNULL</function></funcdef>
<paramdef>int <parameter>stmt</parameter></paramdef>
! <paramdef>mixed <parameter>column</parameter></paramdef>
</funcsynopsis>
<para>
<function>OCIColumnIsNULL</function> returns true if the returned
column <parameter>col</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.
</para>
</refsect1>
</refentry>
***************
*** 159,174 ****
<funcsynopsis>
<funcdef>int <function>OCIColumnName</function></funcdef>
<paramdef>int <parameter>stmt</parameter></paramdef>
! <paramdef>int <parameter>column</parameter></paramdef>
</funcsynopsis>
<para>
<function>OCIColumnName</function> returns the name of the column
! as given by Oracle. column <parameter>col</parameter> in the
! result from the statement <parameter>stmt</parameter> is NULL.
</para>
</refsect1>
</refentry>
</reference>
--- 215,250 ----
<funcsynopsis>
<funcdef>int <function>OCIColumnName</function></funcdef>
<paramdef>int <parameter>stmt</parameter></paramdef>
! <paramdef>mixed <parameter>column</parameter></paramdef>
</funcsynopsis>
<para>
<function>OCIColumnName</function> returns the name of the column
! as given by Oracle.
! parameter.
</para>
</refsect1>
</refentry>
+ <refentry id="function.ocicolumnsize">
+ <refnamediv>
+ <refname>OCIColumnSize</refname>
+ <refpurpose>return result column size</refpurpose>
+ </refnamediv>
+ <refsect1>
+ <title>Description</title>
+ <funcsynopsis>
+ <funcdef>int <function>OCIColumnSize</function></funcdef>
+ <paramdef>int <parameter>stmt</parameter></paramdef>
+ <paramdef>mixed <parameter>column</parameter></paramdef>
+ </funcsynopsis>
+ <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.
+ </para>
+ </refsect1>
+ </refentry>
</reference>
--
PHP Development Mailing List http://www.php.net/
To unsubscribe send an empty message to php-dev-unsubscribe@lists.php.net
For help: php-dev-help@lists.php.net