cvs: phpdoc-zh /reference/oci8/functions oci-new-connect.xml oci-num-fields.xml oci-parse.xml oci-result.xml ocinlogon.xml ocinumcols.xml ociparse.xml
ociresult.xml

From: Date: Fri, 09 Sep 2005 15:22:42 +0000
Subject: cvs: phpdoc-zh /reference/oci8/functions oci-new-connect.xml oci-num-fields.xml oci-parse.xml oci-result.xml ocinlogon.xml ocinumcols.xml ociparse.xml
ociresult.xml
Groups: php.doc.zh 
Request: Send a blank email to doc-zh+get-2636@lists.php.net to get a copy of this message
dallas Fri Sep 9 11:22:42 2005 EDT Added files: /phpdoc-zh/reference/oci8/functions oci-new-connect.xml oci-num-fields.xml oci-parse.xml oci-result.xml Modified files: /phpdoc-zh/reference/oci8/functions ocinlogon.xml ocinumcols.xml ociparse.xml ociresult.xml Log: Updated.

http://cvs.php.net/diff.php/phpdoc-zh/reference/oci8/functions/ocinlogon.xml?r1=1.3&r2=1.4&ty=u Index: phpdoc-zh/reference/oci8/functions/ocinlogon.xml diff -u phpdoc-zh/reference/oci8/functions/ocinlogon.xml:1.3 phpdoc-zh/reference/oci8/functions/ocinlogon.xml:1.4 --- phpdoc-zh/reference/oci8/functions/ocinlogon.xml:1.3 Thu Aug 18 00:41:31 2005 +++ phpdoc-zh/reference/oci8/functions/ocinlogon.xml Fri Sep 9 11:22:41 2005 @@ -1,139 +1,20 @@ <?xml version="1.0" encoding="gb2312"?> -<!-- $Revision: 1.3 $ --> -<!-- $Author: lm92 $ --> -<!-- EN-Revision: 1.8 Maintainer: yincheng Status: ready --> -<!-- splitted from ./en/functions/oci8.xml, last change in rev 1.15 --> - <refentry id="function.ocinlogon"> - <refnamediv> - <refname>ocinlogon</refname> - <refpurpose>È·¶¨Ò»¸öµ½ Oracle µÄÐÂÁ¬½Ó</refpurpose> - </refnamediv> - <refsect1> - <title>ÃèÊö</title> - <methodsynopsis> - <type>resource</type><methodname>ocinlogon</methodname> - <methodparam><type>string</type><parameter>username</parameter></methodparam> - <methodparam><type>string</type><parameter>password</parameter></methodparam> - <methodparam choice="opt"><type>string</type><parameter>db</parameter></methodparam> - </methodsynopsis> - <para> - <function>ocinlogon</function> ´´½¨Ò»¸öµ½Oracle 8 Êý¾Ý¿âµÄÐÂÁ¬½Ó¡£ -¿ÉÑ¡µÄµÚ3¸ö²ÎÊýº¬ÓÐÄãÏëÒªÁ¬½ÓµÄÊý¾Ý¿âµÄÃû×Ö£¬¸ÃÃû×ÖΪ±¾µØ Oracle -ʵÁеÄÃû×Ö»òÕßÔÚ tnsnames.ora µÄÌõÄ¿ÖеÄÃû×Ö¡£ -Èç¹ûµÚ3¸ö²ÎÊýûÓж¨Ò壬 PHP ʹÓû·¾³±äÁ¿ ORACLE_SID (Oracle ʵÁÐ) -»ò TWO_TASK (tnsnames.ora) À´È·¶¨Á¬½ÓÄÄÒ»¸öÊý¾Ý¿â¡£ - </para> - <para> - <function>ocinlogon</function> Ç¿ÆÈ´ò¿ªÒ»¸öеÄÁ¬½Ó¡£ -Èç¹ûÄãÐèÒª¸ôÀëһϵÁÐÊÂÎñʱ£¬¸Ãº¯Êý½«±»Óõ½¡£ -ÔÚĬÈϵÄÇé¿öÏ£¬Èç¹ûʹÓà <function>ocilogon</function>£¬Á¬½Ó½« -ÔÚҳˮƽ±»¹²Ïí£»Èç¹ûʹÓà <function>ociplogon</function>£¬Á¬½Ó½« -±»ÔÚ web ·þÎñÆ÷½ø³Ìˮƽ±»¹²Ïí¡£Èç¹ûÄãÓÐʹÓà <function>ocinlogon</function> -´ò¿ªµÄÁ¬½Ó£¬ËùÓеÄÌá½»ºÍ»Ø¹ö½ö½öÓ¦Óõ½Ìض¨µÄÁ¬½Ó¡£ - </para> - <para> -ÏÂÃæµÄÀý×ÓÑÝʾÁ¬½ÓÊÇÔõÑù±»¸ôÀëµÄ¡£ - <example> - <title><function>ocinlogon</function></title> - <programlisting role="php"> -<![CDATA[ -<?php -echo "<html><pre>"; -$db = ""; - -$c1 = ocilogon("scott", "tiger", $db); -$c2 = ocinlogon("scott", "tiger", $db); - -function create_table($conn) -{ - $stmt = ociparse($conn, "create table scott.hallo (test -varchar2(64))"); - ociexecute($stmt); - echo $conn . " created table\n\n"; -} - -function drop_table($conn) -{ - $stmt = ociparse($conn, "drop table scott.hallo"); - ociexecute($stmt); - echo $conn . " dropped table\n\n"; -} - -function insert_data($conn) -{ - $stmt = ociparse($conn, "insert into scott.hallo - values('$conn' || ' ' || to_char(sysdate,'DD-MON-YY HH24:MI:SS'))"); - ociexecute($stmt, OCI_DEFAULT); - echo $conn . " inserted hallo\n\n"; -} - -function delete_data($conn) -{ - $stmt = ociparse($conn, "delete from scott.hallo"); - ociexecute($stmt, OCI_DEFAULT); - echo $conn . " deleted hallo\n\n"; -} - -function commit($conn) -{ - ocicommit($conn); - echo $conn . " committed\n\n"; -} - -function rollback($conn) -{ - ocirollback($conn); - echo $conn . " rollback\n\n"; -} - -function select_data($conn) -{ - $stmt = ociparse($conn, "select * from scott.hallo"); - ociexecute($stmt, OCI_DEFAULT); - echo $conn . "----selecting\n\n"; - while (ocifetch($stmt)) { - echo $conn . " <" . ociresult($stmt, "TEST") . ">\n\n"; - } - echo $conn . "----done\n\n"; -} - -create_table($c1); -insert_data($c1); - -select_data($c1); -select_data($c2); - -rollback($c1); - -select_data($c1); -select_data($c2); - -insert_data($c2); -commit($c2); - -select_data($c1); - -delete_data($c1); -select_data($c1); -select_data($c2); -commit($c1); - -select_data($c1); -select_data($c2); - -drop_table($c1); -echo "</pre></html>"; -?> -]]> - </programlisting> - </example> - </para> - <simpara> - ²Î¼û <function>ocilogon</function> ºÍ - <function>ociplogon</function>¡£ - </simpara> - </refsect1> - </refentry> +<!-- $Revision: 1.4 $ --> +<!-- $Author: dallas $ --> +<!-- EN-Revision: 1.15 Maintainer: dallas Status: ready --> +<refentry id="function.ocinlogon"> + <refnamediv> + <refname>ocinlogon</refname> + <refpurpose><function>oci_new_connect</function> µÄ&Alias;</refpurpose> + </refnamediv> + + <refsect1 role="description"> + &reftitle.description; + <simpara> + &info.function.alias;<function>oci_new_connect</function>¡£ + </simpara> + </refsect1> +</refentry> <!-- Keep this comment at the end of the file Local variables: http://cvs.php.net/diff.php/phpdoc-zh/reference/oci8/functions/ocinumcols.xml?r1=1.2&r2=1.3&ty=u Index: phpdoc-zh/reference/oci8/functions/ocinumcols.xml diff -u phpdoc-zh/reference/oci8/functions/ocinumcols.xml:1.2 phpdoc-zh/reference/oci8/functions/ocinumcols.xml:1.3 --- phpdoc-zh/reference/oci8/functions/ocinumcols.xml:1.2 Thu Aug 18 00:41:31 2005 +++ phpdoc-zh/reference/oci8/functions/ocinumcols.xml Fri Sep 9 11:22:41 2005 @@ -1,54 +1,20 @@ <?xml version="1.0" encoding="gb2312"?> -<!-- $Revision: 1.2 $ --> -<!-- $Author: lm92 $ --> -<!-- EN-Revision: 1.7 Maintainer: yincheng Status: ready --> -<!-- splitted from ./en/functions/oci8.xml, last change in rev 1.2 --> - <refentry id="function.ocinumcols"> - <refnamediv> - <refname>ocinumcols</refname> - <refpurpose> - ·µ»ØÁÐÊý - </refpurpose> - </refnamediv> - <refsect1> - <title>ÃèÊö</title> - <methodsynopsis> - <type>int</type><methodname>ocinumcols</methodname> - <methodparam><type>resource</type><parameter>stmt</parameter></methodparam> - </methodsynopsis> - <para> - <function>ocinumcols</function> ·µ»ØÔÚÓï¾ä <parameter>stmt</parameter> ÖеÄÁÐÊý¡£ - </para> - <para> - <example> - <title><function>ocinumcols</function></title> - <programlisting role="php"> -<![CDATA[ -<?php - echo "<pre>\n"; - $conn = OCILogon("scott", "tiger"); - $stmt = OCIParse($conn, "select * from emp"); - OCIExecute($stmt); - while (OCIFetch($stmt)) { - echo "\n"; - $ncols = OCINumCols($stmt); - for ($i = 1; $i <= $ncols; $i++) { - $column_name = OCIColumnName($stmt, $i); - $column_value = OCIResult($stmt, $i); - echo $column_name . ': ' . $column_value . "\n"; - } - echo "\n"; - } - OCIFreeStatement($stmt); - OCILogoff($conn); - echo "</pre>"; -?> -]]> - </programlisting> - </example> - </para> - </refsect1> - </refentry> +<!-- $Revision: 1.3 $ --> +<!-- $Author: dallas $ --> +<!-- EN-Revision: 1.12 Maintainer: dallas Status: ready --> +<refentry id="function.ocinumcols"> + <refnamediv> + <refname>ocinumcols</refname> + <refpurpose><function>oci_num_fields</function> µÄ&Alias;</refpurpose> + </refnamediv> + + <refsect1 role="description"> + &reftitle.description; + <simpara> + &info.function.alias;<function>oci_num_fields</function>¡£ + </simpara> + </refsect1> +</refentry> <!-- Keep this comment at the end of the file Local variables: http://cvs.php.net/diff.php/phpdoc-zh/reference/oci8/functions/ociparse.xml?r1=1.4&r2=1.5&ty=u Index: phpdoc-zh/reference/oci8/functions/ociparse.xml diff -u phpdoc-zh/reference/oci8/functions/ociparse.xml:1.4 phpdoc-zh/reference/oci8/functions/ociparse.xml:1.5 --- phpdoc-zh/reference/oci8/functions/ociparse.xml:1.4 Thu Aug 18 00:41:31 2005 +++ phpdoc-zh/reference/oci8/functions/ociparse.xml Fri Sep 9 11:22:41 2005 @@ -1,29 +1,20 @@ <?xml version="1.0" encoding="gb2312"?> -<!-- $Revision: 1.4 $ --> -<!-- $Author: lm92 $ --> -<!-- EN-Revision: 1.5 Maintainer: yincheng Status: ready --> -<!-- splitted from ./en/functions/oci8.xml, last change in rev 1.2 --> - <refentry id="function.ociparse"> - <refnamediv> - <refname>ociparse</refname> - <refpurpose>·ÖÎöÒ»¸ö²éѯ²¢·µ»ØÓï¾ä±êÖ¾·û</refpurpose> - </refnamediv> - <refsect1> - <title>ÃèÊö</title> - <methodsynopsis> - <type>resource</type><methodname>ociparse</methodname> - <methodparam><type>resource</type><parameter>conn</parameter></methodparam> - <methodparam><type>string</type><parameter>query</parameter></methodparam> - </methodsynopsis> - <simpara> - <function>ociparse</function> ·ÖÎöʹÓÃÁ¬½Ó <parameter>conn</parameter> - µÄ²éѯ²ÎÊý <parameter>query</parameter> ¡£ -Èç¹û²éѯ²ÎÊý <parameter>query</parameter> -ÊÇÓÐЧµÄ£¬¸Ãº¯Êý·µ»ØÓï¾ä±êÖ¾·û£¬·ñÔò·µ»Ø &false;¡£ -²ÎÊý <parameter>query</parameter> ¿ÉÒÔÊÇÈκÎÓÐЧµÄ SQL Óï¾ä»ò PL/SQL ¿é¡£ - </simpara> - </refsect1> - </refentry> +<!-- $Revision: 1.5 $ --> +<!-- $Author: dallas $ --> +<!-- EN-Revision: 1.10 Maintainer: dallas Status: ready --> +<refentry id="function.ociparse"> + <refnamediv> + <refname>ociparse</refname> + <refpurpose><function>oci_parse</function> µÄ&Alias;</refpurpose> + </refnamediv> + + <refsect1 role="description"> + &reftitle.description; + <simpara> + &info.function.alias;<function>oci_parse</function>¡£ + </simpara> + </refsect1> +</refentry> <!-- Keep this comment at the end of the file Local variables: http://cvs.php.net/diff.php/phpdoc-zh/reference/oci8/functions/ociresult.xml?r1=1.3&r2=1.4&ty=u Index: phpdoc-zh/reference/oci8/functions/ociresult.xml diff -u phpdoc-zh/reference/oci8/functions/ociresult.xml:1.3 phpdoc-zh/reference/oci8/functions/ociresult.xml:1.4 --- phpdoc-zh/reference/oci8/functions/ociresult.xml:1.3 Thu Aug 18 00:41:32 2005 +++ phpdoc-zh/reference/oci8/functions/ociresult.xml Fri Sep 9 11:22:41 2005 @@ -1,31 +1,20 @@ <?xml version="1.0" encoding="gb2312"?> -<!-- $Revision: 1.3 $ --> -<!-- $Author: lm92 $ --> -<!-- EN-Revision: 1.4 Maintainer: yincheng Status: ready --> -<!-- splitted from ./en/functions/oci8.xml, last change in rev 1.2 --> - <refentry id="function.ociresult"> - <refnamediv> - <refname>ociresult</refname> - <refpurpose>·µ»ØËùÈ¡µÃÐеÄÁÐÖµ</refpurpose> - </refnamediv> - <refsect1> - <title>ÃèÊö</title> - <methodsynopsis> - <type>mixed</type><methodname>ociresult</methodname> - <methodparam><type>resource</type><parameter>statement</parameter></methodparam> - <methodparam><type>mixed</type><parameter>col</parameter></methodparam> - </methodsynopsis> - <para> - <function>ociresult</function> ·µ»Øµ±Ç°ÐÐ(²Î¼û <parameter>column</parameter>) -ÀïijÁеÄÖµ¡£³ýÁËÕªÒªÀàÐÍ(ROWIDs¡¢ -LOBs ºÍ FILEs)Í⣬<function>ociresult</function> ½«ÓÃ×Ö·û´®·µ»ØÃ¿Ò»¸öÁÐÖµ¡£ - </para> - <para> -Äã¿ÉÒÔʹÓÃÁÐÐòºÅ»òÁÐÃû×÷Ϊ <parameter>col</parameter> ²ÎÊý¡£ -ÁÐÐòºÅ´Ó 1 ¿ªÊ¼¼ÆË㣬ÁÐÃûʹÓôóд×Öĸ¡£ - </para> - </refsect1> - </refentry> +<!-- $Revision: 1.4 $ --> +<!-- $Author: dallas $ --> +<!-- EN-Revision: 1.10 Maintainer: dallas Status: ready --> +<refentry id="function.ociresult"> + <refnamediv> + <refname>ociresult</refname> + <refpurpose><function>oci_result</function> µÄ&Alias;</refpurpose> + </refnamediv> + + <refsect1 role="description"> + &reftitle.description; + <simpara> + &info.function.alias;<function>oci_result</function>¡£ + </simpara> + </refsect1> +</refentry> <!-- Keep this comment at the end of the file Local variables: http://cvs.php.net/co.php/phpdoc-zh/reference/oci8/functions/oci-new-connect.xml?r=1.1&p=1 Index: phpdoc-zh/reference/oci8/functions/oci-new-connect.xml +++ phpdoc-zh/reference/oci8/functions/oci-new-connect.xml <?xml version="1.0" encoding="gb2312"?> <!-- $Revision: 1.1 $ --> <!-- $Author: dallas $ --> <!-- EN-Revision: 1.7 Maintainer: yincheng Status: ready --> <!-- CREDITS: dallas --> <refentry id="function.oci-new-connect"> <refnamediv> <refname>oci_new_connect</refname> <refpurpose>½¨¶¨Ò»¸öµ½ Oracle ·þÎñÆ÷µÄÐÂÁ¬½Ó</refpurpose> </refnamediv> <refsect1> <title>˵Ã÷</title> <methodsynopsis> <type>resource</type><methodname>oci_new_connect</methodname> <methodparam><type>string</type><parameter>username</parameter></methodparam> <methodparam><type>string</type><parameter>password</parameter></methodparam> <methodparam choice="opt"><type>string</type><parameter>db</parameter></methodparam> <methodparam choice="opt"><type>string</type><parameter>charset</parameter></methodparam> <methodparam choice="opt"><type>int</type><parameter>session_mode</parameter></methodparam> </methodsynopsis> <para> <function>oci_new_connect</function> ´´½¨Ò»¸öµ½ Oracle ·þÎñÆ÷µÄÐÂÁ¬½Ó²¢µÇ¼¡£Óë <function>oci_connect</function> ºÍ <function>oci_pconnect</function> ²»Í¬£¬<function>oci_new_connect</function> ²»»á»º³åÁ¬½Ó£¬×ÜÊǻ᷵»ØÒ»¸öȫеĸմò¿ªµÄÁ¬½Ó¾ä±ú¡£ÕâÔÚÓ¦ÓóÌÐòÐèÒªÔÚÁ½×é²éѯ֮¼äʵÏÖÊÂÎñ¸ôÀëºÜÓÐÓᣠ</para> <para> ¿ÉÑ¡µÄµÚÈý¸ö²ÎÊý¿ÉÒÔÊDZ¾µØ Oracle ʵÀýµÄÃû×Ö»òÕßÊÇÔÚ <filename>tnsnames.ora</filename> µÄÌõÄ¿ÖеÄÃû×Ö¡£Èç¹ûûÓÐÖ¸¶¨µÚÈý¸ö²ÎÊý£¬ PHP ʹÓû·¾³±äÁ¿ <literal>ORACLE_SID</literal> ºÍ <literal>TWO_TASK</literal> À´·Ö±ðÈ·¶¨±¾µØ Oracle ʵÀýµÄÃû×ÖºÍ <filename>tnsnames.ora</filename> µÄλÖᣠ</para> <para> <parameter>session_mode</parameter> ²ÎÊý×Ô°æ±¾ 1.1 Æð¿ÉÓò¢½ÓÊÜÈçÏÂÖµ£º<constant>OCI_DEFAULT</constant>£¬<constant>OCI_SYSOPER</constant> ºÍ <constant>OCI_SYSDBA</constant>¡£Èç¹ûÖ¸¶¨ÁË <constant>OCI_SYSOPER</constant> »ò <constant>OCI_SYSDBA</constant> ÆäÖÐÖ®Ò»£¬<function>oci_new_connect</function> ½«³¢ÊÔʹÓÃÍⲿÈÏÖ¤ÐÅÏ¢½¨Á¢ÌØÈ¨Á¬½Ó¡£ÌØÈ¨Á¬½ÓĬÈϱ»½ûÖ¹¡£ÒªÆôÓã¬ÐèÒª½« <link linkend="ini.oci8.privileged_connect">oci8.privileged_connect</link> ÉèΪ On¡£ </para> <note> <simpara> Èç¹û PHP ÓõÄÊÇ Oracle Instant Client£¬¿ÉÒÔÓÃÈÝÒ×µÄÃüÃûÁ¬½Ó·½·¨£¬ËµÃ÷¼ûÕâÀ<ulink url="&url.oracle.oic.connect;">&url.oracle.oic.connect;</ulink>¡£»ù±¾ÉÏÕâÒâζ×Å¿ÉÒÔÖ¸¶¨ "//db_host[:port]/database_name" ×÷ΪÊý¾Ý¿âÃû¡£µ«Èç¹ûÏëÓÃÃüÃûµÄ¾É·½·¨Ôò<emphasis>±ØÐë</emphasis>É趨 <constant>ORACLE_HOME</constant> »ò <constant>TNS_ADMIN</constant> ¶þÕßÖ®Ò»¡£ </simpara> </note> &oci.charset; <para> ÏÂÃæÀý×ÓÑÝʾÁËÔõÑù¸ôÀëÁ¬½Ó¡£ <example> <title><function>oci_new_connect</function> Àý×Ó</title> <programlisting role="php"> <![CDATA[ <?php echo "<html><pre>"; $db = ""; $c1 = oci_connect("scott", "tiger", $db); $c2 = oci_new_connect("scott", "tiger", $db); function create_table($conn) { $stmt = oci_parse($conn, "create table scott.hallo (test varchar2(64))"); oci_execute($stmt); echo $conn . " created table\n\n"; } function drop_table($conn) { $stmt = oci_parse($conn, "drop table scott.hallo"); oci_execute($stmt); echo $conn . " dropped table\n\n"; } function insert_data($conn) { $stmt = oci_parse($conn, "insert into scott.hallo values('$conn' || ' ' || to_char(sysdate,'DD-MON-YY HH24:MI:SS'))"); oci_execute($stmt, OCI_DEFAULT); echo $conn . " inserted hallo\n\n"; } function delete_data($conn) { $stmt = oci_parse($conn, "delete from scott.hallo"); oci_execute($stmt, OCI_DEFAULT); echo $conn . " deleted hallo\n\n"; } function commit($conn) { oci_commit($conn); echo $conn . " committed\n\n"; } function rollback($conn) { oci_rollback($conn); echo $conn . " rollback\n\n"; } function select_data($conn) { $stmt = oci_parse($conn, "select * from scott.hallo"); oci_execute($stmt, OCI_DEFAULT); echo $conn . "----selecting\n\n"; while (oci_fetch($stmt)) { echo $conn . " <" . oci_result($stmt, "TEST") . ">\n\n"; } echo $conn . "----done\n\n"; } create_table($c1); insert_data($c1); select_data($c1); select_data($c2); rollback($c1); select_data($c1); select_data($c2); insert_data($c2); commit($c2); select_data($c1); delete_data($c1); select_data($c1); select_data($c2); commit($c1); select_data($c1); select_data($c2); drop_table($c1); echo "</pre></html>"; ?> ]]> </programlisting> </example> </para> <para> <function>oci_new_connect</function> ÔÚ³ö´íʱ·µ»Ø &false;¡£ </para> <note> <para> ÔÚ PHP 5.0.0 ֮ǰµÄ°æ±¾±ØÐëʹÓà <function>ocinlogon</function> Ìæ´ú±¾º¯Êý¡£¸Ãº¯ÊýÃûÈÔÈ»¿ÉÓã¬ÎªÏòϼæÈÝ×÷Ϊ <function>oci_new_connect</function> µÄ±ðÃû¡£²»¹ýÆäÒѱ»·ÏÆú£¬²»ÍƼöʹÓᣠ</para> </note> <simpara> ²Î¼û <function>oci_connect</function> ºÍ <function>oci_pconnect</function>¡£ </simpara> </refsect1> </refentry> <!-- Keep this comment at the end of the file Local variables: mode: sgml sgml-omittag:t sgml-shorttag:t sgml-minimize-attributes:nil sgml-always-quote-attributes:t sgml-indent-step:1 sgml-indent-data:t indent-tabs-mode:nil sgml-parent-document:nil sgml-default-dtd-file:"../../../../manual.ced" sgml-exposed-tags:nil sgml-local-catalogs:nil sgml-local-ecat-files:nil End: vim600: syn=xml fen fdm=syntax fdl=2 si vim: et tw=78 syn=sgml vi: ts=1 sw=1 --> http://cvs.php.net/co.php/phpdoc-zh/reference/oci8/functions/oci-num-fields.xml?r=1.1&p=1 Index: phpdoc-zh/reference/oci8/functions/oci-num-fields.xml +++ phpdoc-zh/reference/oci8/functions/oci-num-fields.xml <?xml version="1.0" encoding="gb2312"?> <!-- $Revision: 1.1 $ --> <!-- $Author: dallas $ --> <!-- EN-Revision: 1.2 Maintainer: yincheng Status: ready --> <!-- CREDITS: dallas --> <refentry id="function.oci-num-fields"> <refnamediv> <refname>oci_num_fields</refname> <refpurpose>·µ»Ø½á¹ûÁеÄÊýÄ¿</refpurpose> </refnamediv> <refsect1> <title>˵Ã÷</title> <methodsynopsis> <type>int</type><methodname>oci_num_fields</methodname> <methodparam><type>resource</type><parameter>statement</parameter></methodparam> </methodsynopsis> <para> <function>oci_num_fields</function> ·µ»Ø <parameter>statement</parameter> ÖеÄÁеÄÊýÄ¿¡£ </para> <para> <example> <title><function>oci_num_fields</function> Àý×Ó</title> <programlisting role="php"> <![CDATA[ <?php echo "<pre>\n"; $conn = oci_connect("scott", "tiger"); $stmt = oci_parse($conn, "select * from emp"); oci_execute($stmt); while (oci_fetch($stmt)) { echo "\n"; $ncols = oci_num_fields($stmt); for ($i = 1; $i <= $ncols; $i++) { $column_name = oci_field_name($stmt, $i); $column_value = oci_result($stmt, $i); echo $column_name . ': ' . $column_value . "\n"; } echo "\n"; } oci_free_statement($stmt); oci_close($conn); echo "</pre>"; ?> ]]> </programlisting> </example> </para> <para> <function>oci_num_fields</function> ÔÚ³ö´íʱ·µ»Ø &false;¡£ </para> <note> <para> ÔÚ PHP 5.0.0 ֮ǰµÄ°æ±¾±ØÐëʹÓà <function>ocinumcols</function> Ìæ´ú±¾º¯Êý¡£¸Ãº¯ÊýÃûÈÔÈ»¿ÉÓã¬ÎªÏòϼæÈÝ×÷Ϊ <function>oci_num_fields</function> µÄ±ðÃû¡£²»¹ýÆäÒѱ»·ÏÆú£¬²»ÍƼöʹÓᣠ</para> </note> </refsect1> </refentry> <!-- Keep this comment at the end of the file Local variables: mode: sgml sgml-omittag:t sgml-shorttag:t sgml-minimize-attributes:nil sgml-always-quote-attributes:t sgml-indent-step:1 sgml-indent-data:t indent-tabs-mode:nil sgml-parent-document:nil sgml-default-dtd-file:"../../../../manual.ced" sgml-exposed-tags:nil sgml-local-catalogs:nil sgml-local-ecat-files:nil End: vim600: syn=xml fen fdm=syntax fdl=2 si vim: et tw=78 syn=sgml vi: ts=1 sw=1 --> http://cvs.php.net/co.php/phpdoc-zh/reference/oci8/functions/oci-parse.xml?r=1.1&p=1 Index: phpdoc-zh/reference/oci8/functions/oci-parse.xml +++ phpdoc-zh/reference/oci8/functions/oci-parse.xml <?xml version="1.0" encoding="gb2312"?> <!-- $Revision: 1.1 $ --> <!-- $Author: dallas $ --> <!-- EN-Revision: 1.4 Maintainer: yincheng Status: ready --> <!-- CREDITS: dallas --> <refentry id="function.oci-parse"> <refnamediv> <refname>oci_parse</refname> <refpurpose>ÅäÖà Oracle Óï¾äÔ¤±¸Ö´ÐÐ</refpurpose> </refnamediv> <refsect1> <title>˵Ã÷</title> <methodsynopsis> <type>resource</type><methodname>oci_parse</methodname> <methodparam><type>resource</type><parameter>connection</parameter></methodparam> <methodparam><type>string</type><parameter>query</parameter></methodparam> </methodsynopsis> <para> <function>oci_parse</function> ÔÚ <parameter>connection</parameter> ÉÏÅäÖà <parameter>query</parameter> ²¢·µ»ØÓï¾ä±êʶ·ûÒÔÓÃÓÚ <function>oci_bind_by_name</function>£¬<function>oci_execute</function> ÒÔ¼°ÆäËüº¯Êý¡£ </para> <note> <para> ±¾º¯Êý<emphasis>²¢²»</emphasis>ÑéÖ¤ <parameter>query</parameter>¡£ÒªÖªµÀ <parameter>query</parameter> ÊÇ·ñÊǺϷ¨µÄ SQL »ò PL/SQL Óï¾äµÄΨһ·½·¨ÊÇÖ´ÐÐËü¡£ </para> </note> <para> <function>oci_parse</function> ÔÚ³ö´íʱ·µ»Ø &false;¡£ </para> <note> <para> ÔÚ PHP 5.0.0 ֮ǰµÄ°æ±¾±ØÐëʹÓà <function>ociparse</function> Ìæ´ú±¾º¯Êý¡£¸Ãº¯ÊýÃûÈÔÈ»¿ÉÓã¬ÎªÏòϼæÈÝ×÷Ϊ <function>oci_parse</function> µÄ±ðÃû¡£²»¹ýÆäÒѱ»·ÏÆú£¬²»ÍƼöʹÓᣠ</para> </note> </refsect1> </refentry> <!-- Keep this comment at the end of the file Local variables: mode: sgml sgml-omittag:t sgml-shorttag:t sgml-minimize-attributes:nil sgml-always-quote-attributes:t sgml-indent-step:1 sgml-indent-data:t indent-tabs-mode:nil sgml-parent-document:nil sgml-default-dtd-file:"../../../../manual.ced" sgml-exposed-tags:nil sgml-local-catalogs:nil sgml-local-ecat-files:nil End: vim600: syn=xml fen fdm=syntax fdl=2 si vim: et tw=78 syn=sgml vi: ts=1 sw=1 --> http://cvs.php.net/co.php/phpdoc-zh/reference/oci8/functions/oci-result.xml?r=1.1&p=1 Index: phpdoc-zh/reference/oci8/functions/oci-result.xml +++ phpdoc-zh/reference/oci8/functions/oci-result.xml <?xml version="1.0" encoding="gb2312"?> <!-- $Revision: 1.1 $ --> <!-- $Author: dallas $ --> <!-- EN-Revision: 1.3 Maintainer: yincheng Status: ready --> <!-- CREDITS: dallas --> <refentry id="function.oci-result"> <refnamediv> <refname>oci_result</refname> <refpurpose>·µ»ØËùÈ¡µÃÐÐÖÐ×ֶεÄÖµ</refpurpose> </refnamediv> <refsect1> <title>˵Ã÷</title> <methodsynopsis> <type>mixed</type><methodname>oci_result</methodname> <methodparam><type>resource</type><parameter>statement</parameter></methodparam> <methodparam><type>mixed</type><parameter>field</parameter></methodparam> </methodsynopsis> <para> <function>oci_result</function> ·µ»ØÓÉ <function>oci_fetch</function> ËùÈ¡µÃµÄµ±Ç°ÐÐÖÐ <parameter>field</parameter> ×ֶεÄÊý¾Ý¡£<function>oci_result</function> ¶ÔËùÓÐÀàÐͶ¼·µ»Ø×Ö·û´®Ö»³ýÁ˳éÏóÀàÐÍ£¨ROWID£¬LOB ºÍ FILE£©¡£<function>oci_result</function> ÔÚ³ö´íʱ·µ»Ø &false;¡£ </para> <para> ¿ÉÒÔʹÓÃÁÐÐòºÅ£¨´Ó 1 ¿ªÊ¼£©»òÁÐÃû£¨´óд£©×÷Ϊ <parameter>col</parameter> µÄ²ÎÊý¡£ </para> <note> <para> ÔÚ PHP 5.0.0 ֮ǰµÄ°æ±¾±ØÐëʹÓà <function>ociresult</function> Ìæ´ú±¾º¯Êý¡£¸Ãº¯ÊýÃûÈÔÈ»¿ÉÓã¬ÎªÏòϼæÈÝ×÷Ϊ <function>oci_result</function> µÄ±ðÃû¡£²»¹ýÆäÒѱ»·ÏÆú£¬²»ÍƼöʹÓᣠ</para> </note> &oci.datatypes; <para> ²Î¼û <function>oci_fetch_array</function>£¬<function>oci_fetch_assoc</function>£¬<function>oci_fetch_object</function>£¬<function>oci_fetch_row</function> ºÍ <function>oci_fetch_all</function>¡£ </para> </refsect1> </refentry> <!-- Keep this comment at the end of the file Local variables: mode: sgml sgml-omittag:t sgml-shorttag:t sgml-minimize-attributes:nil sgml-always-quote-attributes:t sgml-indent-step:1 sgml-indent-data:t indent-tabs-mode:nil sgml-parent-document:nil sgml-default-dtd-file:"../../../../manual.ced" sgml-exposed-tags:nil sgml-local-catalogs:nil sgml-local-ecat-files:nil End: vim600: syn=xml fen fdm=syntax fdl=2 si vim: et tw=78 syn=sgml vi: ts=1 sw=1 -->
« previous php.doc.zh (#2636) next »