cvs: phpdoc-fr /reference/gmp/functions gmp-nextprime.xml /reference/oci8/functions oci-bind-array-by-name.xml
| From: | Yannick Torres | Date: | Sun, 09 Apr 2006 11:25:09 +0000 |
| Subject: | cvs: phpdoc-fr /reference/gmp/functions gmp-nextprime.xml /reference/oci8/functions oci-bind-array-by-name.xml | ||
| Groups: | php.doc.fr | ||
| Request: | Send a blank email to doc-fr+get-4869@lists.php.net to get a copy of this message | ||
yannick Sun Apr 9 11:25:09 2006 UTC
Added files:
/phpdoc-fr/reference/gmp/functions gmp-nextprime.xml
/phpdoc-fr/reference/oci8/functions oci-bind-array-by-name.xml
Log:
initial translation
http://cvs.php.net/viewcvs.cgi/phpdoc-fr/reference/gmp/functions/gmp-nextprime.xml?view=markup&rev=1.1
Index: phpdoc-fr/reference/gmp/functions/gmp-nextprime.xml
+++ phpdoc-fr/reference/gmp/functions/gmp-nextprime.xml
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.1 $ -->
<!-- EN-Revision: 1.1 Maintainer: yannick Status: ready -->
<refentry id="function.gmp-nextprime">
<refnamediv>
<refname>gmp_nextprime</refname>
<refpurpose>Trouve le prochain nombre premier</refpurpose>
</refnamediv>
<refsect1>
&reftitle.description;
<methodsynopsis>
<type>resource</type><methodname>gmp_nextprime</methodname>
<methodparam><type>int</type><parameter>a</parameter></methodparam>
</methodsynopsis>
<para>
Retourne le prochain nombre premier plus grand que <parameter>a</parameter>.
</para>
<para>
Cette fonction utilise un algorithme probabiliste pour identifier un
nombre premier et les chances de récupérer un nombre composite
sont extrèmement faibles.
</para>
<example>
<title><function>gmp_nextprime</function> example</title>
<programlisting role="php">
<![CDATA[
<?php
$prime1 = gmp_nextprime(10); // prochain nom premier supérieur à 10
$prime2 = gmp_nextprime(-1000); // prochain nombre premier supérieur à -1000
echo gmp_strval($prime1) . "\n";
echo gmp_strval($prime2) . "\n";
?>
]]>
</programlisting>
&example.outputs;
<screen>
<![CDATA[
11
-997
]]>
</screen>
</example>
</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/viewcvs.cgi/phpdoc-fr/reference/oci8/functions/oci-bind-array-by-name.xml?view=markup&rev=1.1
Index: phpdoc-fr/reference/oci8/functions/oci-bind-array-by-name.xml
+++ phpdoc-fr/reference/oci8/functions/oci-bind-array-by-name.xml
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.1 $ -->
<!-- EN-Revision: 1.1 Maintainer: yannick Status: ready -->
<!-- Reviewed: no -->
<refentry id="function.oci-bind-array-by-name">
<refnamediv>
<refname>oci_bind_array_by_name</refname>
<refpurpose>
Lie un tableau &php; Ã un tableau Oracle PL/SQL par son nom
</refpurpose>
</refnamediv>
<refsect1>
&reftitle.description;
<methodsynopsis>
<type>bool</type><methodname>oci_bind_array_by_name</methodname>
<methodparam><type>resource</type><parameter>stmt</parameter></methodparam>
<methodparam><type>string</type><parameter>name</parameter></methodparam>
<methodparam><type>array</type><parameter
role="reference">var_array</parameter></methodparam>
<methodparam><type>int</type><parameter>max_table_length</parameter></methodparam>
<methodparam
choice="opt"><type>int</type><parameter>max_item_length</parameter></methodparam>
<methodparam
choice="opt"><type>int</type><parameter>type</parameter></methodparam>
</methodsynopsis>
<note>
<para>
Cette fonction est disponible depuis OCI8 version 1.2 et &php; version 5.1.2.
</para>
</note>
<para>
<function>oci_bind_array_by_name</function> lit un tableau &php;
<parameter>var_array</parameter> Ã un marquer Oracle
<parameter>name</parameter>, qui pointe vers un tableau PL/SQL.
Il peut être utilisé pour l'entrée ou la sortie, suivant la configuration Ã
l'exécution.
Le paramètre <parameter>max_table_length</parameter> définit la longueur
maximale des tableaux d'entrées et de résultats. Le paramètre
<parameter>max_item_length</parameter> définit la longueur maximale pour
les éléments du tableau. Si <parameter>max_item_length</parameter> n'est
pas fourni
ou s'il vaut -1, <function>oci_bind_array_by_name</function> cherchera
l'élément
le plus long dans le tableau d'entrée et l'utilisera en tant que longueur maximale.
Le paramètre <parameter>type</parameter> devrait être utilisé pour
définir
le type des éléments PL/SQL. Voir la liste des types disponibles ci-dessous.
</para>
<para>
<itemizedlist>
<listitem>
<para>
<constant>SQLT_NUM</constant> - pour les tableaux de NUMBER.
</para>
</listitem>
<listitem>
<para>
<constant>SQLT_INT</constant> - pour les tableaux INTEGER (Note : INTEGER
c'est actuellement un synonyme pour NUMBER(38), mais le type
<constant>SQLT_NUM</constant> fonctionne dans ce cas même s'ils sont
synonymes).
</para>
</listitem>
<listitem>
<para>
<constant>SQLT_FLT</constant> - pour les tableaux de FLOAT.
</para>
</listitem>
<listitem>
<para>
<constant>SQLT_AFC</constant> - pour les tableaux de CHAR.
</para>
</listitem>
<listitem>
<para>
<constant>SQLT_CHR</constant> - pour les tableaux de VARCHAR2.
</para>
</listitem>
<listitem>
<para>
<constant>SQLT_VCS</constant> - pour les tableaux de VARCHAR.
</para>
</listitem>
<listitem>
<para>
<constant>SQLT_AVC</constant> - pour les tableaux de CHARZ.
</para>
</listitem>
<listitem>
<para>
<constant>SQLT_STR</constant> - pour les tableaux de STRING.
</para>
</listitem>
<listitem>
<para>
<constant>SQLT_LVC</constant> - for arrays of LONG VARCHAR.
</para>
</listitem>
<listitem>
<para>
<constant>SQLT_ODT</constant> - pour les tableaux de DATE.
</para>
</listitem>
</itemizedlist>
</para>
<para>
<example>
<title>Exemple avec <function>oci_bind_array_by_name</function></title>
<programlisting role="php">
<![CDATA[
<?php
$c = oci_connect("scott", "tiger");
$create = "CREATE TABLE bind_example(name VARCHAR(20))";
$statement = oci_parse($c, $create);
oci_execute($statement);
$create_pkg = "
CREATE OR REPLACE PACKAGE ARRAYBINDPKG1 AS
TYPE ARRTYPE IS TABLE OF VARCHAR(20) INDEX BY BINARY_INTEGER;
PROCEDURE iobind(c1 IN OUT ARRTYPE);
END ARRAYBINDPKG1;";
$statement = oci_parse($c, $create_pkg);
oci_execute($statement);
$create_pkg_body = "
CREATE OR REPLACE PACKAGE BODY ARRAYBINDPKG1 AS
CURSOR CUR IS SELECT name FROM bind_example;
PROCEDURE iobind(c1 IN OUT ARRTYPE) IS
BEGIN
FOR i IN 1..5 LOOP
INSERT INTO bind_example VALUES (c1(i));
END LOOP;
IF NOT CUR%ISOPEN THEN
OPEN CUR;
END IF;
FOR i IN REVERSE 1..5 LOOP
FETCH CUR INTO c1(i);
IF CUR%NOTFOUND THEN
CLOSE CUR;
EXIT;
END IF;
END LOOP;
END iobind;
END ARRAYBINDPKG1;";
$statement = oci_parse($c, $create_pkg_body);
oci_execute($statement);
$statement = oci_parse($c, "BEGIN ARRAYBINDPKG1.iobind(:c1); END;");
$array = array("one", "two", "three", "four",
"five");
oci_bind_array_by_name($statement, ":c1", $array, 5, -1, SQLT_CHR);
oci_execute($statement);
var_dump($array);
?>
]]>
</programlisting>
</example>
</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
-->