CVS update: php3/doc/functions

From: Date: Fri, 19 Feb 1999 16:36:39 +0000
Subject: CVS update: php3/doc/functions
Groups: php.dev 
Request: Send a blank email to php-dev+get-4163@lists.php.net to get a copy of this message
Date: Friday February 19, 1999 @ 11:36 Author: thies Update of /repository/php3/doc/functions In directory asf:/u/temp/cvs-serv10208/functions Modified Files: oci8.sgml Log Message: Index: php3/doc/functions/oci8.sgml diff -c php3/doc/functions/oci8.sgml:1.2 php3/doc/functions/oci8.sgml:1.3 *** php3/doc/functions/oci8.sgml:1.2 Fri Feb 19 11:17:30 1999 --- php3/doc/functions/oci8.sgml Fri Feb 19 11:36:38 1999 *************** *** 47,59 **** </funcsynopsis> <para> <function>OCIDefineByName</function> uses fetches SQL-Columns into user-defined ! PHP-Variables. </para> <para> If you need to define an abstract Datatype (LOB/ROWID/BFILE) you need to allocate it first using <function>OCINewDescriptor</function> function. See also the <function>OCIBindByName</function> function. </para> </refsect1> </refentry> --- 47,88 ---- </funcsynopsis> <para> <function>OCIDefineByName</function> uses fetches SQL-Columns into user-defined ! PHP-Variables. Be careful that Oracle user ALL-UPPERCASE column-names, whereby in ! your select you can also write lower-case. <function>OCIDefineByName</function> ! expects the <parameter>Column-Name</parameter> to be in uppercase. If you define a ! variable that doesn't exists in you select statement, no error will be given! </para> <para> If you need to define an abstract Datatype (LOB/ROWID/BFILE) you need to allocate it first using <function>OCINewDescriptor</function> function. See also the <function>OCIBindByName</function> function. </para> + <example> + <title>OCIDefineByName</title> + <programlisting> + &lt;?php + /* OCIDefineByPos example thies@digicol.de (980219) */ + + $conn = OCILogon("scott","tiger"); + + $stmt = OCIParse($conn,"select empno, ename from emp"); + + /* the define MUST be done BEFORE ociexecute! */ + + OCIDefineByName($stmt,"EMPNO",&$empno); + OCIDefineByName($stmt,"ENAME",&$ename); + + OCIExecute($stmt); + + while (OCIFetch($stmt)) { + echo "empno:".$empno."\n"; + echo "ename:".$ename."\n"; + } + + OCIFreeStatement($stmt); + OCILogoff($conn); + ?></programlisting></example> + </refsect1> </refentry> -- 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

« previous php.dev (#4163) next »