svn: /phpdoc/en/trunk/ language-snippets.ent reference/oci8/functions/oci-set-prefetch.xml

From: Date: Wed, 18 Nov 2009 19:40:01 +0000
Subject: svn: /phpdoc/en/trunk/ language-snippets.ent reference/oci8/functions/oci-set-prefetch.xml
Groups: php.doc.cvs 
Request: Send a blank email to doc-cvs+get-5430@lists.php.net to get a copy of this message
sixd Wed, 18 Nov 2009 19:40:01 +0000 Revision: http://svn.php.net/viewvc?view=revision&revision=290927 Log: Add changlog section. Move Notes below example. Expunge you. Use entity for common argument. Standardize examples. Changed paths: U phpdoc/en/trunk/language-snippets.ent U phpdoc/en/trunk/reference/oci8/functions/oci-set-prefetch.xml Modified: phpdoc/en/trunk/language-snippets.ent =================================================================== --- phpdoc/en/trunk/language-snippets.ent 2009-11-18 17:59:18 UTC (rev 290926) +++ phpdoc/en/trunk/language-snippets.ent 2009-11-18 19:40:01 UTC (rev 290927) @@ -599,6 +599,12 @@ database may not occur with queries when result caching is enabled. </para></caution>'> +<!ENTITY oci.arg.statement.id +"<para xmlns='http://docbook.org/ns/docbook'>A valid OCI8 statement +identifier created by <function>oci_parse</function> and executed +by <function>oci_execute</function>, or a <literal>REF +CURSOR</literal> statement identifier.</para>"> + <!-- PCNTL Notes --> <!ENTITY pcntl.parameter.status '<para xmlns="http://docbook.org/ns/docbook">The <parameter>status</parameter> parameter is the status parameter supplied to a successful Modified: phpdoc/en/trunk/reference/oci8/functions/oci-set-prefetch.xml =================================================================== --- phpdoc/en/trunk/reference/oci8/functions/oci-set-prefetch.xml 2009-11-18 17:59:18 UTC (rev 290926) +++ phpdoc/en/trunk/reference/oci8/functions/oci-set-prefetch.xml 2009-11-18 19:40:01 UTC (rev 290927) @@ -43,7 +43,7 @@ large number of rows, overall system efficiency might be better if rows are retrieved from the database in several chunks (i.e set the prefetch value smaller than the number of rows). This allows the - database to handle other users' statements while your script is + database to handle other users' statements while the PHP script is processing the current set of rows. </para> <para> @@ -68,20 +68,15 @@ <varlistentry> <term><parameter>statement</parameter></term> <listitem> - <para> - A valid OCI statement identifier. - </para> + &oci.arg.statement.id; </listitem> </varlistentry> <varlistentry> <term><parameter>rows</parameter></term> <listitem> <para> - The number of rows to be prefetched. + The number of rows to be prefetched, &gt;= 0 </para> - <para> - From PHP 5.3.2 and PECL OCI8 1.4, <parameter>rows</parameter> may be &gt;= 0. Prior versions required <parameter>rows</parameter> &gt;= 1. - </para> </listitem> </varlistentry> </variablelist> @@ -95,21 +90,37 @@ </para> </refsect1> - <refsect1 role="notes"> - &reftitle.notes; - <note> - <para> - Prior to PHP 5.3 (Prior to PECL OCI8 1.3.4) the prefetch count was - limited to the lessor of <parameter>rows</parameter> rows and - 1024 * <parameter>rows</parameter> bytes. The byte size - restriction has now been removed. - </para> - </note> - <note> - <para> - In PHP versions before 5.0.0 you must use <function>ocisetprefetch</function> instead. &oci.name.compat.note; - </para> - </note> + <refsect1 role="changelog"> + &reftitle.changelog; + <para> + <informaltable> + <tgroup cols="2"> + <thead> + <row> + <entry>&Version;</entry> + <entry>&Description;</entry> + </row> + </thead> + <tbody> + <row> + <entry>PHP 5.3.2 (PECL OCI8 1.4)</entry> + <entry> + Before this release, <parameter>rows</parameter> must be &gt;= 1. + </entry> + </row> + <row> + <entry>PHP 5.3 (PECL OCI8 1.3.4)</entry> + <entry> + Before this release, prefetching was limited to the lesser + of <parameter>rows</parameter> rows and 1024 + * <parameter>rows</parameter> bytes. The byte size + restriction has now been removed. + </entry> + </row> + </tbody> + </tgroup> + </informaltable> + </para> </refsect1> <refsect1 role="examples"> @@ -121,9 +132,9 @@ <![CDATA[ <?php -$conn = oci_connect("hr", "welcome", "localhost/XE"); +$conn = oci_connect('hr', 'welcome', 'localhost/XE'); -$stid = oci_parse($conn, "SELECT * FROM myverybigtable"); +$stid = oci_parse($conn, 'SELECT * FROM myverybigtable'); oci_set_prefetch($stid, 300); // Set before calling oci_execute() oci_execute($stid); @@ -160,9 +171,9 @@ END; */ -$conn = oci_connect("hr", "welcome", "localhost/XE"); +$conn = oci_connect('hr', 'welcome', 'localhost/XE'); -$stid = oci_parse($conn, "BEGIN myproc(:rc); END;"); +$stid = oci_parse($conn, 'BEGIN myproc(:rc); END;'); $refcur = oci_new_cursor($conn); oci_bind_by_name($stid, ':rc', $refcur, -1, OCI_B_CURSOR); oci_execute($stid); @@ -205,10 +216,10 @@ <![CDATA[ <?php -$conn = oci_connect("hr", "welcome", "localhost/orcl"); +$conn = oci_connect('hr', 'welcome', 'localhost/orcl'); // get the REF CURSOR -$stid = oci_parse($conn, "BEGIN myproc(:rc_out); END;"); +$stid = oci_parse($conn, 'BEGIN myproc(:rc_out); END;'); $refcur = oci_new_cursor($conn); oci_bind_by_name($stid, ':rc_out', $refcur, -1, OCI_B_CURSOR); oci_execute($stid); @@ -225,7 +236,7 @@ // pass the REF CURSOR to myproc_use_rc() to do more data processing // with the result set -$stid = oci_parse($conn, "begin myproc_use_rc(:rc_in); end;"); +$stid = oci_parse($conn, 'begin myproc_use_rc(:rc_in); end;'); oci_bind_by_name($stid, ':rc_in', $refcur, -1, OCI_B_CURSOR); oci_execute($stid); @@ -236,6 +247,15 @@ </para> </refsect1> + <refsect1 role="notes"> + &reftitle.notes; + <note> + <para> + In PHP versions before 5.0.0 use <function>ocisetprefetch</function> instead. &oci.name.compat.note; + </para> + </note> + </refsect1> + <refsect1 role="seealso"> &reftitle.seealso; <para>

« previous php.doc.cvs (#5430) next »