cvs: phpdoc-fr /reference/oci8 reference.xml /reference/oci8/functions ocibindbyname.xml ocicancel.xml ocicollassign.xml ocicollassignelem.xml
ocicollgetelem.xml ocicollmax.xml ocicollsize.xml ocicolltrim.xml ocicolumnisnull.xml ocicolumnname.xml ocicolumnprecision.xml ocicolumnscale.xml
ocicolumnsize.xml ocicolumntype.xml ocicolumntyperaw.xml ocicommit.xml ocidefinebyname.xml ocierror.xml ociexecute.xml ocifetch.xml ocifetchinto.xml
ocifetchstatement.xml ocifreecollection.xml ocifreecursor.xml ocifreedesc.xml ocifreestatement.xml ociinternaldebug.xml ociloadlob.xml ocilogoff.xml
ocilogon.xml ocinewcollection.xml ocinewcursor.xml ocinewdescriptor.xml ocinlogon.xml ocinumcols.xml ociparse.xml ociplogon.xml ociresult.xml
ocirollback.xml ocirowcount.xml ocisavelob.xml ocisavelobfile.xml ociserverversion.xml ocisetprefetch.xml ocistatementtype.xml ociwritelobtofile.xml
| From: | Damien Seguy | Date: | Tue, 11 Feb 2003 03:14:21 +0000 |
| Subject: | cvs: phpdoc-fr /reference/oci8 reference.xml /reference/oci8/functions ocibindbyname.xml ocicancel.xml ocicollassign.xml ocicollassignelem.xml ocicollgetelem.xml ocicollmax.xml ocicollsize.xml ocicolltrim.xml ocicolumnisnull.xml ocicolumnname.xml ocicolumnprecision.xml ocicolumnscale.xml ocicolumnsize.xml ocicolumntype.xml ocicolumntyperaw.xml ocicommit.xml ocidefinebyname.xml ocierror.xml ociexecute.xml ocifetch.xml ocifetchinto.xml ocifetchstatement.xml ocifreecollection.xml ocifreecursor.xml ocifreedesc.xml ocifreestatement.xml ociinternaldebug.xml ociloadlob.xml ocilogoff.xml ocilogon.xml ocinewcollection.xml ocinewcursor.xml ocinewdescriptor.xml ocinlogon.xml ocinumcols.xml ociparse.xml ociplogon.xml ociresult.xml ocirollback.xml ocirowcount.xml ocisavelob.xml ocisavelobfile.xml ociserverversion.xml ocisetprefetch.xml ocistatementtype.xml ociwritelobtofile.xml |
||
| Groups: | php.doc.fr | ||
| Request: | Send a blank email to doc-fr+get-242@lists.php.net to get a copy of this message | ||
dams Mon Feb 10 22:14:21 2003 EDT
Modified files:
/phpdoc-fr/reference/oci8 reference.xml
/phpdoc-fr/reference/oci8/functions ocibindbyname.xml ocicancel.xml
ocicollassign.xml
ocicollassignelem.xml
ocicollgetelem.xml
ocicollmax.xml ocicollsize.xml
ocicolltrim.xml
ocicolumnisnull.xml
ocicolumnname.xml
ocicolumnprecision.xml
ocicolumnscale.xml
ocicolumnsize.xml
ocicolumntype.xml
ocicolumntyperaw.xml
ocicommit.xml
ocidefinebyname.xml
ocierror.xml ociexecute.xml
ocifetch.xml ocifetchinto.xml
ocifetchstatement.xml
ocifreecollection.xml
ocifreecursor.xml
ocifreedesc.xml
ocifreestatement.xml
ociinternaldebug.xml
ociloadlob.xml ocilogoff.xml
ocilogon.xml
ocinewcollection.xml
ocinewcursor.xml
ocinewdescriptor.xml
ocinlogon.xml ocinumcols.xml
ociparse.xml ociplogon.xml
ociresult.xml ocirollback.xml
ocirowcount.xml ocisavelob.xml
ocisavelobfile.xml
ociserverversion.xml
ocisetprefetch.xml
ocistatementtype.xml
ociwritelobtofile.xml
Log:
update for proto
Index: phpdoc-fr/reference/oci8/reference.xml diff -u phpdoc-fr/reference/oci8/reference.xml:1.2 phpdoc-fr/reference/oci8/reference.xml:1.3 --- phpdoc-fr/reference/oci8/reference.xml:1.2 Mon Apr 15 20:54:37 2002 +++ phpdoc-fr/reference/oci8/reference.xml Mon Feb 10 22:14:20 2003 @@ -1,10 +1,12 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.2 $ --> +<!-- $Revision: 1.3 $ --> <reference id="ref.oci8"> <title>Oracle 8</title> <titleabbrev>oci8</titleabbrev> <partintro> - <para> + <section id="oci8.intro"> + &reftitle.intro; + <para> Ces fonctions vous permettront d'accéder aux serveurs Oracle8 et Oracle7. Elles utilisent l'interface Oracle8 Call-Interface (oci8). Vous aurez donc besoin des librairies clientes Oracle8 pour pouvoir @@ -17,6 +19,10 @@ complètement les types LOB, FILE et ROWID et vous permet d'utiliser des variables de définitions personnalisables. </para> + </section> + + <section id="oci8.requirements"> + &reftitle.required; <para> Avant d'utiliser cette extension, assurez-vous que vous avez bien paramétré vos variables d'environnement Oracle, ainsi que votre @@ -64,57 +70,97 @@ Si votre serveur web ne démarre pas, ou crashe au démarrage </title> <para> - Vérifiez que Apache a bien été compilé avec la librairie pthread : + Vérifiez que Apache a bien été compilé + avec la librairie pthread : </para> <para> - <informalexample> + <example> + <title>Configuration Apache avec pthread</title> <programlisting> -# ldd /www/apache/bin/httpd +<![CDATA[ +# ldd /www/apache/bin/httpd libpthread.so.0 => /lib/libpthread.so.0 (0x4001c000) libm.so.6 => /lib/libm.so.6 (0x4002f000) libcrypt.so.1 => /lib/libcrypt.so.1 (0x4004c000) libdl.so.2 => /lib/libdl.so.2 (0x4007a000) libc.so.6 => /lib/libc.so.6 (0x4007e000) /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000) +]]> </programlisting> - </informalexample> + </example> </para> <para> Si la libpthread n'est pas listée, vous devez réinstaller Apache : </para> <para> - <informalexample> + <example> + <title>Reinstaller Apache avec pthread</title> <programlisting> +<![CDATA[ # cd /usr/src/apache_1.3.xx # make clean # LIBS=-lpthread ./config.status # make # make install +]]> </programlisting> - </informalexample> + </example> </para> </note> <para> + Notez bien que sur certains systèmes comme UnixWare il faut utiliser + libthread au lieu de libpthread. PHP et Apache doivent alors être configurés + avec EXTRA_LIBS=-lthread. + </para> + </section> + + &reference.oci8.configure; + + <section id="oci8.configuration"> + &reftitle.runtime; + &no.config; + </section> + + <section id="oci8.resources"> + &reftitle.resources; + <para> + </para> + </section> + + &reference.oci8.constants; + + <section id="oci8.examples"> + &reftitle.examples; + <para> <example> - <title>Aide oci</title> + <title>Exemple avec OCI8</title> <programlisting role="php"> -<?php +<![CDATA[ +<?php // par sergo@bacup.ru -// Utilisez l'option : oci_DEFAULT pour éxécuter les commandes avec un délai -ociExecute($stmt, oci_DEFAULT); -// pour lire les données après lecture, utilisez : -$result = ociResult($stmt, $n); + +// Utilisez l'option: OCI_DEFAULT pour exécuter la commande avec exécution +// retardée. +OCIExecute($stmt, OCI_DEFAULT); + +// pour lire les données, après un fetch : + +$result = OCIResult($stmt, $n); if (is_object ($result)) $result = $result->load(); -// Pour les commandes INSERT ou UPDATE utilisez: + +// Pour les commandes INSERT et UPDATE utilisez : + $sql = "insert into table (field1, field2) values (field1 = 'value', field2 = empty_clob()) returning field2 into :field2"; -ociparse($conn, $sql); -$clob = ociNewDescriptor($conn, oci_D_LOB); -ociBindByName ($stmt, ":field2", &$clob, -1, oci_B_CLOB); -ociexecute($stmt, oci_DEFAULT); -$clob->save ("Du texte"); -ocicommit($conn); -?> +OCIParse($conn, $sql); +$clob = OCINewDescriptor($conn, OCI_D_LOB); +OCIBindByName ($stmt, ":field2", &$clob, -1, OCI_B_CLOB); +OCIExecute($stmt, OCI_DEFAULT); +$clob->save ("some text"); +OCICommit($conn); + +?> +]]> </programlisting> </example> </para> @@ -124,21 +170,28 @@ <example> <title>Utilisation de procédures stockées</title> <programlisting role="php"> -<?php +<![CDATA[ +<?php // par webmaster@remoterealty.com -$sth = ociparse ( $dbh, "begin sp_newaddress( :address_id, '$firstname', +$sth = OCIParse ( $dbh, "begin sp_newaddress( :address_id, '$firstname', '$lastname', '$company', '$address1', '$address2', '$city', '$state', '$postalcode', '$country', :error_code );end;" ); -// Ce script appelle la procédure stockée sp_newaddress, avec address_id qui est -// une variable entrante/sortante et :error_code une variable sortante. -// Lorsque vous les liez : - ociBindByName ( $sth, ":address_id", $addr_id, 10 ); - ociBindByName ( $sth, ":error_code", $errorcode, 10 ); - ociExecute ( $sth ); -?> + +// Cela appelle la procédure stockée sp_newaddress, avec la variable :address_id +// pour les entrées/sorties et :error_code comme variable de sortie. +// Ensuite, vous faites les liaisons suivantes : + + OCIBindByName ( $sth, ":address_id", $addr_id, 10 ); + OCIBindByName ( $sth, ":error_code", $errorcode, 10 ); + OCIExecute ( $sth ); + +?> +]]> </programlisting> </example> </para> + </section> + </partintro> &reference.oci8.functions; Index: phpdoc-fr/reference/oci8/functions/ocibindbyname.xml diff -u phpdoc-fr/reference/oci8/functions/ocibindbyname.xml:1.1 phpdoc-fr/reference/oci8/functions/ocibindbyname.xml:1.2 --- phpdoc-fr/reference/oci8/functions/ocibindbyname.xml:1.1 Sun Apr 14 20:35:14 2002 +++ phpdoc-fr/reference/oci8/functions/ocibindbyname.xml Mon Feb 10 22:14:20 2003 @@ -5,14 +5,14 @@ <refnamediv> <refname>ociBindByName</refname> <refpurpose> - Utilise une variable PHP pour la phase de définition, dans un SELECT. + Lie une variable PHP avec une requête SQL </refpurpose> </refnamediv> <refsect1> <title>Description</title> <methodsynopsis> - <type>int</type><methodname>ocibindbyname</methodname> - <methodparam><type>resource</type><parameter>stmt</parameter></methodparam> + <type>bool</type><methodname>OCIBindByName</methodname> + <methodparam><type>int</type><parameter>stmt</parameter></methodparam> <methodparam><type>string</type><parameter>ph_name</parameter></methodparam> <methodparam><type>mixed &</type><parameter>variable</parameter></methodparam> <methodparam><type>int</type><parameter>length</parameter></methodparam> @@ -38,52 +38,81 @@ devrait être fixée à -1. La variable <parameter>type</parameter> indique au serveur Oracle, quel type de pointeur va être utilisé. Les valeurs possibles sont : - oci_B_FILE (Fichier binaires), oci_B_CFILE (Fichier texte), - oci_B_CLOB (LOB- texte), oci_B_BLOB (LOB binaire) - et oci_B_ROWID (ROWID). + <constant>OCI_B_FILE</constant> (Fichiers binaires), + <constant>OCI_B_CFILE</constant> (Fichiers texte), + <constant>OCI_B_CLOB</constant> (LOB de texte), + <constant>OCI_B_BLOB</constant> (LOB binaire) et + <constant>OCI_B_ROWID</constant> (ROWID). </para> <example> - <title>ociDefineByName</title> + <title>Exemple avec <function>ocibindbyname</function></title> <programlisting role="php"> -<?php +<![CDATA[ +<?php /* Exemple ociBindByPos par thies@thieso.net (980221) Insère 3 lignes dans emp, et utilise ROWID pour mettre à jour les lignes, juste après l'insertion. */ -$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); + +$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); -} + 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)) { + +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); -/* Effacement des lignes inutiles dans la table emp .... */ -$stmt = ociparse($conn,"delete from emp where empno in (1111,2222,3333)"); -ociexecute($stmt); -ociFreeStatement($stmt); -ociLogoff($conn); -?> +OCIFreeStatement($stmt); + +/* Effacement des lignes inutiles dans la table emp */ +$stmt = OCIParse($conn,"delete from emp where empno in (1111,2222,3333)"); +OCIExecute($stmt); +OCIFreeStatement($stmt); + +OCILogoff($conn); +?> +]]> </programlisting> </example> + <warning> + <para> + C'est une mauvaise idée que d'utiliser les magic quotes et la fonction + <function>ocibindbyname</function> simultanément, car aucun ajout de + guillemets n'est nécessaire sur les variables citées, et tout + guillemets magiques sera inscrit dans votre base de données car + <function>ocibindbyname</function> n'est pas capable de faire la + différence entre les guillemets et ceux qui ont été ajoutés + dynamiquement. + </para> + </warning> + </refsect1> </refentry> Index: phpdoc-fr/reference/oci8/functions/ocicancel.xml diff -u phpdoc-fr/reference/oci8/functions/ocicancel.xml:1.1 phpdoc-fr/reference/oci8/functions/ocicancel.xml:1.2 --- phpdoc-fr/reference/oci8/functions/ocicancel.xml:1.1 Sun Apr 14 20:35:15 2002 +++ phpdoc-fr/reference/oci8/functions/ocicancel.xml Mon Feb 10 22:14:20 2003 @@ -3,14 +3,14 @@ <!-- last change to 'ocicancel' in en/ tree in rev 1.28 --> <refentry id="function.ocicancel"> <refnamediv> - <refname>OCICancel</refname> - <refpurpose>Bientôt documenté....</refpurpose> + <refname>ocicancel</refname> + <refpurpose>Libère les ressouces</refpurpose> </refnamediv> <refsect1> <title>Description</title> <methodsynopsis> - <type>int</type><methodname>ocicancel</methodname> - <methodparam><type>resource</type><parameter>stmt</parameter></methodparam> + <type>bool</type><methodname>ocicancel</methodname> + <methodparam><type>int</type><parameter>stmt</parameter></methodparam> </methodsynopsis> <simpara> <function>ocicancel</function> détruit les ressources liées Index: phpdoc-fr/reference/oci8/functions/ocicollassign.xml diff -u phpdoc-fr/reference/oci8/functions/ocicollassign.xml:1.1 phpdoc-fr/reference/oci8/functions/ocicollassign.xml:1.2 --- phpdoc-fr/reference/oci8/functions/ocicollassign.xml:1.1 Sun Apr 14 20:35:15 2002 +++ phpdoc-fr/reference/oci8/functions/ocicollassign.xml Mon Feb 10 22:14:20 2003 @@ -3,19 +3,19 @@ <!-- last change to 'ocicollassign' in en/ tree in rev 1.39 --> <refentry id="function.ocicollassign"> <refnamediv> - <refname>OCICollAssign</refname> - <refpurpose>Bientôt documenté....</refpurpose> + <refname>ocicollassign</refname> + <refpurpose>Assigne une collection depuis une autre collection</refpurpose> </refnamediv> <refsect1> <title>Description</title> <methodsynopsis> - <type>string</type><methodname>ocicollassign</methodname> + <type>bool</type><methodname>ocicollassign</methodname> <methodparam><type>object</type><parameter>collection</parameter></methodparam> <methodparam><type>object</type><parameter>object</parameter></methodparam> </methodsynopsis> - <simpara> - Bientôt documenté.... - </simpara> + <para> + &warn.undocumented.func; + </para> </refsect1> </refentry> Index: phpdoc-fr/reference/oci8/functions/ocicollassignelem.xml diff -u phpdoc-fr/reference/oci8/functions/ocicollassignelem.xml:1.1 phpdoc-fr/reference/oci8/functions/ocicollassignelem.xml:1.2 --- phpdoc-fr/reference/oci8/functions/ocicollassignelem.xml:1.1 Sun Apr 14 20:35:17 2002 +++ phpdoc-fr/reference/oci8/functions/ocicollassignelem.xml Mon Feb 10 22:14:20 2003 @@ -3,19 +3,19 @@ <!-- last change to 'ocicollassignelem' in en/ tree in rev 1.23 --> <refentry id="function.ocicollassignelem"> <refnamediv> - <refname>OCICollAssignElem</refname> - <refpurpose>Bientôt documenté....</refpurpose> + <refname>ocicollassignelem</refname> + <refpurpose>Assigne l'élément val à une collection, à l'index ndx</refpurpose> </refnamediv> <refsect1> <title>Description</title> <methodsynopsis> - <type>string</type><methodname>ocicollassignelem</methodname> + <type>bool</type><methodname>ocicollassignelem</methodname> <methodparam><type>object</type><parameter>collection</parameter></methodparam> <methodparam><type>string</type><parameter>ndx</parameter></methodparam> <methodparam><type>string</type><parameter>val</parameter></methodparam> </methodsynopsis> <simpara> - Bientôt documenté.... + &warn.undocumented.func; </simpara> </refsect1> </refentry> Index: phpdoc-fr/reference/oci8/functions/ocicollgetelem.xml diff -u phpdoc-fr/reference/oci8/functions/ocicollgetelem.xml:1.1 phpdoc-fr/reference/oci8/functions/ocicollgetelem.xml:1.2 --- phpdoc-fr/reference/oci8/functions/ocicollgetelem.xml:1.1 Sun Apr 14 20:35:18 2002 +++ phpdoc-fr/reference/oci8/functions/ocicollgetelem.xml Mon Feb 10 22:14:20 2003 @@ -3,8 +3,8 @@ <!-- last change to 'ocicollgetelem' in en/ tree in rev 1.23 --> <refentry id="function.ocicollgetelem"> <refnamediv> - <refname>OCICollGetElem</refname> - <refpurpose>Bientôt documenté....</refpurpose> + <refname>ocicollgetelem</refname> + <refpurpose>Lit la valeur d'un élément d'une collection à l'index ndx</refpurpose> </refnamediv> <refsect1> <title>Description</title> @@ -13,9 +13,9 @@ <methodparam><type>object</type><parameter>collection</parameter></methodparam> <methodparam><type>string</type><parameter>ndx</parameter></methodparam> </methodsynopsis> - <simpara> - Bientôt documenté.... - </simpara> + <para> + &warn.undocumented.func; + </para> </refsect1> </refentry> Index: phpdoc-fr/reference/oci8/functions/ocicollmax.xml diff -u phpdoc-fr/reference/oci8/functions/ocicollmax.xml:1.1 phpdoc-fr/reference/oci8/functions/ocicollmax.xml:1.2 --- phpdoc-fr/reference/oci8/functions/ocicollmax.xml:1.1 Sun Apr 14 20:35:18 2002 +++ phpdoc-fr/reference/oci8/functions/ocicollmax.xml Mon Feb 10 22:14:20 2003 @@ -3,17 +3,20 @@ <!-- last change to 'ocicollmax' in en/ tree in rev 1.23 --> <refentry id="function.ocicollmax"> <refnamediv> - <refname>OCICollMax</refname> - <refpurpose>Bientôt documenté....</refpurpose> + <refname>ocicollmax</refname> + <refpurpose>Retourne la plus grande valeur d'une collection</refpurpose> </refnamediv> <refsect1> <title>Description</title> <methodsynopsis> - <type>string</type><methodname>ocicollmax</methodname> + <type>int</type><methodname>ocicollmax</methodname> <methodparam><type>object</type><parameter>collection</parameter></methodparam> </methodsynopsis> <simpara> - Bientôt documenté.... + &warn.undocumented.func; + </simpara> + <simpara> + Pour un varray, c'est la taille maximale du tableau. </simpara> </refsect1> </refentry> Index: phpdoc-fr/reference/oci8/functions/ocicollsize.xml diff -u phpdoc-fr/reference/oci8/functions/ocicollsize.xml:1.1 phpdoc-fr/reference/oci8/functions/ocicollsize.xml:1.2 --- phpdoc-fr/reference/oci8/functions/ocicollsize.xml:1.1 Sun Apr 14 20:35:18 2002 +++ phpdoc-fr/reference/oci8/functions/ocicollsize.xml Mon Feb 10 22:14:20 2003 @@ -3,17 +3,17 @@ <!-- last change to 'ocicollsize' in en/ tree in rev 1.23 --> <refentry id="function.ocicollsize"> <refnamediv> - <refname>OCICollSize</refname> - <refpurpose>Bientôt documenté....</refpurpose> + <refname>ocicollsize</refname> + <refpurpose>Retourne la taille d'une collection</refpurpose> </refnamediv> <refsect1> <title>Description</title> <methodsynopsis> - <type>string</type><methodname>ocicollsize</methodname> + <type>int</type><methodname>ocicollsize</methodname> <methodparam><type>object</type><parameter>collection</parameter></methodparam> </methodsynopsis> <simpara> - Bientôt documenté.... + &warn.undocumented.func; </simpara> </refsect1> </refentry> Index: phpdoc-fr/reference/oci8/functions/ocicolltrim.xml diff -u phpdoc-fr/reference/oci8/functions/ocicolltrim.xml:1.1 phpdoc-fr/reference/oci8/functions/ocicolltrim.xml:1.2 --- phpdoc-fr/reference/oci8/functions/ocicolltrim.xml:1.1 Sun Apr 14 20:35:18 2002 +++ phpdoc-fr/reference/oci8/functions/ocicolltrim.xml Mon Feb 10 22:14:20 2003 @@ -3,18 +3,18 @@ <!-- last change to 'ocicolltrim' in en/ tree in rev 1.23 --> <refentry id="function.ocicolltrim"> <refnamediv> - <refname>OCICollTrim</refname> - <refpurpose>Bientôt documenté....</refpurpose> + <refname>ocicolltrim</refname> + <refpurpose>Supprime num éléments à la fin de la collection</refpurpose> </refnamediv> <refsect1> <title>Description</title> <methodsynopsis> - <type>string</type><methodname>ocicolltrim</methodname> + <type>bool</type><methodname>ocicolltrim</methodname> <methodparam><type>object</type><parameter>collection</parameter></methodparam> <methodparam><type>int</type><parameter>num</parameter></methodparam> </methodsynopsis> <simpara> - Bientôt documenté.... + &warn.undocumented.func; </simpara> </refsect1> </refentry> Index: phpdoc-fr/reference/oci8/functions/ocicolumnisnull.xml diff -u phpdoc-fr/reference/oci8/functions/ocicolumnisnull.xml:1.2 phpdoc-fr/reference/oci8/functions/ocicolumnisnull.xml:1.3 --- phpdoc-fr/reference/oci8/functions/ocicolumnisnull.xml:1.2 Tue Aug 13 22:19:33 2002 +++ phpdoc-fr/reference/oci8/functions/ocicolumnisnull.xml Mon Feb 10 22:14:20 2003 @@ -3,23 +3,23 @@ <!-- last change to 'ocicolumnisnull' in en/ tree in rev 1.2 --> <refentry id="function.ocicolumnisnull"> <refnamediv> - <refname>ociColumnIsNULL</refname> - <refpurpose>Teste si la valeur d'une colonne est NULL.</refpurpose> + <refname>ocicolumnisnull</refname> + <refpurpose>Teste si la valeur d'une colonne est NULL</refpurpose> </refnamediv> <refsect1> <title>Description</title> <methodsynopsis> - <type>int</type><methodname>ocicolumnisnull</methodname> + <type>bool</type><methodname>ocicolumnisnull</methodname> <methodparam><type>resource</type><parameter>stmt</parameter></methodparam> <methodparam><type>mixed</type><parameter>column</parameter></methodparam> </methodsynopsis> <para> <function>ocicolumnisnull</function> retourne &true; si la colonne - <parameter>col</parameter> du résultat + <parameter>column</parameter> du résultat <parameter>stmt</parameter> est NULL. Vous pouvez utiliser le numéro de colonne (l'indexation des colonnes commence à 1) ou le nom de la colonne, pour le - paramètre <parameter>col</parameter>. + paramètre <parameter>column</parameter>. </para> </refsect1> </refentry> Index: phpdoc-fr/reference/oci8/functions/ocicolumnname.xml diff -u phpdoc-fr/reference/oci8/functions/ocicolumnname.xml:1.1 phpdoc-fr/reference/oci8/functions/ocicolumnname.xml:1.2 --- phpdoc-fr/reference/oci8/functions/ocicolumnname.xml:1.1 Sun Apr 14 20:35:19 2002 +++ phpdoc-fr/reference/oci8/functions/ocicolumnname.xml Mon Feb 10 22:14:20 2003 @@ -3,51 +3,55 @@ <!-- last change to 'ocicolumnname' in en/ tree in rev 1.15 --> <refentry id="function.ocicolumnname"> <refnamediv> - <refname>ociColumnName</refname> - <refpurpose>Retourne le nom d'une colonne.</refpurpose> + <refname>ocicolumname</refname> + <refpurpose>Retourne le nom d'une colonne</refpurpose> </refnamediv> <refsect1> <title>Description</title> <methodsynopsis> <type>string</type><methodname>ocicolumnname</methodname> - <methodparam><type>resource</type><parameter>stmt</parameter></methodparam> + <methodparam><type>int</type><parameter>stmt</parameter></methodparam> <methodparam><type>int</type><parameter>col</parameter></methodparam> </methodsynopsis> <simpara> <function>ocicolumnname</function> retourne le nom de la colonne - numéro <parameter>col</parameter> (en commençant à 1). + numéro <parameter>col</parameter> (l'indéxation des + colonnes commence à 1). </simpara> <para> <example> - <title>ociColumnName</title> + <title>Exemple avec <function>ocicolumnname</function></title> <programlisting role="php"> -<?php - print "<HTML><PRE>\n"; - $conn = ociLogon("scott", "tiger"); - $stmt = ociparse($conn,"select * from emp"); - ociexecute($stmt); - print "<TABLE BORDER=\"1\">"; - print "<TR>"; - print "<TH>Name</TH>"; - print "<TH>Type</TH>"; - print "<TH>Length</TH>"; - print "</TR>"; - $ncols = ociNumCols($stmt); - for ( $i = 1; $i <= $ncols; $i++ ) { - $column_name = ociColumnName($stmt,$i); - $column_type = ociColumnType($stmt,$i); - $column_size = ociColumnSize($stmt,$i); - print "<TR>"; - print "<TD>$column_name</TD>"; - print "<TD>$column_type</TD>"; - print "<TD>$column_size</TD>"; - print "</TR>"; +<![CDATA[ +<?php + print "<HTML><PRE>\n"; + $conn = OCILogon("scott", "tiger"); + $stmt = OCIParse($conn,"select * from emp"); + OCIExecute($stmt); + print "<TABLE BORDER=\"1\">"; + print "<TR>"; + print "<TH>Nom</TH>"; + print "<TH>Type</TH>"; + print "<TH>Taille</TH>"; + print "</TR>"; + $ncols = OCINumCols($stmt); + for ( $i = 1; $i <= $ncols; $i++ ) { + $column_name = OCIColumnName($stmt,$i); + $column_type = OCIColumnType($stmt,$i); + $column_size = OCIColumnSize($stmt,$i); + print "<TR>"; + print "<TD>$column_name</TD>"; + print "<TD>$column_type</TD>"; + print "<TD>$column_size</TD>"; + print "</TR>"; } - ociFreeStatement($stmt); - ociLogoff($conn); - print "</PRE>"; - print "</HTML>\n"; -?> + print "</TABLE>\n"; + OCIFreeStatement($stmt); + OCILogoff($conn); + print "</PRE>"; + print "</HTML>\n"; +?> +]]> </programlisting> </example> </para> Index: phpdoc-fr/reference/oci8/functions/ocicolumnprecision.xml diff -u phpdoc-fr/reference/oci8/functions/ocicolumnprecision.xml:1.1 phpdoc-fr/reference/oci8/functions/ocicolumnprecision.xml:1.2 --- phpdoc-fr/reference/oci8/functions/ocicolumnprecision.xml:1.1 Sun Apr 14 20:35:20 2002 +++ phpdoc-fr/reference/oci8/functions/ocicolumnprecision.xml Mon Feb 10 22:14:20 2003 @@ -3,18 +3,18 @@ <!-- last change to 'ocicolumnprecision' in en/ tree in rev 1.23 --> <refentry id="function.ocicolumnprecision"> <refnamediv> - <refname>OCIColumnPrecision</refname> - <refpurpose>Bientôt documenté....</refpurpose> + <refname>ocicolumnprecision</refname> + <refpurpose>Lit la précision de la colonne</refpurpose> </refnamediv> <refsect1> <title>Description</title> <methodsynopsis> <type>int</type><methodname>ocicolumnprecision</methodname> - <methodparam><type>resource</type><parameter>stmt</parameter></methodparam> + <methodparam><type>int</type><parameter>stmt</parameter></methodparam> <methodparam><type>int</type><parameter>col</parameter></methodparam> </methodsynopsis> <simpara> - Bientôt documenté.... + &warn.undocumented.func; </simpara> </refsect1> </refentry> Index: phpdoc-fr/reference/oci8/functions/ocicolumnscale.xml diff -u phpdoc-fr/reference/oci8/functions/ocicolumnscale.xml:1.1 phpdoc-fr/reference/oci8/functions/ocicolumnscale.xml:1.2 --- phpdoc-fr/reference/oci8/functions/ocicolumnscale.xml:1.1 Sun Apr 14 20:35:21 2002 +++ phpdoc-fr/reference/oci8/functions/ocicolumnscale.xml Mon Feb 10 22:14:20 2003 @@ -3,18 +3,18 @@ <!-- last change to 'ocicolumnscale' in en/ tree in rev 1.23 --> <refentry id="function.ocicolumnscale"> <refnamediv> - <refname>OCIColumnScale</refname> - <refpurpose>Bientôt documenté....</refpurpose> + <refname>ocicolumnscale</refname> + <refpurpose>Lit la taille d'une colonne</refpurpose> </refnamediv> <refsect1> <title>Description</title> <methodsynopsis> <type>int</type><methodname>ocicolumnscale</methodname> - <methodparam><type>resource</type><parameter>stmt</parameter></methodparam> + <methodparam><type>int</type><parameter>stmt</parameter></methodparam> <methodparam><type>int</type><parameter>col</parameter></methodparam> </methodsynopsis> <simpara> - Bientôt documenté.... + &warn.undocumented.func; </simpara> </refsect1> </refentry> Index: phpdoc-fr/reference/oci8/functions/ocicolumnsize.xml diff -u phpdoc-fr/reference/oci8/functions/ocicolumnsize.xml:1.1 phpdoc-fr/reference/oci8/functions/ocicolumnsize.xml:1.2 --- phpdoc-fr/reference/oci8/functions/ocicolumnsize.xml:1.1 Sun Apr 14 20:35:21 2002 +++ phpdoc-fr/reference/oci8/functions/ocicolumnsize.xml Mon Feb 10 22:14:20 2003 @@ -3,54 +3,56 @@ <!-- last change to 'ocicolumnsize' in en/ tree in rev 1.15 --> <refentry id="function.ocicolumnsize"> <refnamediv> - <refname>ociColumnSize</refname> - <refpurpose>Retourne la taille de la colonne.</refpurpose> + <refname>ocicolumnsize</refname> + <refpurpose>Retourne la taille de la colonne</refpurpose> </refnamediv> <refsect1> <title>Description</title> <methodsynopsis> <type>int</type><methodname>ocicolumnsize</methodname> - <methodparam><type>resource</type><parameter>stmt</parameter></methodparam> + <methodparam><type>int</type><parameter>stmt</parameter></methodparam> <methodparam><type>mixed</type><parameter>column</parameter></methodparam> </methodsynopsis> <para> <function>ocicolumnsize</function> retourne la taille de la colonne. Vous pouvez utiliser l'index de colonne (l'indexation commence à 1) ou le nom de la colonne dans le paramètre - <parameter>col</parameter>. + <parameter>column</parameter>. </para> <para> <example> - <title>ociColumnSize</title> + <title>Exemple avec <function>ocicolumnsize</function></title> <programlisting role="php"> -<?php - print "<HTML><PRE>\n"; - $conn = ociLogon("scott", "tiger"); - $stmt = ociparse($conn,"select * from emp"); - ociexecute($stmt); - print "<TABLE BORDER=\"1\">"; - print "<TR>"; - print "<TH>Name</TH>"; - print "<TH>Type</TH>"; - print "<TH>Length</TH>"; - print "</TR>"; - $ncols = ociNumCols($stmt); - for ( $i = 1; $i <= $ncols; $i++ ) { - $column_name = ociColumnName($stmt,$i); - $column_type = ociColumnType($stmt,$i); - $column_size = ociColumnSize($stmt,$i); - print "<TR>"; - print "<TD>$column_name</TD>"; - print "<TD>$column_type</TD>"; - print "<TD>$column_size</TD>"; - print "</TR>"; +<![CDATA[ +<?php + print "<HTML><PRE>\n"; + $conn = OCILogon("scott", "tiger"); + $stmt = OCIParse($conn,"select * from emp"); + OCIExecute($stmt); + print "<TABLE BORDER=\"1\">"; + print "<TR>"; + print "<TH>Name</TH>"; + print "<TH>Type</TH>"; + print "<TH>Length</TH>"; + print "</TR>"; + $ncols = OCINumCols($stmt); + for ( $i = 1; $i <= $ncols; $i++ ) { + $column_name = OCIColumnName($stmt,$i); + $column_type = OCIColumnType($stmt,$i); + $column_size = OCIColumnSize($stmt,$i); + print "<TR>"; + print "<TD>$column_name</TD>"; + print "<TD>$column_type</TD>"; + print "<TD>$column_size</TD>"; + print "</TR>"; } - print "</TABLE>"; - ociFreeStatement($stmt); - ociLogoff($conn); - print "</PRE>"; - print "</HTML>\n"; -?> + print "</TABLE>"; + OCIFreeStatement($stmt); + OCILogoff($conn); + print "</PRE>"; + print "</HTML>\n"; +?> +]]> </programlisting> </example> </para> Index: phpdoc-fr/reference/oci8/functions/ocicolumntype.xml diff -u phpdoc-fr/reference/oci8/functions/ocicolumntype.xml:1.1 phpdoc-fr/reference/oci8/functions/ocicolumntype.xml:1.2 --- phpdoc-fr/reference/oci8/functions/ocicolumntype.xml:1.1 Sun Apr 14 20:35:21 2002 +++ phpdoc-fr/reference/oci8/functions/ocicolumntype.xml Mon Feb 10 22:14:20 2003 @@ -3,15 +3,15 @@ <!-- last change to 'ocicolumntype' in en/ tree in rev 1.2 --> <refentry id="function.ocicolumntype"> <refnamediv> - <refname>ociColumnType</refname> - <refpurpose>Retourne le type de données d'une colonne.</refpurpose> + <refname>ocicolumntype</refname> + <refpurpose>Retourne le type de données d'une colonne</refpurpose> </refnamediv> <refsect1> <title>Description</title> <methodsynopsis> - <type>mixed</type><methodname>ocicolumntype</methodname> - <methodparam><type>resource</type><parameter>stmt</parameter></methodparam> - <methodparam><type>int</type><parameter>col</parameter></methodparam> + <type>mixed</type><methodname>ocicolumntype</methodname> + <methodparam><type>int</type><parameter>stmt</parameter></methodparam> + <methodparam><type>int</type><parameter>col</parameter></methodparam> </methodsynopsis> <simpara> <function>ocicolumntype</function> retourne le type de données @@ -23,33 +23,36 @@ <example> <title>Exemple avec <function>ocicolumntype</function></title> <programlisting role="php"> -<?php - print "<HTML><PRE>\n"; - $conn = ociLogon("scott", "tiger"); - $stmt = ociparse($conn,"select * from emp"); - ociexecute($stmt); - print "<TABLE BORDER=\"1\">"; - print "<TR>"; - print "<TH>Name</TH>"; - print "<TH>Type</TH>"; - print "<TH>Length</TH>"; - print "</TR>"; - $ncols = ociNumCols($stmt); - for ( $i = 1; $i <= $ncols; $i++ ) { - $column_name = ociColumnName($stmt,$i); - $column_type = ociColumnType($stmt,$i); - $column_size = ociColumnSize($stmt,$i); - print "<TR>"; - print "<TD>$column_name</TD>"; - print "<TD>$column_type</TD>"; - print "<TD>$column_size</TD>"; - print "</TR>"; +<![CDATA[ +<?php + print "<HTML><PRE>\n"; + $conn = OCILogon("scott", "tiger"); + $stmt = OCIParse($conn,"select * from emp"); + OCIExecute($stmt); + print "<TABLE BORDER=\"1\">"; + print "<TR>"; + print "<TH>Nom</TH>"; + print "<TH>Type</TH>"; + print "<TH>Longueur</TH>"; + print "</TR>"; + $ncols = OCINumCols($stmt); + for ( $i = 1; $i <= $ncols; $i++ ) { + $column_name = OCIColumnName($stmt,$i); + $column_type = OCIColumnType($stmt,$i); + $column_size = OCIColumnSize($stmt,$i); + print "<TR>"; + print "<TD>$column_name</TD>"; + print "<TD>$column_type</TD>"; + print "<TD>$column_size</TD>"; + print "</TR>"; } - ociFreeStatement($stmt); - ociLogoff($conn); - print "</PRE>"; - print "</HTML>\n"; -?> + print "</TABLE>\n"; + OCIFreeStatement($stmt); + OCILogoff($conn); + print "</PRE>"; + print "</HTML>\n"; +?> +]]> </programlisting> </example> </para> Index: phpdoc-fr/reference/oci8/functions/ocicolumntyperaw.xml diff -u phpdoc-fr/reference/oci8/functions/ocicolumntyperaw.xml:1.1 phpdoc-fr/reference/oci8/functions/ocicolumntyperaw.xml:1.2 --- phpdoc-fr/reference/oci8/functions/ocicolumntyperaw.xml:1.1 Sun Apr 14 20:35:21 2002 +++ phpdoc-fr/reference/oci8/functions/ocicolumntyperaw.xml Mon Feb 10 22:14:20 2003 @@ -3,18 +3,18 @@ <!-- last change to 'ocicolumntyperaw' in en/ tree in rev 1.23 --> <refentry id="function.ocicolumntyperaw"> <refnamediv> - <refname>OCIColumnTypeRaw</refname> - <refpurpose>Bientôt documenté....</refpurpose> + <refname>ocicolumntyperaw</refname> + <refpurpose>Lit directement le type de colonne Oracle</refpurpose> </refnamediv> <refsect1> <title>Description</title> <methodsynopsis> <type>mixed</type><methodname>ocicolumntyperaw</methodname> - <methodparam><type>resource</type><parameter>stmt</parameter></methodparam> + <methodparam><type>int</type><parameter>stmt</parameter></methodparam> <methodparam><type>int</type><parameter>col</parameter></methodparam> </methodsynopsis> <simpara> - Bientôt documenté.... + &warn.undocumented.func; </simpara> </refsect1> </refentry> Index: phpdoc-fr/reference/oci8/functions/ocicommit.xml diff -u phpdoc-fr/reference/oci8/functions/ocicommit.xml:1.1 phpdoc-fr/reference/oci8/functions/ocicommit.xml:1.2 --- phpdoc-fr/reference/oci8/functions/ocicommit.xml:1.1 Sun Apr 14 20:35:21 2002 +++ phpdoc-fr/reference/oci8/functions/ocicommit.xml Mon Feb 10 22:14:20 2003 @@ -4,18 +4,56 @@ <refentry id="function.ocicommit"> <refnamediv> <refname>ociCommit</refname> - <refpurpose>Valide les transactions en cours.</refpurpose> + <refpurpose>Valide les transactions en cours</refpurpose> </refnamediv> <refsect1> <title>Description</title> <methodsynopsis> - <type>int</type><methodname>ocicommit</methodname> - <methodparam><type>resource</type><parameter>connection</parameter></methodparam> + <type>bool</type><methodname>OCICommit</methodname> + <methodparam><type>int</type><parameter>connection</parameter></methodparam> </methodsynopsis> <para> <function>ocicommit</function> valide toutes les transactions en cours sur la connexion Oracle <parameter>connection</parameter>. + &return.success; </para> + <para> + This example demonstrates how OCICommit is used. + <example> + <title>OCICommit</title> + <programlisting> +<![CDATA[ +<?php + // Connexion au serveur Oracle + $conn = OCILogon('scott', 'tiger'); + + // Analyse de la requête SQL + $stmt = OCIParse($conn, "INSERT INTO employees (name, surname) VALUES ('Maxim', 'Maletsky')"); + + // Exécution de la requête + OCIExecute($stmt); + + // Validation de la transaction + $committed = OCICommit($conn); + + // Vérification de la validation : si une erreur est survenue, afficher + // le message d'erreur + if(!$committed) { + $error = OCIError($conn); + echo 'Lavalidation a échoué. Oracle dit : ' . $error['message']; + } + + // Fermeture de la connexion + OCILogoff($conn); +?> +]]> + </programlisting> + </example> + </para> + <simpara> + Voir aussi + <function>ocirollback</function>. + </simpara> </refsect1> </refentry> Index: phpdoc-fr/reference/oci8/functions/ocidefinebyname.xml diff -u phpdoc-fr/reference/oci8/functions/ocidefinebyname.xml:1.1 phpdoc-fr/reference/oci8/functions/ocidefinebyname.xml:1.2 --- phpdoc-fr/reference/oci8/functions/ocidefinebyname.xml:1.1 Sun Apr 14 20:35:21 2002 +++ phpdoc-fr/reference/oci8/functions/ocidefinebyname.xml Mon Feb 10 22:14:20 2003 @@ -5,14 +5,14 @@ <refnamediv> <refname>ociDefineByName</refname> <refpurpose> - Utilise une variable PHP pour la phase de définition, dans une commande SELECT. + Utilise une variable PHP pour la phase de définition, dans une commande SELECT </refpurpose> </refnamediv> <refsect1> <title>Description</title> <methodsynopsis> - <type>int</type><methodname>ocidefinebyname</methodname> - <methodparam><type>resource</type><parameter>stmt</parameter></methodparam> + <type>bool</type><methodname>ocidefinebyname</methodname> + <methodparam><type>int</type><parameter>stmt</parameter></methodparam> <methodparam><type>string</type><parameter>Column-Name</parameter></methodparam> <methodparam><type>mixed</type><parameter>variable</parameter></methodparam> <methodparam choice="opt"><type>int</type><parameter>type</parameter></methodparam> @@ -34,23 +34,30 @@ Reportez-vous aussi à <function>ocibindbyname</function>. </para> <example> - <title>ociDefineByName</title> + <title>Exemple avec <function>ocidefinebyname</function></title> <programlisting role="php"> -<?php -/* Exemple ociDefineByPos par thies@thieso.net (980219) */ -$conn = ociLogon("scott","tiger"); -$stmt = ociparse($conn,"select empno, ename from emp"); -/* La définition DOIT être faîte AVANT ociexecute! */ -ociDefineByName($stmt,"EMPNO",&$empno); -ociDefineByName($stmt,"ENAME",&$ename); -ociexecute($stmt); -while (ociFetch($stmt)) { - echo "empno:".$empno."\n"; - echo "ename:".$ename."\n"; +<![CDATA[ +<?php +$conn = OCILogon("scott","tiger"); + +$stmt = OCIParse($conn,"select empno, ename from emp"); + +/* La définition DOIT intervenir AVANT l'exécution! */ + +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); -?> + +OCIFreeStatement($stmt); +OCILogoff($conn); +?> +]]> </programlisting> </example> </refsect1> Index: phpdoc-fr/reference/oci8/functions/ocierror.xml diff -u phpdoc-fr/reference/oci8/functions/ocierror.xml:1.1 phpdoc-fr/reference/oci8/functions/ocierror.xml:1.2 --- phpdoc-fr/reference/oci8/functions/ocierror.xml:1.1 Sun Apr 14 20:35:22 2002 +++ phpdoc-fr/reference/oci8/functions/ocierror.xml Mon Feb 10 22:14:20 2003 @@ -3,23 +3,26 @@ <!-- last change to 'ocierror' in en/ tree in rev 1.2 --> <refentry id="function.ocierror"> <refnamediv> - <refname>ociError</refname> + <refname>ocierror</refname> <refpurpose> - Retourne la dernière erreur de stmt|conn|global. + Retourne la dernière erreur de stmt|conn|global </refpurpose> </refnamediv> <refsect1> <title>Description</title> <methodsynopsis> - <type>array</type><methodname>ocierror</methodname> - <methodparam choice="opt"><type>int</type><parameter>stmt|conn</parameter></methodparam> + <type>array</type><methodname>OCIError</methodname> + <methodparam choice="opt"><type>int</type><parameter>stmt|conn|global</parameter></methodparam> </methodsynopsis> <simpara> <function>ocierror</function> retourne la dernière erreur trouvée. Si l'option <parameter>stmt|conn</parameter> n'est pas fournie, la dernière erreur rencontrée est retournée. Si aucune erreur n'est trouvée, <function>ocierror</function> retourne - <literal>FALSE</literal>. + &false;. <function>ocierror</function> retourne l'erreur sous la forme + d'un tableau associatif. Dans ce tableau, l'élément + <literal>code</literal> contient le numéro d'erreur Oracle + et <literal>message</literal> contient le message d'erreur. </simpara> </refsect1> </refentry> Index: phpdoc-fr/reference/oci8/functions/ociexecute.xml diff -u phpdoc-fr/reference/oci8/functions/ociexecute.xml:1.1 phpdoc-fr/reference/oci8/functions/ociexecute.xml:1.2 --- phpdoc-fr/reference/oci8/functions/ociexecute.xml:1.1 Sun Apr 14 20:35:22 2002 +++ phpdoc-fr/reference/oci8/functions/ociexecute.xml Mon Feb 10 22:14:20 2003 @@ -4,13 +4,13 @@ <refentry id="function.ociexecute"> <refnamediv> <refname>ociexecute</refname> - <refpurpose>Exécute une commande.</refpurpose> + <refpurpose>Exécute une commande</refpurpose> </refnamediv> <refsect1> <title>Description</title> <methodsynopsis> <type>int</type><methodname>ociexecute</methodname> - <methodparam><type>resource</type><parameter>statement</parameter></methodparam> + <methodparam><type>int</type><parameter>statement</parameter></methodparam> <methodparam choice="opt"><type>int</type><parameter>mode</parameter></methodparam> </methodsynopsis> <para> @@ -18,8 +18,11 @@ déjà préparée (voir <function>ociparse</function>). L'option <parameter>mode</parameter> vous permet de spécifier le mode d'exécution (par défaut, - il est à oci_COMMIT_ON_SUCCESS). Si vous ne voulez pas que la - commande soit automatiquement validée, utilisez le mode oci_DEFAULT. + il est à <constant>OCI_COMMIT_ON_SUCCESS</constant>). Si vous ne voulez pas que la + commande soit automatiquement validée, utilisez le mode <constant>OCI_DEFAULT</constant>. + </para> + <para> + &return.success; </para> </refsect1> </refentry> Index: phpdoc-fr/reference/oci8/functions/ocifetch.xml diff -u phpdoc-fr/reference/oci8/functions/ocifetch.xml:1.1 phpdoc-fr/reference/oci8/functions/ocifetch.xml:1.2 --- phpdoc-fr/reference/oci8/functions/ocifetch.xml:1.1 Sun Apr 14 20:35:23 2002 +++ phpdoc-fr/reference/oci8/functions/ocifetch.xml Mon Feb 10 22:14:20 2003 @@ -3,20 +3,20 @@ <!-- last change to 'ocifetch' in en/ tree in rev 1.2 --> <refentry id="function.ocifetch"> <refnamediv> - <refname>ociFetch</refname> + <refname>ocifetch</refname> <refpurpose> - Modifie la prochaine ligne dans le résultat. + Lit la prochaine ligne dans le résultat Oracle </refpurpose> </refnamediv> <refsect1> <title>Description</title> <methodsynopsis> - <type>int</type><methodname>ocifetch</methodname> - <methodparam><type>resource</type><parameter>statement</parameter></methodparam> + <type>bool</type><methodname>ocifetch</methodname> + <methodparam><type>int</type><parameter>statement</parameter></methodparam> </methodsynopsis> <para> - <function>ocifetch</function> place la prochaine ligne - (d'une commande SELECT) dans le pointeur interne de résultat. + <function>ocifetch</function> lit la prochaine ligne + (d'une commande SELECT) et la place dans le buffer interne de résultat. </para> </refsect1> </refentry> Index: phpdoc-fr/reference/oci8/functions/ocifetchinto.xml diff -u phpdoc-fr/reference/oci8/functions/ocifetchinto.xml:1.1 phpdoc-fr/reference/oci8/functions/ocifetchinto.xml:1.2 --- phpdoc-fr/reference/oci8/functions/ocifetchinto.xml:1.1 Sun Apr 14 20:35:23 2002 +++ phpdoc-fr/reference/oci8/functions/ocifetchinto.xml Mon Feb 10 22:14:20 2003 @@ -3,15 +3,15 @@ <!-- last change to 'ocifetchinto' in en/ tree in rev 1.2 --> <refentry id="function.ocifetchinto"> <refnamediv> - <refname>ociFetchInto</refname> - <refpurpose>Retourne la ligne suivante dans un tableau.</refpurpose> + <refname>ocifetchinto</refname> + <refpurpose>Retourne la ligne suivante dans un tableau</refpurpose> </refnamediv> <refsect1> <title>Description</title> <methodsynopsis> <type>int</type><methodname>ocifetchinto</methodname> - <methodparam><type>resource</type><parameter>stmt</parameter></methodparam> - <methodparam><type>array &</type><parameter>result</parameter></methodparam> + <methodparam><type>int</type><parameter>stmt</parameter></methodparam> + <methodparam><type>array</type><parameter>&result</parameter></methodparam> <methodparam choice="opt"><type>int</type><parameter>mode</parameter></methodparam> </methodsynopsis> <para> @@ -30,21 +30,47 @@ (i.e. OCI_ASSOC+OCI_RETURN_NULLS). Les modes valides sont : <simplelist> <member> - <literal>OCI_ASSOC</literal> Retourne un tableau associatif. + <constant>OCI_ASSOC</constant> retourne un tableau associatif. </member> <member> - <literal>OCI_NUM</literal> Retourne un tableau à index numérique + <constant>OCI_NUM</constant> retourne un tableau à index numérique (DEFAULT, valeur par défaut) </member> <member> - <literal>OCI_RETURN_NULLS</literal> Retourne les colonnes vides. + <constant>OCI_RETURN_NULLS</constant> retourne les colonnes vides. </member> <member> - <literal>OCI_RETURN_LOBS</literal> Retourne la valeur des objets LOB + <constant>OCI_RETURN_LOBS</constant> retourne la valeur des objets LOB plutôt que leur descripteur. </member> </simplelist> </para> + <para> + <example> + <title>Exemple avec <function>ocifetchinto</function></title> + <programlisting role="php"> +<![CDATA[ +<?php +$conn = ocilogon("username","password"); + +$query = "SELECT pommes FROM arbre"; + +$statement = OCIParse ($conn, $query); +OCIExecute ($statement); + +while (OCIFetchInto ($statement, $row, OCI_ASSOC)) { + print $row['pommes']; +} +?> +]]> + </programlisting> + </example> + </para> + <para> + Voir aussi + <function>ocifetch</function> et + <function>ociexecute</function>. + </para> </refsect1> </refentry> Index: phpdoc-fr/reference/oci8/functions/ocifetchstatement.xml diff -u phpdoc-fr/reference/oci8/functions/ocifetchstatement.xml:1.1 phpdoc-fr/reference/oci8/functions/ocifetchstatement.xml:1.2 --- phpdoc-fr/reference/oci8/functions/ocifetchstatement.xml:1.1 Sun Apr 14 20:35:23 2002 +++ phpdoc-fr/reference/oci8/functions/ocifetchstatement.xml Mon Feb 10 22:14:20 2003 @@ -3,15 +3,15 @@ <!-- last change to 'ocifetchstatement' in en/ tree in rev 1.2 --> <refentry id="function.ocifetchstatement"> <refnamediv> - <refname>ociFetchStatement</refname> - <refpurpose>Retourne toutes les lignes d'un résultat.</refpurpose> + <refname>ocifetchstatement</refname> + <refpurpose>Retourne toutes les lignes d'un résultat</refpurpose> </refnamediv> <refsect1> <title>Description</title> <methodsynopsis> - <type>int</type><methodname>ocifetchstatement</methodname> - <methodparam><type>resource</type><parameter>stmt</parameter></methodparam> - <methodparam><type>array &</type><parameter>variable</parameter></methodparam> + <type>int</type><methodname>ocifetchstatement</methodname> + <methodparam><type>resource</type><parameter>stmt</parameter></methodparam> + <methodparam><type>array &</type><parameter>variable</parameter></methodparam> </methodsynopsis> <para> <function>ocifetchstatement</function> retourne toutes les lignes @@ -20,38 +20,44 @@ de lignes retournées. </para> <example> - <title>ociFetchStatement</title> + <title>Exemple avec <function>ocifetchstatement</function></title> <programlisting role="php"> -<?php -/* exemple ociFetchStatement par mbritton@verinet.com (990624) */ -$conn = ociLogon("scott","tiger"); -$stmt = ociparse($conn,"select * from emp"); -ociexecute($stmt); -$nrows = ociFetchStatement($stmt,$results); -if ( $nrows > 0 ) { - print "<TABLE BORDER=\"1\">\n"; - print "<TR>\n"; +<![CDATA[ +<?php +$conn = OCILogon("scott","tiger"); + +$stmt = OCIParse($conn,"select * from emp"); + +OCIExecute($stmt); + +$nrows = OCIFetchStatement($stmt,$results); +if ( $nrows > 0 ) { + print "<TABLE BORDER=\"1\">\n"; + print "<TR>\n"; while ( list( $key, $val ) = each( $results ) ) { - print "<TH>$key</TH>\n"; + print "<TH>$key</TH>\n"; } - print "</TR>\n"; - for ( $i = 0; $i < $nrows; $i++ ) { + print "</TR>\n"; + + for ( $i = 0; $i < $nrows; $i++ ) { reset($results); - print "<TR>\n"; - while ( $column = each($results) ) { + print "<TR>\n"; + while ( $column = each($results) ) { $data = $column['value']; - print "<TD>$data[$i]</TD>\n"; + print "<TD>$data[$i]</TD>\n"; } - print "</TR>\n"; + print "</TR>\n"; } - print "</TABLE>\n"; + print "</TABLE>\n"; } else { - echo "Rien n'a été trouvé<br>\n"; -} -print "$nrows Records Selected<br>\n"; -ociFreeStatement($stmt); -ociLogoff($conn); -?> + echo "Aucune données trouvées<BR>\n"; +} +print "$nrows lignes lues<BR>\n"; + +OCIFreeStatement($stmt); +OCILogoff($conn); +?> +]]> </programlisting> </example> </refsect1> Index: phpdoc-fr/reference/oci8/functions/ocifreecollection.xml diff -u phpdoc-fr/reference/oci8/functions/ocifreecollection.xml:1.1 phpdoc-fr/reference/oci8/functions/ocifreecollection.xml:1.2 --- phpdoc-fr/reference/oci8/functions/ocifreecollection.xml:1.1 Sun Apr 14 20:35:23 2002 +++ phpdoc-fr/reference/oci8/functions/ocifreecollection.xml Mon Feb 10 22:14:20 2003 @@ -3,17 +3,17 @@ <!-- last change to 'ocifreecollection' in en/ tree in rev 1.23 --> <refentry id="function.ocifreecollection"> <refnamediv> - <refname>OCIFreeCollection</refname> - <refpurpose>Bientôt documenté....</refpurpose> + <refname>ocifreecollection</refname> + <refpurpose>Supprime une collection</refpurpose> </refnamediv> <refsect1> <title>Description</title> <methodsynopsis> - <type>string</type><methodname>ocifreecollection</methodname> + <type>bool</type><methodname>ocifreecollection</methodname> <methodparam><type>object</type><parameter>lob</parameter></methodparam> </methodsynopsis> <simpara> - Bientôt documenté.... + &warn.undocumented.func; </simpara> </refsect1> </refentry> Index: phpdoc-fr/reference/oci8/functions/ocifreecursor.xml diff -u phpdoc-fr/reference/oci8/functions/ocifreecursor.xml:1.2 phpdoc-fr/reference/oci8/functions/ocifreecursor.xml:1.3 --- phpdoc-fr/reference/oci8/functions/ocifreecursor.xml:1.2 Tue Aug 13 22:19:33 2002 +++ phpdoc-fr/reference/oci8/functions/ocifreecursor.xml Mon Feb 10 22:14:20 2003 @@ -5,18 +5,19 @@ <refnamediv> <refname>ociFreeCursor</refname> <refpurpose> - Libère toutes les ressources occupées par un pointeur. + Libère toutes les ressources réservées par un résultat Oracle </refpurpose> </refnamediv> <refsect1> <title>Description</title> <methodsynopsis> - <type>boolean</type><methodname>ocifreecursor</methodname> - <methodparam><type>resource</type><parameter>stmt</parameter></methodparam> + <type>int</type><methodname>ocifreecursor</methodname> + <methodparam><type>int</type><parameter>stmt</parameter></methodparam> </methodsynopsis> <para> - <function>ocifreecursor</function> retourne &true; en cas de - succès, et &false;en cas d'échec. + <function>ocifreecursor</function> libère toutes les ressources + réservées par le résultat Oracle <parameter>stmt</parameter>. + &return.success; </para> </refsect1> </refentry> Index: phpdoc-fr/reference/oci8/functions/ocifreedesc.xml diff -u phpdoc-fr/reference/oci8/functions/ocifreedesc.xml:1.2 phpdoc-fr/reference/oci8/functions/ocifreedesc.xml:1.3 --- phpdoc-fr/reference/oci8/functions/ocifreedesc.xml:1.2 Tue Aug 13 22:19:33 2002 +++ phpdoc-fr/reference/oci8/functions/ocifreedesc.xml Mon Feb 10 22:14:20 2003 @@ -3,18 +3,18 @@ <!-- last change to 'ocifreedesc' in en/ tree in rev 1.2 --> <refentry id="function.ocifreedesc"> <refnamediv> - <refname>ociFreeDesc</refname> - <refpurpose>Supprime un descripteur de LOB</refpurpose> + <refname>ocifreedesc</refname> + <refpurpose>Détruit un pointeur de LOB</refpurpose> </refnamediv> <refsect1> <title>Description</title> <methodsynopsis> - <type>int</type><methodname>ocifreedesc</methodname> + <type>bool</type><methodname>ocifreedesc</methodname> <methodparam><type>object</type><parameter>lob</parameter></methodparam> </methodsynopsis> <para> - <function>ocifreedesc</function> retourne &true; en cas de - succès, et &false;en cas d'échec. + <function>ocifreedesc</function> détruit le pointeur de LOB + <parameter>lob</parameter>. &return.success; </para> </refsect1> </refentry> Index: phpdoc-fr/reference/oci8/functions/ocifreestatement.xml diff -u phpdoc-fr/reference/oci8/functions/ocifreestatement.xml:1.2 phpdoc-fr/reference/oci8/functions/ocifreestatement.xml:1.3 --- phpdoc-fr/reference/oci8/functions/ocifreestatement.xml:1.2 Tue Aug 13 22:19:33 2002 +++ phpdoc-fr/reference/oci8/functions/ocifreestatement.xml Mon Feb 10 22:14:20 2003 @@ -3,20 +3,20 @@ <!-- last change to 'ocifreestatement' in en/ tree in rev 1.2 --> <refentry id="function.ocifreestatement"> <refnamediv> - <refname>ociFreeStatement</refname> + <refname>ocifreestatement</refname> <refpurpose> - Libère toutes les ressources occupées par une commande. + Libère toutes les ressources occupées par une commande </refpurpose> </refnamediv> <refsect1> <title>Description</title> <methodsynopsis> - <type>int</type><methodname>ocifreestatement</methodname> + <type>bool</type><methodname>ocifreestatement</methodname> <methodparam><type>resource</type><parameter>stmt</parameter></methodparam> </methodsynopsis> <para> - <function>ocifreestatement</function> retourne &true; - en cas de succès, et &false;en cas d'échec. + <function>ocifreestatement</function> libère toutes les ressources + occupées par la commande <parameter>stmt</parameter>. &return.success; </para> </refsect1> </refentry> Index: phpdoc-fr/reference/oci8/functions/ociinternaldebug.xml diff -u phpdoc-fr/reference/oci8/functions/ociinternaldebug.xml:1.1 phpdoc-fr/reference/oci8/functions/ociinternaldebug.xml:1.2 --- phpdoc-fr/reference/oci8/functions/ociinternaldebug.xml:1.1 Sun Apr 14 20:35:24 2002 +++ phpdoc-fr/reference/oci8/functions/ociinternaldebug.xml Mon Feb 10 22:14:20 2003 @@ -18,7 +18,7 @@ <function>ociinternaldebug</function> active ou désactive l'affichage des informations de debuggage. Pour les afficher, mettez <parameter>onoff</parameter> à 1, ou sinon mettez - <parameter>onoff</parameter> à 0 pour les cacher. + <parameter>onoff</parameter> à 0 pour les masquer. </simpara> </refsect1> </refentry> Index: phpdoc-fr/reference/oci8/functions/ociloadlob.xml diff -u phpdoc-fr/reference/oci8/functions/ociloadlob.xml:1.1 phpdoc-fr/reference/oci8/functions/ociloadlob.xml:1.2 --- phpdoc-fr/reference/oci8/functions/ociloadlob.xml:1.1 Sun Apr 14 20:35:25 2002 +++ phpdoc-fr/reference/oci8/functions/ociloadlob.xml Mon Feb 10 22:14:20 2003 @@ -3,8 +3,8 @@ <!-- last change to 'ociloadlob' in en/ tree in rev 1.23 --> <refentry id="function.ociloadlob"> <refnamediv> - <refname>OCILoadLob</refname> - <refpurpose>Bientôt documenté....</refpurpose> + <refname>ociloadlob</refname> + <refpurpose>Charge un LOB</refpurpose> </refnamediv> <refsect1> <title>Description</title> @@ -13,7 +13,7 @@ <methodparam><type>object</type><parameter>lob</parameter></methodparam> </methodsynopsis> <simpara> - Bientôt documenté.... + &warn.undocumented.func; </simpara> </refsect1> </refentry> Index: phpdoc-fr/reference/oci8/functions/ocilogoff.xml diff -u phpdoc-fr/reference/oci8/functions/ocilogoff.xml:1.1 phpdoc-fr/reference/oci8/functions/ocilogoff.xml:1.2 --- phpdoc-fr/reference/oci8/functions/ocilogoff.xml:1.1 Sun Apr 14 20:35:25 2002 +++ phpdoc-fr/reference/oci8/functions/ocilogoff.xml Mon Feb 10 22:14:20 2003 @@ -3,17 +3,25 @@ <!-- last change to 'ocilogoff' in en/ tree in rev 1.2 --> <refentry id="function.ocilogoff"> <refnamediv> - <refname>ociLogOff</refname> - <refpurpose>Déconnexion d'un serveur Oracle.</refpurpose> + <refname>ocilogoff</refname> + <refpurpose>Déconnecte d'un serveur Oracle</refpurpose> </refnamediv> <refsect1> <title>Description</title> <methodsynopsis> - <type>int</type><methodname>ocilogoff</methodname> + <type>bool</type><methodname>ocilogoff</methodname> <methodparam><type>resource</type><parameter>connection</parameter></methodparam> </methodsynopsis> <para> - <function>ocilogoff</function> ferme la connexion Oracle. + <function>ocilogoff</function> ferme la connexion Oracle + <parameter>connection</parameter>. + </para> + <para> + Utiliser <function>ocilogoff</function> n'est pas nécessaire, + car les connexions non persistantes seront automatiquement + fermée à la fin du script. Voyez aussi le chapitre sur la + <link linkend="language.types.resource.self-destruct">libération des + ressources</link>. </para> </refsect1> </refentry> Index: phpdoc-fr/reference/oci8/functions/ocilogon.xml diff -u phpdoc-fr/reference/oci8/functions/ocilogon.xml:1.1 phpdoc-fr/reference/oci8/functions/ocilogon.xml:1.2 --- phpdoc-fr/reference/oci8/functions/ocilogon.xml:1.1 Sun Apr 14 20:35:25 2002 +++ phpdoc-fr/reference/oci8/functions/ocilogon.xml Mon Feb 10 22:14:20 2003 @@ -3,22 +3,26 @@ <!-- last change to 'ocilogon' in en/ tree in rev 1.2 --> <refentry id="function.ocilogon"> <refnamediv> - <refname>ociLogon</refname> - <refpurpose>Etablit une connexion à un serveur Oracle.</refpurpose> + <refname>ocilogon</refname> + <refpurpose>Etablit une connexion à un serveur Oracle</refpurpose> </refnamediv> <refsect1> <title>Description</title> <methodsynopsis> - <type>resource</type><methodname>ocilogon</methodname> + <type>int</type><methodname>ocilogon</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>ocilogon</function> retourne un identifiant de connexion, - nécessaire à la plupart des fonctions oci. Si l'option - ORACLE_SID n'est pas précisée, PHP utilisera la variable - d'environnement ORACLE_SID pour déterminer le serveur de connexion. + nécessaire à la plupart des fonctions oci. Le paramètre + optionnel <parameter>db</parameter> peut contenir le nom local + du serveur Oracle, ou bien son nom dans la table d'entrées + tnsnames.ora à laquelle vous voulez vous connecter. Si le troisième + paramètre n'est pas spécifié, &php; utilisera la variable d'environnement + <varname>ORACLE_SID</varname> (instance Oracle) ou <varname>TWO_TASK</varname> + (tnsnames.ora) pour déterminer la base à laquelle se connecter. </para> <para> Les connexions sont partagées, à l'intérieur @@ -28,72 +32,97 @@ même si vous avez créé de multiples connexions. </para> <para> + Les connexions sont partagées au niveau de la page, lorsque vous utilisez + <function>ocilogon</function>. Cela signifie que les validations et annulations + s'appliquent à toutes les transactions de la page, même si vous avez + créé de multiples connexions à un même serveur Oracle. + </para> + <para> Cet exemple montre comment les connexions sont partagées : <example> - <title>ociLogon</title> + <title>Exemple avec <function>ocilogon</function></title> <programlisting role="php"> -<?php -print "<HTML><PRE>"; +<![CDATA[ +<?php +print "<HTML><PRE>"; $db = ""; + $c1 = ocilogon("scott","tiger",$db); $c2 = ocilogon("scott","tiger",$db); + function create_table($conn) -{ $stmt = ociparse($conn,"create table scott.hallo (test -varchar2(64))"); +{ $stmt = ociparse($conn,"create table scott.hallo (test varchar2(64))"); ociexecute($stmt); - echo $conn." created table\n\n"; + echo $conn." a créé une table\n\n"; } + function drop_table($conn) { $stmt = ociparse($conn,"drop table scott.hallo"); ociexecute($stmt); - echo $conn." dropped table\n\n"; + echo $conn." a effacé une 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"; +{ $stmt = ociparse($conn,"insert into scott.hallo + values('$conn' || ' ' || to_char(sysdate,'DD-MON-YY HH24:MI:SS'))"); + ociexecute($stmt,OCI_DEFAULT); + echo $conn." a inséré dans hallo\n\n"; } + function delete_data($conn) { $stmt = ociparse($conn,"delete from scott.hallo"); - ociexecute($stmt,oci_DEFAULT); - echo $conn." deleted hallo\n\n"; + ociexecute($stmt,OCI_DEFAULT); + echo $conn." a effacé dans hallo\n\n"; } + function commit($conn) { ocicommit($conn); - echo $conn." commited\n\n"; + echo $conn." validé\n\n"; } + function rollback($conn) { ocirollback($conn); - echo $conn." rollback\n\n"; + echo $conn." annulé\n\n"; } + function select_data($conn) { $stmt = ociparse($conn,"select * from scott.hallo"); - ociexecute($stmt,oci_DEFAULT); - echo $conn."----selecting\n\n"; + ociexecute($stmt,OCI_DEFAULT); + echo $conn."----selection\n\n"; while (ocifetch($stmt)) - echo $conn." <".ociresult($stmt,"TEST").">\n\n"; - echo $conn."----done\n\n"; + echo $conn." <".ociresult($stmt,"TEST").">\n\n"; + echo $conn."----fin\n\n"; } + create_table($c1); -insert_data($c1); // Insertion d'une ligne avec c1 -insert_data($c2); // Insertion d'une ligne avec c2 -select_data($c1); // Les résultats des deux insertions sont retournés -select_data($c2); -rollback($c1); // Annulation avec c1 -select_data($c1); // Les résultats des deux insertions sont annulés -select_data($c2); -insert_data($c2); // Insertion d'une ligne avec c2 -commit($c2); // Validation avec using c2 -select_data($c1); // Le résultat de c2 est retourné +insert_data($c1); // Insertion avec c1 +insert_data($c2); // Insertion avec c2 + +select_data($c1); // Resultats des insertions +select_data($c2); + +rollback($c1); // Annulation sur c1 + +select_data($c1); // Les deux insertions ont été annulées +select_data($c2); + +insert_data($c2); // Insertion avec c2 +commit($c2); // Validation avec c2 + +select_data($c1); // Le résultat de l'insertion via c2 + delete_data($c1); // Effacement de toutes les lignes avec c1 -select_data($c1); // Aucune ligne n'est retournée -select_data($c2); // Aucune ligne n'est retournée +select_data($c1); // Aucune ligne lue +select_data($c2); // Aucune ligne lue commit($c1); // Validation avec c1 -select_data($c1); // Aucune ligne n'est retournée -select_data($c2); // Aucune ligne n'est retournée + +select_data($c1); // Aucune ligne lue +select_data($c2); // Aucune ligne lue + drop_table($c1); -print "</PRE></HTML>"; -?> +print "</PRE></HTML>"; +?> +]]> </programlisting> </example> </para> Index: phpdoc-fr/reference/oci8/functions/ocinewcollection.xml diff -u phpdoc-fr/reference/oci8/functions/ocinewcollection.xml:1.1 phpdoc-fr/reference/oci8/functions/ocinewcollection.xml:1.2 --- phpdoc-fr/reference/oci8/functions/ocinewcollection.xml:1.1 Sun Apr 14 20:35:25 2002 +++ phpdoc-fr/reference/oci8/functions/ocinewcollection.xml Mon Feb 10 22:14:20 2003 @@ -3,19 +3,19 @@ <!-- last change to 'ocinewcollection' in en/ tree in rev 1.23 --> <refentry id="function.ocinewcollection"> <refnamediv> - <refname>OCINewCollection</refname> - <refpurpose>Bientôt documenté....</refpurpose> + <refname>ocinewcollection</refname> + <refpurpose>Initialise une nouvelle collection</refpurpose> </refnamediv> <refsect1> <title>Description</title> <methodsynopsis> - <type>string</type><methodname>ocinewcollection</methodname> + <type>bool</type><methodname>ocinewcollection</methodname> <methodparam><type>int</type><parameter>conn</parameter></methodparam> <methodparam><type>string</type><parameter>tdo</parameter></methodparam> <methodparam choice="opt"><type>string</type><parameter>shema</parameter></methodparam> </methodsynopsis> <simpara> - Bientôt documenté.... + &warn.undocumented.func; </simpara> </refsect1> </refentry> Index: phpdoc-fr/reference/oci8/functions/ocinewcursor.xml diff -u phpdoc-fr/reference/oci8/functions/ocinewcursor.xml:1.1 phpdoc-fr/reference/oci8/functions/ocinewcursor.xml:1.2 --- phpdoc-fr/reference/oci8/functions/ocinewcursor.xml:1.1 Sun Apr 14 20:35:26 2002 +++ phpdoc-fr/reference/oci8/functions/ocinewcursor.xml Mon Feb 10 22:14:20 2003 @@ -3,7 +3,7 @@ <!-- last change to 'ocinewcursor' in en/ tree in rev 1.2 --> <refentry id="function.ocinewcursor"> <refnamediv> - <refname>ociNewCursor</refname> + <refname>ocinewcursor</refname> <refpurpose> Retourne un nouveau pointeur à utiliser pour lier les pointeurs de références @@ -12,7 +12,7 @@ <refsect1> <title>Description</title> <methodsynopsis> - <type>int</type><methodname>ocinewcursor</methodname> + <type>resource</type><methodname>ocinewcursor</methodname> <methodparam><type>resource</type><parameter>conn</parameter></methodparam> </methodsynopsis> <para> @@ -22,25 +22,31 @@ <para> <example> <title> - Utiliser un REF CURSOR issue d'une procédure enregistrée. + Utiliser un REF CURSOR issue d'une procédure enregistrée </title> <programlisting role="php"> -<?php -// supposons que votre procédure stoquée info.output retourne un pointeur -// de curseur dans : data -$conn = ociLogon("scott","tiger"); -$curs = ociNewCursor($conn); -$stmt = ociparse($conn,"begin info.output(:data); end;"); -ocibindbyname($stmt,"data",&$curs,-1,oci_B_CURSOR); +<![CDATA[ +<?php +// supposons que votre procédure stockée info.output retourne un curseur de référence dans :data + +$conn = OCILogon("scott","tiger"); +$curs = OCINewCursor($conn); +$stmt = OCIParse($conn,"begin info.output(:data); end;"); + +ocibindbyname($stmt,"data",&$curs,-1,OCI_B_CURSOR); ociexecute($stmt); ociexecute($curs); -while (ociFetchInto($curs,&$data)) { + +while (OCIFetchInto($curs,&$data)) { var_dump($data); } -ociFreeStatement($curs); -ociFreeCursor($stmt); -ociLogoff($conn); -?> + +OCIFreeStatement($stmt); +OCIFreeCursor($curs); +OCILogoff($conn); +?> +]]> + </programlisting> </example> </para> @@ -48,37 +54,41 @@ <example> <title>Utiliser un REF CURSOR issue d'une commande SELECT</title> <programlisting role="php"> -<?php -print "<HTML><BODY>"; -$conn = ociLogon("scott","tiger"); +<![CDATA[ +<?php +print "<HTML><BODY>"; +$conn = OCILogon("scott","tiger"); $count_cursor = "CURSOR(select count(empno) num_emps from emp " . "where emp.deptno = dept.deptno) as EMPCNT from dept"; -$stmt = ociparse($conn,"select deptno,dname,$count_cursor"); +$stmt = OCIParse($conn,"select deptno,dname,$count_cursor"); + ociexecute($stmt); -print "<TABLE BORDER=\"1\">"; -print "<TR>"; -print "<TH>DEPT NAME</TH>"; -print "<TH>DEPT #</TH>"; -print "<TH># EMPLOYEES</TH>"; -print "</TR>"; -while (ociFetchInto($stmt,&$data,oci_ASSOC)) { - print "<TR>"; +print "<TABLE BORDER=\"1\">"; +print "<TR>"; +print "<TH>DEPT NAME</TH>"; +print "<TH>DEPT #</TH>"; +print "<TH># EMPLOYEES</TH>"; +print "</TR>"; + +while (OCIFetchInto($stmt,&$data,OCI_ASSOC)) { + print "<TR>"; $dname = $data["DNAME"]; $deptno = $data["DEPTNO"]; - print "<TD>$dname</TD>"; - print "<TD>$deptno</TD>"; - ociexecute($data[ "EMPCNT" ]); - while (ociFetchInto($data[ "EMPCNT" ],&$subdata,oci_ASSOC)) { + print "<TD>$dname</TD>"; + print "<TD>$deptno</TD>"; + ociexecute($data["EMPCNT"]); + while (OCIFetchInto($data["EMPCNT"],&$subdata,OCI_ASSOC)) { $num_emps = $subdata["NUM_EMPS"]; - print "<TD>$num_emps</TD>"; + print "<TD>$num_emps</TD>"; } - print "</TR>"; + print "</TR>"; } -print "</TABLE>"; -print "</BODY></HTML>"; -ociFreeStatement($stmt); -ociLogoff($conn); -?> +print "</TABLE>"; +print "</BODY></HTML>"; +OCIFreeStatement($stmt); +OCILogoff($conn); +?> +]]> </programlisting> </example> </para> Index: phpdoc-fr/reference/oci8/functions/ocinewdescriptor.xml diff -u phpdoc-fr/reference/oci8/functions/ocinewdescriptor.xml:1.1 phpdoc-fr/reference/oci8/functions/ocinewdescriptor.xml:1.2 --- phpdoc-fr/reference/oci8/functions/ocinewdescriptor.xml:1.1 Sun Apr 14 20:35:26 2002 +++ phpdoc-fr/reference/oci8/functions/ocinewdescriptor.xml Mon Feb 10 22:14:20 2003 @@ -3,91 +3,106 @@ <!-- last change to 'ocinewdescriptor' in en/ tree in rev 1.2 --> <refentry id="function.ocinewdescriptor"> <refnamediv> - <refname>ociNewDescriptor</refname> + <refname>ocinewdescriptor</refname> <refpurpose>Initialise un nouveau pointeur vide de LOB/FILE</refpurpose> </refnamediv> <refsect1> <title>Description</title> <methodsynopsis> - <type>resource</type><methodname>ocinewdescriptor</methodname> - <methodparam><type>resource</type><parameter>connection</parameter></methodparam> + <type>string</type><methodname>ocinewdescriptor</methodname> + <methodparam><type>int</type><parameter>connection</parameter></methodparam> <methodparam choice="opt"><type>int</type><parameter>type</parameter></methodparam> </methodsynopsis> <para> <function>ocinewdescriptor</function> alloue l'espace nécessaire pour stocker un descripteur, ou un pointeur de LOB. Les valeurs acceptées pour type sont - oci_D_FILE, oci_D_LOB et oci_D_ROWID. + OCI_D_FILE, OCI_D_LOB et OCI_D_ROWID. + Pour les pointeurs de LOB, les méthodes load, save, et savefile sont + associées avec le pointeur. Pour les pointeurs de type BFILE, + seule la méthode load existe. Voyez le second exemple pour une + illustration. </para> <example> <title>ocinewdescriptor</title> <programlisting role="php"> -<?php +<![CDATA[ +<?php /* Ce script est fait pour être appelé dans un formulaire HTML * Il attends les variables $user, $password, $table, $where, et $commitsize * Le script efface alors les lignes sélectionnées avec ROWID et valide * l'effacement après chaque groupe de $commitsize lignes. * (Utilisez avec prudence, car il n'y a pas d'annulation possible). */ - $conn = ociLogon($user, $password); - $stmt = ociparse($conn,"select rowid from $table $where"); - $rowid = ociNewDescriptor($conn,oci_D_ROWID); - ociDefineByName($stmt,"ROWID",&$rowid); - ociexecute($stmt); - while ( ociFetch($stmt) ) { - $nrows = ociRowCount($stmt); - $delete = ociparse($conn,"delete from $table where ROWID = :rid"); - ociBindByName($delete,":rid",&$rowid,-1,oci_B_ROWID); - ociexecute($delete); + $conn = OCILogon($user, $password); + $stmt = OCIParse($conn,"select rowid from $table $where"); + $rowid = OCINewDescriptor($conn,OCI_D_ROWID); + OCIDefineByName($stmt,"ROWID",&$rowid); + OCIExecute($stmt); + while ( OCIFetch($stmt) ) { + $nrows = OCIRowCount($stmt); + $delete = OCIParse($conn,"delete from $table where ROWID = :rid"); + OCIBindByName($delete,":rid",&$rowid,-1,OCI_B_ROWID); + OCIExecute($delete); print "$nrows\n"; if ( ($nrows % $commitsize) == 0 ) { - ociCommit($conn); - } + OCICommit($conn); + } } - $nrows = ociRowCount($stmt); - print "$nrows effacées...\n"; - ociFreeStatement($stmt); - ociLogoff($conn); -?> + $nrows = OCIRowCount($stmt); + print "$nrows deleted...\n"; + OCIFreeStatement($stmt); + OCILogoff($conn); +?> +]]> </programlisting> <programlisting role="php"> -<?php +<![CDATA[ +<?php /* Ce script est fait pour être appelé depuis un formulaire HTML. * Il attends les variables $user, $password, $table, $where, et $commitsize, * données par le formulaire. Le script efface * les lignes sélectionnées avec ROWID est valide les transactions * à chaque jeu de $commitsize lignes. (Attention : il n'y plus d'annulation) */ if(!isset($lob_upload) || $lob_upload == 'none'){ -?> -<form action="upload.php3" method="post" enctype="multipart/form-data"> -Upload file: <input type="file" name="lob_upload"><br> -<input type="submit" value="Upload"> - <input type="reset"> -</form> -<?php +?> +<form action="upload.php" method="post" enctype="multipart/form-data"> +Fichier à télécharger : <input type="file" name="lob_upload"><br> +<input type="submit" value="Envoyer"> - <input type="reset"> +</form> +<?php } else { + // $lob_upload contains the temporary filename of the uploaded file - $conn = ociLogon($user, $password); - $lob = ociNewDescriptor($conn, oci_D_LOB); - $stmt = ociparse($conn,"insert into $table (id, the_blob) values(my_seq.NEXTVAL, EMPTY_BLOB()) returning the_blob into :the_blob"); - ociBindByName($stmt, ':the_blob', &$lob, -1, oci_B_BLOB); - ociexecute($stmt, oci_DEFAULT); + + // see also the features section on file upload, + // if you would like to use secure uploads + + $conn = OCILogon($user, $password); + $lob = OCINewDescriptor($conn, OCI_D_LOB); + $stmt = OCIParse($conn,"insert into $table (id, the_blob) + values(my_seq.NEXTVAL, EMPTY_BLOB()) returning the_blob into :the_blob"); + OCIBindByName($stmt, ':the_blob', &$lob, -1, OCI_B_BLOB); + OCIExecute($stmt, OCI_DEFAULT); if($lob->savefile($lob_upload)){ - ociCommit($conn); - echo "Blob sauvé!\n"; + OCICommit($conn); + echo "Blob successfully uploaded\n"; }else{ - echo "Impossible de sauver le Blob\n"; + echo "Couldn't upload Blob\n"; } - ociFreeDescriptor($lob); - ociFreeStatement($stmt); - ociLogoff($conn); + OCIFreeDesc($lob); + OCIFreeStatement($stmt); + OCILogoff($conn); } -?> +?> +]]> </programlisting> </example> <example> <title>Exemple avec <function>ocinewdescriptor</function></title> <programlisting> -<?php +<![CDATA[ +<?php /* Appel d'une procédure PL/SQL stockée qui prend un clobs * en entrée (PHP 4 >= 4.0.6). * Exemple de signateure de procédure stockée PL/SQL : @@ -111,7 +126,8 @@ $clob->close(); $clob->free(); OCIFreeStatement($stmt); -?> +?> +]]> </programlisting> </example> </refsect1> Index: phpdoc-fr/reference/oci8/functions/ocinlogon.xml diff -u phpdoc-fr/reference/oci8/functions/ocinlogon.xml:1.1 phpdoc-fr/reference/oci8/functions/ocinlogon.xml:1.2 --- phpdoc-fr/reference/oci8/functions/ocinlogon.xml:1.1 Sun Apr 14 20:35:26 2002 +++ phpdoc-fr/reference/oci8/functions/ocinlogon.xml Mon Feb 10 22:14:20 2003 @@ -3,24 +3,28 @@ <!-- last change to 'ocinlogon' in en/ tree in rev 1.15 --> <refentry id="function.ocinlogon"> <refnamediv> - <refname>ociNLogon</refname> + <refname>ocinlogon</refname> <refpurpose> - Se connecte à un serveur Oracle avec une nouvelle connexion. + Etablit une nouvelle correction avec un serveur Oracle </refpurpose> </refnamediv> <refsect1> <title>Description</title> <methodsynopsis> - <type>resource</type><methodname>ocinlogon</methodname> + <type>int</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> crée une nouvelle connexion à - un serveur Oracle et s'authentifie. Si l'option ORACLE_SID n'est pas - spécifié, PHP utilisera la variable d'environnement - ORACLE_SID pour déterminer le serveur de connexion. + un serveur Oracle et s'identifie. Le paramètre + optionnel <parameter>db</parameter> peut contenir le nom local + du serveur Oracle, ou bien son nom dans la table d'entrées + tnsnames.ora à laquelle vous voulez vous connecter. Si le troisième + paramètre n'est pas spécifié, &php; utilisera la variable d'environnement + <varname>ORACLE_SID</varname> (instance Oracle) ou <varname>TWO_TASK</varname> + (tnsnames.ora) pour déterminer la base à laquelle se connecter. </para> <para> <function>ocinlogon</function> force le serveur à @@ -38,69 +42,89 @@ L'exemple ci-dessous montre l'utilisation des connexions séparées. <example> - <title>ociNLogon</title> + <title>Exemple avec <function>ocinlogon</function></title> <programlisting role="php"> -<?php -print "<HTML><PRE>"; +<![CDATA[ +<?php +print "<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))"); +{ $stmt = ociparse($conn,"create table scott.hallo (test varchar2(64))"); ociexecute($stmt); - echo $conn." created table\n\n"; + echo $conn." a créé une table\n\n"; } + function drop_table($conn) { $stmt = ociparse($conn,"drop table scott.hallo"); ociexecute($stmt); - echo $conn." dropped table\n\n"; + echo $conn." a effacé une 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"; +{ $stmt = ociparse($conn,"insert into scott.hallo + values('$conn' || ' ' || to_char(sysdate,'DD-MON-YY HH24:MI:SS'))"); + ociexecute($stmt,OCI_DEFAULT); + echo $conn." a inséré dans hallo\n\n"; } + function delete_data($conn) { $stmt = ociparse($conn,"delete from scott.hallo"); - ociexecute($stmt,oci_DEFAULT); - echo $conn." deleted hallo\n\n"; + ociexecute($stmt,OCI_DEFAULT); + echo $conn." a effacé dans hallo\n\n"; } + function commit($conn) { ocicommit($conn); - echo $conn." commited\n\n"; + echo $conn." validé\n\n"; } + function rollback($conn) { ocirollback($conn); - echo $conn." rollback\n\n"; + echo $conn." annulé\n\n"; } + function select_data($conn) { $stmt = ociparse($conn,"select * from scott.hallo"); - ociexecute($stmt,oci_DEFAULT); - echo $conn."----selecting\n\n"; + ociexecute($stmt,OCI_DEFAULT); + echo $conn."----selection\n\n"; while (ocifetch($stmt)) - echo $conn." <".ociresult($stmt,"TEST").">\n\n"; - echo $conn."----done\n\n"; + echo $conn." <".ociresult($stmt,"TEST").">\n\n"; + echo $conn."----fin\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); -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); -print "</PRE></HTML>"; -?> +print "</PRE></HTML>"; +?> +]]> </programlisting> </example> </para> Index: phpdoc-fr/reference/oci8/functions/ocinumcols.xml diff -u phpdoc-fr/reference/oci8/functions/ocinumcols.xml:1.1 phpdoc-fr/reference/oci8/functions/ocinumcols.xml:1.2 --- phpdoc-fr/reference/oci8/functions/ocinumcols.xml:1.1 Sun Apr 14 20:35:27 2002 +++ phpdoc-fr/reference/oci8/functions/ocinumcols.xml Mon Feb 10 22:14:20 2003 @@ -3,7 +3,7 @@ <!-- last change to 'ocinumcols' in en/ tree in rev 1.2 --> <refentry id="function.ocinumcols"> <refnamediv> - <refname>ociNumCols</refname> + <refname>ocinumcols</refname> <refpurpose>Retourne le nombre de colonnes dans un résultat</refpurpose> </refnamediv> <refsect1> @@ -14,31 +14,33 @@ </methodsynopsis> <para> <function>ocinumcols</function> retourne le nombre de colonnes - dans un résultat. + dans le résultat <parameter>stmt</parameter>. </para> <example> - <title>ociNumCols</title> + <title>Exemple avec <function>ocinumcols</function></title> <programlisting role="php"> -<?php - print "<HTML><PRE>\n"; - $conn = ociLogon("scott", "tiger"); - $stmt = ociparse($conn,"select * from emp"); - ociexecute($stmt); - while ( ociFetch($stmt) ) { - print "\n"; - $ncols = ociNumCols($stmt); - for ( $i = 1; $i <= $ncols; $i++ ) { - $column_name = ociColumnName($stmt,$i); - $column_value = ociResult($stmt,$i); +<![CDATA[ +<?php + print "<HTML><PRE>\n"; + $conn = OCILogon("scott", "tiger"); + $stmt = OCIParse($conn,"select * from emp"); + OCIExecute($stmt); + while ( OCIFetch($stmt) ) { + print "\n"; + $ncols = OCINumCols($stmt); + for ( $i = 1; $i <= $ncols; $i++ ) { + $column_name = OCIColumnName($stmt,$i); + $column_value = OCIResult($stmt,$i); print $column_name . ': ' . $column_value . "\n"; } print "\n"; } - ociFreeStatement($stmt); - ociLogoff($conn); - print "</PRE>"; - print "</HTML>\n"; -?> + OCIFreeStatement($stmt); + OCILogoff($conn); + print "</PRE>"; + print "</HTML>\n"; +?> +]]> </programlisting> </example> </refsect1> Index: phpdoc-fr/reference/oci8/functions/ociparse.xml diff -u phpdoc-fr/reference/oci8/functions/ociparse.xml:1.2 phpdoc-fr/reference/oci8/functions/ociparse.xml:1.3 --- phpdoc-fr/reference/oci8/functions/ociparse.xml:1.2 Tue Aug 13 22:19:33 2002 +++ phpdoc-fr/reference/oci8/functions/ociparse.xml Mon Feb 10 22:14:20 2003 @@ -4,20 +4,20 @@ <refentry id="function.ociparse"> <refnamediv> <refname>ociparse</refname> - <refpurpose>Analyse une requête.</refpurpose> + <refpurpose>Analyse une requête SQL avec Oracle</refpurpose> </refnamediv> <refsect1> <title>Description</title> <methodsynopsis> <type>int</type><methodname>ociparse</methodname> - <methodparam><type>resource</type><parameter>conn</parameter></methodparam> + <methodparam><type>int</type><parameter>conn</parameter></methodparam> <methodparam><type>string</type><parameter>query</parameter></methodparam> </methodsynopsis> <simpara> <function>ociparse</function> analyse la requête <parameter>query</parameter> sur la connexion <parameter>conn</parameter>, et retourne &true; si la requête - <parameter>query</parameter> est valide, et <literal>FALSE</literal>, si + <parameter>query</parameter> est valide, et &false;, si ce n'est pas le cas. <parameter>query</parameter> peut être n'importe quelle requête SQL. </simpara> Index: phpdoc-fr/reference/oci8/functions/ociplogon.xml diff -u phpdoc-fr/reference/oci8/functions/ociplogon.xml:1.1 phpdoc-fr/reference/oci8/functions/ociplogon.xml:1.2 --- phpdoc-fr/reference/oci8/functions/ociplogon.xml:1.1 Sun Apr 14 20:35:27 2002 +++ phpdoc-fr/reference/oci8/functions/ociplogon.xml Mon Feb 10 22:14:20 2003 @@ -3,30 +3,34 @@ <!-- last change to 'ociplogon' in en/ tree in rev 1.15 --> <refentry id="function.ociplogon"> <refnamediv> - <refname>ociPLogon</refname> - <refpurpose>Connection persistante à un serveur Oracle.</refpurpose> + <refname>ociplogon</refname> + <refpurpose>Ouvre une connexion persistante à un serveur Oracle</refpurpose> </refnamediv> <refsect1> <title>Description</title> <methodsynopsis> - <type>resource</type><methodname>ociplogon</methodname> + <type>int</type><methodname>ociplogon</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>ociplogon</function> crée une connexion persistante - à un serveur Oracle 8 et s'authentifie. Si l'option ORACLE_SID - n'est pas spécifiée, PHP utilisera la variable - d'environnement ORACLE_SID pour déterminer le serveur de - connexion. + à un serveur Oracle 8 et s'authentifie. Le paramètre + optionnel <parameter>db</parameter> peut contenir le nom local + du serveur Oracle, ou bien son nom dans la table d'entrées + tnsnames.ora à laquelle vous voulez vous connecter. Si le troisième + paramètre n'est pas spécifié, &php; utilisera la variable d'environnement + <varname>ORACLE_SID</varname> (instance Oracle) ou <varname>TWO_TASK</varname> + (tnsnames.ora) pour déterminer la base à laquelle se connecter. </para> <simpara> Voir aussi <function>ocilogon</function> et <function>ocinlogon</function>. </simpara> - </refsect1></refentry> + </refsect1> + </refentry> <!-- Keep this comment at the end of the file Local variables: Index: phpdoc-fr/reference/oci8/functions/ociresult.xml diff -u phpdoc-fr/reference/oci8/functions/ociresult.xml:1.1 phpdoc-fr/reference/oci8/functions/ociresult.xml:1.2 --- phpdoc-fr/reference/oci8/functions/ociresult.xml:1.1 Sun Apr 14 20:35:27 2002 +++ phpdoc-fr/reference/oci8/functions/ociresult.xml Mon Feb 10 22:14:20 2003 @@ -3,14 +3,14 @@ <!-- last change to 'ociresult' in en/ tree in rev 1.2 --> <refentry id="function.ociresult"> <refnamediv> - <refname>ociResult</refname> - <refpurpose>Retourne la valeur d'une colonne</refpurpose> + <refname>ociresult</refname> + <refpurpose>Retourne la valeur d'une colonne dans un résultat Oracle</refpurpose> </refnamediv> <refsect1> <title>Description</title> <methodsynopsis> <type>mixed</type><methodname>ociresult</methodname> - <methodparam><type>resource</type><parameter>statement</parameter></methodparam> + <methodparam><type>int</type><parameter>statement</parameter></methodparam> <methodparam><type>mixed</type><parameter>column</parameter></methodparam> </methodsynopsis> <para> Index: phpdoc-fr/reference/oci8/functions/ocirollback.xml diff -u phpdoc-fr/reference/oci8/functions/ocirollback.xml:1.1 phpdoc-fr/reference/oci8/functions/ocirollback.xml:1.2 --- phpdoc-fr/reference/oci8/functions/ocirollback.xml:1.1 Sun Apr 14 20:35:27 2002 +++ phpdoc-fr/reference/oci8/functions/ocirollback.xml Mon Feb 10 22:14:20 2003 @@ -3,19 +3,24 @@ <!-- last change to 'ocirollback' in en/ tree in rev 1.2 --> <refentry id="function.ocirollback"> <refnamediv> - <refname>ociRollback</refname> - <refpurpose>Annule les transactions en cours.</refpurpose> + <refname>ocirollback</refname> + <refpurpose>Annule les transactions Oracle en cours</refpurpose> </refnamediv> <refsect1> <title>Description</title> <methodsynopsis> - <type>int</type><methodname>ocirollback</methodname> + <type>bool</type><methodname>ocirollback</methodname> <methodparam><type>resource</type><parameter>connection</parameter></methodparam> </methodsynopsis> <para> <function>ocirollback</function> annule les transactions en cours sur la connexion Oracle <parameter>connection</parameter>. + &return.success; </para> + <simpara> + Voir aussi + <function>ocicommit</function>. + </simpara> </refsect1> </refentry> Index: phpdoc-fr/reference/oci8/functions/ocirowcount.xml diff -u phpdoc-fr/reference/oci8/functions/ocirowcount.xml:1.1 phpdoc-fr/reference/oci8/functions/ocirowcount.xml:1.2 --- phpdoc-fr/reference/oci8/functions/ocirowcount.xml:1.1 Sun Apr 14 20:35:29 2002 +++ phpdoc-fr/reference/oci8/functions/ocirowcount.xml Mon Feb 10 22:14:20 2003 @@ -3,8 +3,8 @@ <!-- last change to 'ocirowcount' in en/ tree in rev 1.2 --> <refentry id="function.ocirowcount"> <refnamediv> - <refname>ociRowCount</refname> - <refpurpose>Retourne le nombre de lignes affectées.</refpurpose> + <refname>ocirowcount</refname> + <refpurpose>Retourne le nombre de lignes affectées</refpurpose> </refnamediv> <refsect1> <title>Description</title> @@ -14,32 +14,34 @@ </methodsynopsis> <para> <function>ocirowcount</function> retourne le nombre de lignes - affectées par une commande de modification. Cette fonction - ne vous indiquera pas le nombre de lignes retournées par + affectées par la commande de modification (UPDATE) <parameter>statement</parameter>. + Cette fonction ne vous indiquera pas le nombre de lignes retournées par un SELECT : il faut que les lignes aient été modifiées. </para> <para> <example> - <title>ociRowCount</title> + <title>Exemple avec <function>ocirowcount</function></title> <programlisting role="php"> -<?php - print "<HTML><PRE>"; - $conn = ociLogon("scott","tiger"); - $stmt = ociparse($conn,"create table emp2 as select * from emp"); - ociexecute($stmt); - print ociRowCount($stmt) . " rows inserted.<br>"; - ociFreeStatement($stmt); - $stmt = ociparse($conn,"delete from emp2"); - ociexecute($stmt); - print ociRowCount($stmt) . " rows deleted.<br>"; - ociCommit($conn); - ociFreeStatement($stmt); - $stmt = ociparse($conn,"drop table emp2"); - ociexecute($stmt); - ociFreeStatement($stmt); - ociLogOff($conn); - print "</PRE></HTML>"; -?> +<![CDATA[ +<?php + print "<HTML><PRE>"; + $conn = OCILogon("scott","tiger"); + $stmt = OCIParse($conn,"create table emp2 as select * from emp"); + OCIExecute($stmt); + print OCIRowCount($stmt) . " rows inserted.<BR>"; + OCIFreeStatement($stmt); + $stmt = OCIParse($conn,"delete from emp2"); + OCIExecute($stmt); + print OCIRowCount($stmt) . " rows deleted.<BR>"; + OCICommit($conn); + OCIFreeStatement($stmt); + $stmt = OCIParse($conn,"drop table emp2"); + OCIExecute($stmt); + OCIFreeStatement($stmt); + OCILogOff($conn); + print "</PRE></HTML>"; +?> +]]> </programlisting> </example> </para> Index: phpdoc-fr/reference/oci8/functions/ocisavelob.xml diff -u phpdoc-fr/reference/oci8/functions/ocisavelob.xml:1.1 phpdoc-fr/reference/oci8/functions/ocisavelob.xml:1.2 --- phpdoc-fr/reference/oci8/functions/ocisavelob.xml:1.1 Sun Apr 14 20:35:29 2002 +++ phpdoc-fr/reference/oci8/functions/ocisavelob.xml Mon Feb 10 22:14:20 2003 @@ -3,17 +3,17 @@ <!-- last change to 'ocisavelob' in en/ tree in rev 1.23 --> <refentry id="function.ocisavelob"> <refnamediv> - <refname>OCISaveLob</refname> - <refpurpose>Bientôt documenté....</refpurpose> + <refname>ocisavelob</refname> + <refpurpose>Sauve un LOB</refpurpose> </refnamediv> <refsect1> <title>Description</title> <methodsynopsis> - <type>string</type><methodname>ocisavelob</methodname> + <type>bool</type><methodname>ocisavelob</methodname> <methodparam><type>object</type><parameter>lob</parameter></methodparam> </methodsynopsis> <simpara> - Bientôt documenté.... + &warn.undocumented.func; </simpara> </refsect1> </refentry> Index: phpdoc-fr/reference/oci8/functions/ocisavelobfile.xml diff -u phpdoc-fr/reference/oci8/functions/ocisavelobfile.xml:1.1 phpdoc-fr/reference/oci8/functions/ocisavelobfile.xml:1.2 --- phpdoc-fr/reference/oci8/functions/ocisavelobfile.xml:1.1 Sun Apr 14 20:35:30 2002 +++ phpdoc-fr/reference/oci8/functions/ocisavelobfile.xml Mon Feb 10 22:14:20 2003 @@ -3,17 +3,17 @@ <!-- last change to 'ocisavelobfile' in en/ tree in rev 1.23 --> <refentry id="function.ocisavelobfile"> <refnamediv> - <refname>OCISaveLobFile</refname> - <refpurpose>Bientôt documenté....</refpurpose> + <refname>ocisavelobfile</refname> + <refpurpose>Sauve un LOB fichier</refpurpose> </refnamediv> <refsect1> <title>Description</title> <methodsynopsis> - <type>string</type><methodname>ocisavelobfile</methodname> + <type>bool</type><methodname>ocisavelobfile</methodname> <methodparam><type>object</type><parameter>lob</parameter></methodparam> </methodsynopsis> <simpara> - Bientôt documenté.... + &warn.undocumented.func; </simpara> </refsect1> </refentry> Index: phpdoc-fr/reference/oci8/functions/ociserverversion.xml diff -u phpdoc-fr/reference/oci8/functions/ociserverversion.xml:1.1 phpdoc-fr/reference/oci8/functions/ociserverversion.xml:1.2 --- phpdoc-fr/reference/oci8/functions/ociserverversion.xml:1.1 Sun Apr 14 20:35:30 2002 +++ phpdoc-fr/reference/oci8/functions/ociserverversion.xml Mon Feb 10 22:14:20 2003 @@ -3,9 +3,9 @@ <!-- last change to 'ociserverversion' in en/ tree in rev 1.2 --> <refentry id="function.ociserverversion"> <refnamediv> - <refname>ociServerVersion</refname> + <refname>ociserverversion</refname> <refpurpose> - Retourne une chaîne contenant les informations de version du serveur. + Retourne une chaîne contenant les informations de version du serveur Oracle </refpurpose> </refnamediv> <refsect1> @@ -16,15 +16,18 @@ </methodsynopsis> <para> <function>ociserverversion</function> retourne une chaîne contenant les - informations de version du serveur + informations de version du serveur Oracle, identifié par la connexion + <parameter>conn</parameter>. <example> <title>Exemple avec <function>ociserverversion</function></title> <programlisting role="php"> -<?php - $conn = ociLogon("scott","tiger"); - print "Version du serveur : " . ociServerVersion($conn); - ociLogOff($conn); -?> +<![CDATA[ +<?php + $conn = OCILogon("scott","tiger"); + print "Version du serveur Oracle : " . OCIServerVersion($conn); + OCILogOff($conn); +?> +]]> </programlisting> </example> </para> Index: phpdoc-fr/reference/oci8/functions/ocisetprefetch.xml diff -u phpdoc-fr/reference/oci8/functions/ocisetprefetch.xml:1.1 phpdoc-fr/reference/oci8/functions/ocisetprefetch.xml:1.2 --- phpdoc-fr/reference/oci8/functions/ocisetprefetch.xml:1.1 Sun Apr 14 20:35:30 2002 +++ phpdoc-fr/reference/oci8/functions/ocisetprefetch.xml Mon Feb 10 22:14:20 2003 @@ -14,8 +14,10 @@ <methodparam><type>int</type><parameter>rows</parameter></methodparam> </methodsynopsis> <simpara> - <function>ocisetprefetch</function> indique le nombre des premières lignes - qui doivent être pré-lues. La valeur par défaut est de 1. + <function>ocisetprefetch</function> spécifie le nombre des premières lignes + qui doivent être pré-lues à <parameter>rows</parameter> pour la + connexion Oracle <parameter>stmt</parameter>. La valeur par défaut + de <parameter>rows</parameter> est 1 ligne. </simpara> </refsect1> </refentry> Index: phpdoc-fr/reference/oci8/functions/ocistatementtype.xml diff -u phpdoc-fr/reference/oci8/functions/ocistatementtype.xml:1.1 phpdoc-fr/reference/oci8/functions/ocistatementtype.xml:1.2 --- phpdoc-fr/reference/oci8/functions/ocistatementtype.xml:1.1 Sun Apr 14 20:35:30 2002 +++ phpdoc-fr/reference/oci8/functions/ocistatementtype.xml Mon Feb 10 22:14:20 2003 @@ -3,8 +3,8 @@ <!-- last change to 'ocistatementtype' in en/ tree in rev 1.2 --> <refentry id="function.ocistatementtype"> <refnamediv> - <refname>ociStatementType</refname> - <refpurpose>Retourne le type de commande OCI.</refpurpose> + <refname>ocistatementtype</refname> + <refpurpose>Retourne le type de commande OCI</refpurpose> </refnamediv> <refsect1> <title>Description</title> @@ -15,33 +15,37 @@ <para> <function>ocistatementtype</function> retourne une des valeurs suivantes : <orderedlist> - <listitem><simpara>"SELECT"</simpara></listitem> - <listitem><simpara>"UPDATE"</simpara></listitem> - <listitem><simpara>"DELETE"</simpara></listitem> - <listitem><simpara>"INSERT"</simpara></listitem> - <listitem><simpara>"CREATE"</simpara></listitem> - <listitem><simpara>"DROP"</simpara></listitem> - <listitem><simpara>"ALTER"</simpara></listitem> - <listitem><simpara>"BEGIN"</simpara></listitem> - <listitem><simpara>"DECLARE"</simpara></listitem> - <listitem><simpara>"UNKNOWN"</simpara></listitem> + <listitem><simpara><literal>SELECT</literal></simpara></listitem> + <listitem><simpara><literal>UPDATE</literal></simpara></listitem> + <listitem><simpara><literal>DELETE</literal></simpara></listitem> + <listitem><simpara><literal>INSERT</literal></simpara></listitem> + <listitem><simpara><literal>CREATE</literal></simpara></listitem> + <listitem><simpara><literal>DROP</literal></simpara></listitem> + <listitem><simpara><literal>ALTER</literal></simpara></listitem> + <listitem><simpara><literal>BEGIN</literal></simpara></listitem> + <listitem><simpara><literal>DECLARE</literal></simpara></listitem> + <listitem><simpara><literal>UNKNOWN</literal></simpara></listitem> </orderedlist> </para> <para> <example> - <title>Exemples</title> + <title>Exemple avec <function>ocistatementtype</function></title> <programlisting role="php"> -<?php - print "<HTML><PRE>"; - $conn = ociLogon("scott","tiger"); +<![CDATA[ +<?php + print "<HTML><PRE>"; + $conn = OCILogon("scott","tiger"); $sql = "delete from emp where deptno = 10"; - $stmt = ociparse($conn,$sql); - if ( ociStatementType($stmt) == "DELETE" ) { - die "Vous n'etes pas autorisé à effacer dans cette table.<BR>"; + + $stmt = OCIParse($conn,$sql); + if ( OCIStatementType($stmt) == "DELETE" ) { + die "Nous n'êtes pas autorisés à effacer des lignes dans cette table<BR>"; } - ociLogoff($conn); - print "</PRE></HTML>"; -?> + + OCILogoff($conn); + print "</PRE></HTML>"; +?> +]]> </programlisting> </example> </para> Index: phpdoc-fr/reference/oci8/functions/ociwritelobtofile.xml diff -u phpdoc-fr/reference/oci8/functions/ociwritelobtofile.xml:1.1 phpdoc-fr/reference/oci8/functions/ociwritelobtofile.xml:1.2 --- phpdoc-fr/reference/oci8/functions/ociwritelobtofile.xml:1.1 Sun Apr 14 20:35:30 2002 +++ phpdoc-fr/reference/oci8/functions/ociwritelobtofile.xml Mon Feb 10 22:14:20 2003 @@ -3,20 +3,20 @@ <!-- last change to 'ociwritelobtofile' in en/ tree in rev 1.23 --> <refentry id="function.ociwritelobtofile"> <refnamediv> - <refname>OCIWriteLobToFile</refname> - <refpurpose>Bientôt documenté....</refpurpose> + <refname>ociwritelobtofile</refname> + <refpurpose>Ecrit un LOB dans un fichier</refpurpose> </refnamediv> <refsect1> <title>Description</title> <methodsynopsis> - <type>void</type><methodname>ociwritelobtofile</methodname> + <type>bool</type><methodname>ociwritelobtofile</methodname> <methodparam><type>object</type><parameter>lob</parameter></methodparam> <methodparam choice="opt"><type>string</type><parameter>filename</parameter></methodparam> <methodparam choice="opt"><type>int</type><parameter>start</parameter></methodparam> <methodparam choice="opt"><type>int</type><parameter>lenght</parameter></methodparam> </methodsynopsis> <simpara> - Bientôt documenté.... + &warn.undocumented.func; </simpara> </refsect1> </refentry>
Index: phpdoc-fr/reference/oci8/reference.xml diff -u phpdoc-fr/reference/oci8/reference.xml:1.2 phpdoc-fr/reference/oci8/reference.xml:1.3 --- phpdoc-fr/reference/oci8/reference.xml:1.2 Mon Apr 15 20:54:37 2002 +++ phpdoc-fr/reference/oci8/reference.xml Mon Feb 10 22:14:20 2003 @@ -1,10 +1,12 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.2 $ --> +<!-- $Revision: 1.3 $ --> <reference id="ref.oci8"> <title>Oracle 8</title> <titleabbrev>oci8</titleabbrev> <partintro> - <para> + <section id="oci8.intro"> + &reftitle.intro; + <para> Ces fonctions vous permettront d'accéder aux serveurs Oracle8 et Oracle7. Elles utilisent l'interface Oracle8 Call-Interface (oci8). Vous aurez donc besoin des librairies clientes Oracle8 pour pouvoir @@ -17,6 +19,10 @@ complètement les types LOB, FILE et ROWID et vous permet d'utiliser des variables de définitions personnalisables. </para> + </section> + + <section id="oci8.requirements"> + &reftitle.required; <para> Avant d'utiliser cette extension, assurez-vous que vous avez bien paramétré vos variables d'environnement Oracle, ainsi que votre @@ -64,57 +70,97 @@ Si votre serveur web ne démarre pas, ou crashe au démarrage </title> <para> - Vérifiez que Apache a bien été compilé avec la librairie pthread : + Vérifiez que Apache a bien été compilé + avec la librairie pthread : </para> <para> - <informalexample> + <example> + <title>Configuration Apache avec pthread</title> <programlisting> -# ldd /www/apache/bin/httpd +<![CDATA[ +# ldd /www/apache/bin/httpd libpthread.so.0 => /lib/libpthread.so.0 (0x4001c000) libm.so.6 => /lib/libm.so.6 (0x4002f000) libcrypt.so.1 => /lib/libcrypt.so.1 (0x4004c000) libdl.so.2 => /lib/libdl.so.2 (0x4007a000) libc.so.6 => /lib/libc.so.6 (0x4007e000) /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000) +]]> </programlisting> - </informalexample> + </example> </para> <para> Si la libpthread n'est pas listée, vous devez réinstaller Apache : </para> <para> - <informalexample> + <example> + <title>Reinstaller Apache avec pthread</title> <programlisting> +<![CDATA[ # cd /usr/src/apache_1.3.xx # make clean # LIBS=-lpthread ./config.status # make # make install +]]> </programlisting> - </informalexample> + </example> </para> </note> <para> + Notez bien que sur certains systèmes comme UnixWare il faut utiliser + libthread au lieu de libpthread. PHP et Apache doivent alors être configurés + avec EXTRA_LIBS=-lthread. + </para> + </section> + + &reference.oci8.configure; + + <section id="oci8.configuration"> + &reftitle.runtime; + &no.config; + </section> + + <section id="oci8.resources"> + &reftitle.resources; + <para> + </para> + </section> + + &reference.oci8.constants; + + <section id="oci8.examples"> + &reftitle.examples; + <para> <example> - <title>Aide oci</title> + <title>Exemple avec OCI8</title> <programlisting role="php"> -<?php +<![CDATA[ +<?php // par sergo@bacup.ru -// Utilisez l'option : oci_DEFAULT pour éxécuter les commandes avec un délai -ociExecute($stmt, oci_DEFAULT); -// pour lire les données après lecture, utilisez : -$result = ociResult($stmt, $n); + +// Utilisez l'option: OCI_DEFAULT pour exécuter la commande avec exécution +// retardée. +OCIExecute($stmt, OCI_DEFAULT); + +// pour lire les données, après un fetch : + +$result = OCIResult($stmt, $n); if (is_object ($result)) $result = $result->load(); -// Pour les commandes INSERT ou UPDATE utilisez: + +// Pour les commandes INSERT et UPDATE utilisez : + $sql = "insert into table (field1, field2) values (field1 = 'value', field2 = empty_clob()) returning field2 into :field2"; -ociparse($conn, $sql); -$clob = ociNewDescriptor($conn, oci_D_LOB); -ociBindByName ($stmt, ":field2", &$clob, -1, oci_B_CLOB); -ociexecute($stmt, oci_DEFAULT); -$clob->save ("Du texte"); -ocicommit($conn); -?> +OCIParse($conn, $sql); +$clob = OCINewDescriptor($conn, OCI_D_LOB); +OCIBindByName ($stmt, ":field2", &$clob, -1, OCI_B_CLOB); +OCIExecute($stmt, OCI_DEFAULT); +$clob->save ("some text"); +OCICommit($conn); + +?> +]]> </programlisting> </example> </para> @@ -124,21 +170,28 @@ <example> <title>Utilisation de procédures stockées</title> <programlisting role="php"> -<?php +<![CDATA[ +<?php // par webmaster@remoterealty.com -$sth = ociparse ( $dbh, "begin sp_newaddress( :address_id, '$firstname', +$sth = OCIParse ( $dbh, "begin sp_newaddress( :address_id, '$firstname', '$lastname', '$company', '$address1', '$address2', '$city', '$state', '$postalcode', '$country', :error_code );end;" ); -// Ce script appelle la procédure stockée sp_newaddress, avec address_id qui est -// une variable entrante/sortante et :error_code une variable sortante. -// Lorsque vous les liez : - ociBindByName ( $sth, ":address_id", $addr_id, 10 ); - ociBindByName ( $sth, ":error_code", $errorcode, 10 ); - ociExecute ( $sth ); -?> + +// Cela appelle la procédure stockée sp_newaddress, avec la variable :address_id +// pour les entrées/sorties et :error_code comme variable de sortie. +// Ensuite, vous faites les liaisons suivantes : + + OCIBindByName ( $sth, ":address_id", $addr_id, 10 ); + OCIBindByName ( $sth, ":error_code", $errorcode, 10 ); + OCIExecute ( $sth ); + +?> +]]> </programlisting> </example> </para> + </section> + </partintro> &reference.oci8.functions; Index: phpdoc-fr/reference/oci8/functions/ocibindbyname.xml diff -u phpdoc-fr/reference/oci8/functions/ocibindbyname.xml:1.1 phpdoc-fr/reference/oci8/functions/ocibindbyname.xml:1.2 --- phpdoc-fr/reference/oci8/functions/ocibindbyname.xml:1.1 Sun Apr 14 20:35:14 2002 +++ phpdoc-fr/reference/oci8/functions/ocibindbyname.xml Mon Feb 10 22:14:20 2003 @@ -5,14 +5,14 @@ <refnamediv> <refname>ociBindByName</refname> <refpurpose> - Utilise une variable PHP pour la phase de définition, dans un SELECT. + Lie une variable PHP avec une requête SQL </refpurpose> </refnamediv> <refsect1> <title>Description</title> <methodsynopsis> - <type>int</type><methodname>ocibindbyname</methodname> - <methodparam><type>resource</type><parameter>stmt</parameter></methodparam> + <type>bool</type><methodname>OCIBindByName</methodname> + <methodparam><type>int</type><parameter>stmt</parameter></methodparam> <methodparam><type>string</type><parameter>ph_name</parameter></methodparam> <methodparam><type>mixed &</type><parameter>variable</parameter></methodparam> <methodparam><type>int</type><parameter>length</parameter></methodparam> @@ -38,52 +38,81 @@ devrait être fixée à -1. La variable <parameter>type</parameter> indique au serveur Oracle, quel type de pointeur va être utilisé. Les valeurs possibles sont : - oci_B_FILE (Fichier binaires), oci_B_CFILE (Fichier texte), - oci_B_CLOB (LOB- texte), oci_B_BLOB (LOB binaire) - et oci_B_ROWID (ROWID). + <constant>OCI_B_FILE</constant> (Fichiers binaires), + <constant>OCI_B_CFILE</constant> (Fichiers texte), + <constant>OCI_B_CLOB</constant> (LOB de texte), + <constant>OCI_B_BLOB</constant> (LOB binaire) et + <constant>OCI_B_ROWID</constant> (ROWID). </para> <example> - <title>ociDefineByName</title> + <title>Exemple avec <function>ocibindbyname</function></title> <programlisting role="php"> -<?php +<![CDATA[ +<?php /* Exemple ociBindByPos par thies@thieso.net (980221) Insère 3 lignes dans emp, et utilise ROWID pour mettre à jour les lignes, juste après l'insertion. */ -$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); + +$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); -} + 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)) { + +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); -/* Effacement des lignes inutiles dans la table emp .... */ -$stmt = ociparse($conn,"delete from emp where empno in (1111,2222,3333)"); -ociexecute($stmt); -ociFreeStatement($stmt); -ociLogoff($conn); -?> +OCIFreeStatement($stmt); + +/* Effacement des lignes inutiles dans la table emp */ +$stmt = OCIParse($conn,"delete from emp where empno in (1111,2222,3333)"); +OCIExecute($stmt); +OCIFreeStatement($stmt); + +OCILogoff($conn); +?> +]]> </programlisting> </example> + <warning> + <para> + C'est une mauvaise idée que d'utiliser les magic quotes et la fonction + <function>ocibindbyname</function> simultanément, car aucun ajout de + guillemets n'est nécessaire sur les variables citées, et tout + guillemets magiques sera inscrit dans votre base de données car + <function>ocibindbyname</function> n'est pas capable de faire la + différence entre les guillemets et ceux qui ont été ajoutés + dynamiquement. + </para> + </warning> + </refsect1> </refentry> Index: phpdoc-fr/reference/oci8/functions/ocicancel.xml diff -u phpdoc-fr/reference/oci8/functions/ocicancel.xml:1.1 phpdoc-fr/reference/oci8/functions/ocicancel.xml:1.2 --- phpdoc-fr/reference/oci8/functions/ocicancel.xml:1.1 Sun Apr 14 20:35:15 2002 +++ phpdoc-fr/reference/oci8/functions/ocicancel.xml Mon Feb 10 22:14:20 2003 @@ -3,14 +3,14 @@ <!-- last change to 'ocicancel' in en/ tree in rev 1.28 --> <refentry id="function.ocicancel"> <refnamediv> - <refname>OCICancel</refname> - <refpurpose>Bientôt documenté....</refpurpose> + <refname>ocicancel</refname> + <refpurpose>Libère les ressouces</refpurpose> </refnamediv> <refsect1> <title>Description</title> <methodsynopsis> - <type>int</type><methodname>ocicancel</methodname> - <methodparam><type>resource</type><parameter>stmt</parameter></methodparam> + <type>bool</type><methodname>ocicancel</methodname> + <methodparam><type>int</type><parameter>stmt</parameter></methodparam> </methodsynopsis> <simpara> <function>ocicancel</function> détruit les ressources liées Index: phpdoc-fr/reference/oci8/functions/ocicollassign.xml diff -u phpdoc-fr/reference/oci8/functions/ocicollassign.xml:1.1 phpdoc-fr/reference/oci8/functions/ocicollassign.xml:1.2 --- phpdoc-fr/reference/oci8/functions/ocicollassign.xml:1.1 Sun Apr 14 20:35:15 2002 +++ phpdoc-fr/reference/oci8/functions/ocicollassign.xml Mon Feb 10 22:14:20 2003 @@ -3,19 +3,19 @@ <!-- last change to 'ocicollassign' in en/ tree in rev 1.39 --> <refentry id="function.ocicollassign"> <refnamediv> - <refname>OCICollAssign</refname> - <refpurpose>Bientôt documenté....</refpurpose> + <refname>ocicollassign</refname> + <refpurpose>Assigne une collection depuis une autre collection</refpurpose> </refnamediv> <refsect1> <title>Description</title> <methodsynopsis> - <type>string</type><methodname>ocicollassign</methodname> + <type>bool</type><methodname>ocicollassign</methodname> <methodparam><type>object</type><parameter>collection</parameter></methodparam> <methodparam><type>object</type><parameter>object</parameter></methodparam> </methodsynopsis> - <simpara> - Bientôt documenté.... - </simpara> + <para> + &warn.undocumented.func; + </para> </refsect1> </refentry> Index: phpdoc-fr/reference/oci8/functions/ocicollassignelem.xml diff -u phpdoc-fr/reference/oci8/functions/ocicollassignelem.xml:1.1 phpdoc-fr/reference/oci8/functions/ocicollassignelem.xml:1.2 --- phpdoc-fr/reference/oci8/functions/ocicollassignelem.xml:1.1 Sun Apr 14 20:35:17 2002 +++ phpdoc-fr/reference/oci8/functions/ocicollassignelem.xml Mon Feb 10 22:14:20 2003 @@ -3,19 +3,19 @@ <!-- last change to 'ocicollassignelem' in en/ tree in rev 1.23 --> <refentry id="function.ocicollassignelem"> <refnamediv> - <refname>OCICollAssignElem</refname> - <refpurpose>Bientôt documenté....</refpurpose> + <refname>ocicollassignelem</refname> + <refpurpose>Assigne l'élément val à une collection, à l'index ndx</refpurpose> </refnamediv> <refsect1> <title>Description</title> <methodsynopsis> - <type>string</type><methodname>ocicollassignelem</methodname> + <type>bool</type><methodname>ocicollassignelem</methodname> <methodparam><type>object</type><parameter>collection</parameter></methodparam> <methodparam><type>string</type><parameter>ndx</parameter></methodparam> <methodparam><type>string</type><parameter>val</parameter></methodparam> </methodsynopsis> <simpara> - Bientôt documenté.... + &warn.undocumented.func; </simpara> </refsect1> </refentry> Index: phpdoc-fr/reference/oci8/functions/ocicollgetelem.xml diff -u phpdoc-fr/reference/oci8/functions/ocicollgetelem.xml:1.1 phpdoc-fr/reference/oci8/functions/ocicollgetelem.xml:1.2 --- phpdoc-fr/reference/oci8/functions/ocicollgetelem.xml:1.1 Sun Apr 14 20:35:18 2002 +++ phpdoc-fr/reference/oci8/functions/ocicollgetelem.xml Mon Feb 10 22:14:20 2003 @@ -3,8 +3,8 @@ <!-- last change to 'ocicollgetelem' in en/ tree in rev 1.23 --> <refentry id="function.ocicollgetelem"> <refnamediv> - <refname>OCICollGetElem</refname> - <refpurpose>Bientôt documenté....</refpurpose> + <refname>ocicollgetelem</refname> + <refpurpose>Lit la valeur d'un élément d'une collection à l'index ndx</refpurpose> </refnamediv> <refsect1> <title>Description</title> @@ -13,9 +13,9 @@ <methodparam><type>object</type><parameter>collection</parameter></methodparam> <methodparam><type>string</type><parameter>ndx</parameter></methodparam> </methodsynopsis> - <simpara> - Bientôt documenté.... - </simpara> + <para> + &warn.undocumented.func; + </para> </refsect1> </refentry> Index: phpdoc-fr/reference/oci8/functions/ocicollmax.xml diff -u phpdoc-fr/reference/oci8/functions/ocicollmax.xml:1.1 phpdoc-fr/reference/oci8/functions/ocicollmax.xml:1.2 --- phpdoc-fr/reference/oci8/functions/ocicollmax.xml:1.1 Sun Apr 14 20:35:18 2002 +++ phpdoc-fr/reference/oci8/functions/ocicollmax.xml Mon Feb 10 22:14:20 2003 @@ -3,17 +3,20 @@ <!-- last change to 'ocicollmax' in en/ tree in rev 1.23 --> <refentry id="function.ocicollmax"> <refnamediv> - <refname>OCICollMax</refname> - <refpurpose>Bientôt documenté....</refpurpose> + <refname>ocicollmax</refname> + <refpurpose>Retourne la plus grande valeur d'une collection</refpurpose> </refnamediv> <refsect1> <title>Description</title> <methodsynopsis> - <type>string</type><methodname>ocicollmax</methodname> + <type>int</type><methodname>ocicollmax</methodname> <methodparam><type>object</type><parameter>collection</parameter></methodparam> </methodsynopsis> <simpara> - Bientôt documenté.... + &warn.undocumented.func; + </simpara> + <simpara> + Pour un varray, c'est la taille maximale du tableau. </simpara> </refsect1> </refentry> Index: phpdoc-fr/reference/oci8/functions/ocicollsize.xml diff -u phpdoc-fr/reference/oci8/functions/ocicollsize.xml:1.1 phpdoc-fr/reference/oci8/functions/ocicollsize.xml:1.2 --- phpdoc-fr/reference/oci8/functions/ocicollsize.xml:1.1 Sun Apr 14 20:35:18 2002 +++ phpdoc-fr/reference/oci8/functions/ocicollsize.xml Mon Feb 10 22:14:20 2003 @@ -3,17 +3,17 @@ <!-- last change to 'ocicollsize' in en/ tree in rev 1.23 --> <refentry id="function.ocicollsize"> <refnamediv> - <refname>OCICollSize</refname> - <refpurpose>Bientôt documenté....</refpurpose> + <refname>ocicollsize</refname> + <refpurpose>Retourne la taille d'une collection</refpurpose> </refnamediv> <refsect1> <title>Description</title> <methodsynopsis> - <type>string</type><methodname>ocicollsize</methodname> + <type>int</type><methodname>ocicollsize</methodname> <methodparam><type>object</type><parameter>collection</parameter></methodparam> </methodsynopsis> <simpara> - Bientôt documenté.... + &warn.undocumented.func; </simpara> </refsect1> </refentry> Index: phpdoc-fr/reference/oci8/functions/ocicolltrim.xml diff -u phpdoc-fr/reference/oci8/functions/ocicolltrim.xml:1.1 phpdoc-fr/reference/oci8/functions/ocicolltrim.xml:1.2 --- phpdoc-fr/reference/oci8/functions/ocicolltrim.xml:1.1 Sun Apr 14 20:35:18 2002 +++ phpdoc-fr/reference/oci8/functions/ocicolltrim.xml Mon Feb 10 22:14:20 2003 @@ -3,18 +3,18 @@ <!-- last change to 'ocicolltrim' in en/ tree in rev 1.23 --> <refentry id="function.ocicolltrim"> <refnamediv> - <refname>OCICollTrim</refname> - <refpurpose>Bientôt documenté....</refpurpose> + <refname>ocicolltrim</refname> + <refpurpose>Supprime num éléments à la fin de la collection</refpurpose> </refnamediv> <refsect1> <title>Description</title> <methodsynopsis> - <type>string</type><methodname>ocicolltrim</methodname> + <type>bool</type><methodname>ocicolltrim</methodname> <methodparam><type>object</type><parameter>collection</parameter></methodparam> <methodparam><type>int</type><parameter>num</parameter></methodparam> </methodsynopsis> <simpara> - Bientôt documenté.... + &warn.undocumented.func; </simpara> </refsect1> </refentry> Index: phpdoc-fr/reference/oci8/functions/ocicolumnisnull.xml diff -u phpdoc-fr/reference/oci8/functions/ocicolumnisnull.xml:1.2 phpdoc-fr/reference/oci8/functions/ocicolumnisnull.xml:1.3 --- phpdoc-fr/reference/oci8/functions/ocicolumnisnull.xml:1.2 Tue Aug 13 22:19:33 2002 +++ phpdoc-fr/reference/oci8/functions/ocicolumnisnull.xml Mon Feb 10 22:14:20 2003 @@ -3,23 +3,23 @@ <!-- last change to 'ocicolumnisnull' in en/ tree in rev 1.2 --> <refentry id="function.ocicolumnisnull"> <refnamediv> - <refname>ociColumnIsNULL</refname> - <refpurpose>Teste si la valeur d'une colonne est NULL.</refpurpose> + <refname>ocicolumnisnull</refname> + <refpurpose>Teste si la valeur d'une colonne est NULL</refpurpose> </refnamediv> <refsect1> <title>Description</title> <methodsynopsis> - <type>int</type><methodname>ocicolumnisnull</methodname> + <type>bool</type><methodname>ocicolumnisnull</methodname> <methodparam><type>resource</type><parameter>stmt</parameter></methodparam> <methodparam><type>mixed</type><parameter>column</parameter></methodparam> </methodsynopsis> <para> <function>ocicolumnisnull</function> retourne &true; si la colonne - <parameter>col</parameter> du résultat + <parameter>column</parameter> du résultat <parameter>stmt</parameter> est NULL. Vous pouvez utiliser le numéro de colonne (l'indexation des colonnes commence à 1) ou le nom de la colonne, pour le - paramètre <parameter>col</parameter>. + paramètre <parameter>column</parameter>. </para> </refsect1> </refentry> Index: phpdoc-fr/reference/oci8/functions/ocicolumnname.xml diff -u phpdoc-fr/reference/oci8/functions/ocicolumnname.xml:1.1 phpdoc-fr/reference/oci8/functions/ocicolumnname.xml:1.2 --- phpdoc-fr/reference/oci8/functions/ocicolumnname.xml:1.1 Sun Apr 14 20:35:19 2002 +++ phpdoc-fr/reference/oci8/functions/ocicolumnname.xml Mon Feb 10 22:14:20 2003 @@ -3,51 +3,55 @@ <!-- last change to 'ocicolumnname' in en/ tree in rev 1.15 --> <refentry id="function.ocicolumnname"> <refnamediv> - <refname>ociColumnName</refname> - <refpurpose>Retourne le nom d'une colonne.</refpurpose> + <refname>ocicolumname</refname> + <refpurpose>Retourne le nom d'une colonne</refpurpose> </refnamediv> <refsect1> <title>Description</title> <methodsynopsis> <type>string</type><methodname>ocicolumnname</methodname> - <methodparam><type>resource</type><parameter>stmt</parameter></methodparam> + <methodparam><type>int</type><parameter>stmt</parameter></methodparam> <methodparam><type>int</type><parameter>col</parameter></methodparam> </methodsynopsis> <simpara> <function>ocicolumnname</function> retourne le nom de la colonne - numéro <parameter>col</parameter> (en commençant à 1). + numéro <parameter>col</parameter> (l'indéxation des + colonnes commence à 1). </simpara> <para> <example> - <title>ociColumnName</title> + <title>Exemple avec <function>ocicolumnname</function></title> <programlisting role="php"> -<?php - print "<HTML><PRE>\n"; - $conn = ociLogon("scott", "tiger"); - $stmt = ociparse($conn,"select * from emp"); - ociexecute($stmt); - print "<TABLE BORDER=\"1\">"; - print "<TR>"; - print "<TH>Name</TH>"; - print "<TH>Type</TH>"; - print "<TH>Length</TH>"; - print "</TR>"; - $ncols = ociNumCols($stmt); - for ( $i = 1; $i <= $ncols; $i++ ) { - $column_name = ociColumnName($stmt,$i); - $column_type = ociColumnType($stmt,$i); - $column_size = ociColumnSize($stmt,$i); - print "<TR>"; - print "<TD>$column_name</TD>"; - print "<TD>$column_type</TD>"; - print "<TD>$column_size</TD>"; - print "</TR>"; +<![CDATA[ +<?php + print "<HTML><PRE>\n"; + $conn = OCILogon("scott", "tiger"); + $stmt = OCIParse($conn,"select * from emp"); + OCIExecute($stmt); + print "<TABLE BORDER=\"1\">"; + print "<TR>"; + print "<TH>Nom</TH>"; + print "<TH>Type</TH>"; + print "<TH>Taille</TH>"; + print "</TR>"; + $ncols = OCINumCols($stmt); + for ( $i = 1; $i <= $ncols; $i++ ) { + $column_name = OCIColumnName($stmt,$i); + $column_type = OCIColumnType($stmt,$i); + $column_size = OCIColumnSize($stmt,$i); + print "<TR>"; + print "<TD>$column_name</TD>"; + print "<TD>$column_type</TD>"; + print "<TD>$column_size</TD>"; + print "</TR>"; } - ociFreeStatement($stmt); - ociLogoff($conn); - print "</PRE>"; - print "</HTML>\n"; -?> + print "</TABLE>\n"; + OCIFreeStatement($stmt); + OCILogoff($conn); + print "</PRE>"; + print "</HTML>\n"; +?> +]]> </programlisting> </example> </para> Index: phpdoc-fr/reference/oci8/functions/ocicolumnprecision.xml diff -u phpdoc-fr/reference/oci8/functions/ocicolumnprecision.xml:1.1 phpdoc-fr/reference/oci8/functions/ocicolumnprecision.xml:1.2 --- phpdoc-fr/reference/oci8/functions/ocicolumnprecision.xml:1.1 Sun Apr 14 20:35:20 2002 +++ phpdoc-fr/reference/oci8/functions/ocicolumnprecision.xml Mon Feb 10 22:14:20 2003 @@ -3,18 +3,18 @@ <!-- last change to 'ocicolumnprecision' in en/ tree in rev 1.23 --> <refentry id="function.ocicolumnprecision"> <refnamediv> - <refname>OCIColumnPrecision</refname> - <refpurpose>Bientôt documenté....</refpurpose> + <refname>ocicolumnprecision</refname> + <refpurpose>Lit la précision de la colonne</refpurpose> </refnamediv> <refsect1> <title>Description</title> <methodsynopsis> <type>int</type><methodname>ocicolumnprecision</methodname> - <methodparam><type>resource</type><parameter>stmt</parameter></methodparam> + <methodparam><type>int</type><parameter>stmt</parameter></methodparam> <methodparam><type>int</type><parameter>col</parameter></methodparam> </methodsynopsis> <simpara> - Bientôt documenté.... + &warn.undocumented.func; </simpara> </refsect1> </refentry> Index: phpdoc-fr/reference/oci8/functions/ocicolumnscale.xml diff -u phpdoc-fr/reference/oci8/functions/ocicolumnscale.xml:1.1 phpdoc-fr/reference/oci8/functions/ocicolumnscale.xml:1.2 --- phpdoc-fr/reference/oci8/functions/ocicolumnscale.xml:1.1 Sun Apr 14 20:35:21 2002 +++ phpdoc-fr/reference/oci8/functions/ocicolumnscale.xml Mon Feb 10 22:14:20 2003 @@ -3,18 +3,18 @@ <!-- last change to 'ocicolumnscale' in en/ tree in rev 1.23 --> <refentry id="function.ocicolumnscale"> <refnamediv> - <refname>OCIColumnScale</refname> - <refpurpose>Bientôt documenté....</refpurpose> + <refname>ocicolumnscale</refname> + <refpurpose>Lit la taille d'une colonne</refpurpose> </refnamediv> <refsect1> <title>Description</title> <methodsynopsis> <type>int</type><methodname>ocicolumnscale</methodname> - <methodparam><type>resource</type><parameter>stmt</parameter></methodparam> + <methodparam><type>int</type><parameter>stmt</parameter></methodparam> <methodparam><type>int</type><parameter>col</parameter></methodparam> </methodsynopsis> <simpara> - Bientôt documenté.... + &warn.undocumented.func; </simpara> </refsect1> </refentry> Index: phpdoc-fr/reference/oci8/functions/ocicolumnsize.xml diff -u phpdoc-fr/reference/oci8/functions/ocicolumnsize.xml:1.1 phpdoc-fr/reference/oci8/functions/ocicolumnsize.xml:1.2 --- phpdoc-fr/reference/oci8/functions/ocicolumnsize.xml:1.1 Sun Apr 14 20:35:21 2002 +++ phpdoc-fr/reference/oci8/functions/ocicolumnsize.xml Mon Feb 10 22:14:20 2003 @@ -3,54 +3,56 @@ <!-- last change to 'ocicolumnsize' in en/ tree in rev 1.15 --> <refentry id="function.ocicolumnsize"> <refnamediv> - <refname>ociColumnSize</refname> - <refpurpose>Retourne la taille de la colonne.</refpurpose> + <refname>ocicolumnsize</refname> + <refpurpose>Retourne la taille de la colonne</refpurpose> </refnamediv> <refsect1> <title>Description</title> <methodsynopsis> <type>int</type><methodname>ocicolumnsize</methodname> - <methodparam><type>resource</type><parameter>stmt</parameter></methodparam> + <methodparam><type>int</type><parameter>stmt</parameter></methodparam> <methodparam><type>mixed</type><parameter>column</parameter></methodparam> </methodsynopsis> <para> <function>ocicolumnsize</function> retourne la taille de la colonne. Vous pouvez utiliser l'index de colonne (l'indexation commence à 1) ou le nom de la colonne dans le paramètre - <parameter>col</parameter>. + <parameter>column</parameter>. </para> <para> <example> - <title>ociColumnSize</title> + <title>Exemple avec <function>ocicolumnsize</function></title> <programlisting role="php"> -<?php - print "<HTML><PRE>\n"; - $conn = ociLogon("scott", "tiger"); - $stmt = ociparse($conn,"select * from emp"); - ociexecute($stmt); - print "<TABLE BORDER=\"1\">"; - print "<TR>"; - print "<TH>Name</TH>"; - print "<TH>Type</TH>"; - print "<TH>Length</TH>"; - print "</TR>"; - $ncols = ociNumCols($stmt); - for ( $i = 1; $i <= $ncols; $i++ ) { - $column_name = ociColumnName($stmt,$i); - $column_type = ociColumnType($stmt,$i); - $column_size = ociColumnSize($stmt,$i); - print "<TR>"; - print "<TD>$column_name</TD>"; - print "<TD>$column_type</TD>"; - print "<TD>$column_size</TD>"; - print "</TR>"; +<![CDATA[ +<?php + print "<HTML><PRE>\n"; + $conn = OCILogon("scott", "tiger"); + $stmt = OCIParse($conn,"select * from emp"); + OCIExecute($stmt); + print "<TABLE BORDER=\"1\">"; + print "<TR>"; + print "<TH>Name</TH>"; + print "<TH>Type</TH>"; + print "<TH>Length</TH>"; + print "</TR>"; + $ncols = OCINumCols($stmt); + for ( $i = 1; $i <= $ncols; $i++ ) { + $column_name = OCIColumnName($stmt,$i); + $column_type = OCIColumnType($stmt,$i); + $column_size = OCIColumnSize($stmt,$i); + print "<TR>"; + print "<TD>$column_name</TD>"; + print "<TD>$column_type</TD>"; + print "<TD>$column_size</TD>"; + print "</TR>"; } - print "</TABLE>"; - ociFreeStatement($stmt); - ociLogoff($conn); - print "</PRE>"; - print "</HTML>\n"; -?> + print "</TABLE>"; + OCIFreeStatement($stmt); + OCILogoff($conn); + print "</PRE>"; + print "</HTML>\n"; +?> +]]> </programlisting> </example> </para> Index: phpdoc-fr/reference/oci8/functions/ocicolumntype.xml diff -u phpdoc-fr/reference/oci8/functions/ocicolumntype.xml:1.1 phpdoc-fr/reference/oci8/functions/ocicolumntype.xml:1.2 --- phpdoc-fr/reference/oci8/functions/ocicolumntype.xml:1.1 Sun Apr 14 20:35:21 2002 +++ phpdoc-fr/reference/oci8/functions/ocicolumntype.xml Mon Feb 10 22:14:20 2003 @@ -3,15 +3,15 @@ <!-- last change to 'ocicolumntype' in en/ tree in rev 1.2 --> <refentry id="function.ocicolumntype"> <refnamediv> - <refname>ociColumnType</refname> - <refpurpose>Retourne le type de données d'une colonne.</refpurpose> + <refname>ocicolumntype</refname> + <refpurpose>Retourne le type de données d'une colonne</refpurpose> </refnamediv> <refsect1> <title>Description</title> <methodsynopsis> - <type>mixed</type><methodname>ocicolumntype</methodname> - <methodparam><type>resource</type><parameter>stmt</parameter></methodparam> - <methodparam><type>int</type><parameter>col</parameter></methodparam> + <type>mixed</type><methodname>ocicolumntype</methodname> + <methodparam><type>int</type><parameter>stmt</parameter></methodparam> + <methodparam><type>int</type><parameter>col</parameter></methodparam> </methodsynopsis> <simpara> <function>ocicolumntype</function> retourne le type de données @@ -23,33 +23,36 @@ <example> <title>Exemple avec <function>ocicolumntype</function></title> <programlisting role="php"> -<?php - print "<HTML><PRE>\n"; - $conn = ociLogon("scott", "tiger"); - $stmt = ociparse($conn,"select * from emp"); - ociexecute($stmt); - print "<TABLE BORDER=\"1\">"; - print "<TR>"; - print "<TH>Name</TH>"; - print "<TH>Type</TH>"; - print "<TH>Length</TH>"; - print "</TR>"; - $ncols = ociNumCols($stmt); - for ( $i = 1; $i <= $ncols; $i++ ) { - $column_name = ociColumnName($stmt,$i); - $column_type = ociColumnType($stmt,$i); - $column_size = ociColumnSize($stmt,$i); - print "<TR>"; - print "<TD>$column_name</TD>"; - print "<TD>$column_type</TD>"; - print "<TD>$column_size</TD>"; - print "</TR>"; +<![CDATA[ +<?php + print "<HTML><PRE>\n"; + $conn = OCILogon("scott", "tiger"); + $stmt = OCIParse($conn,"select * from emp"); + OCIExecute($stmt); + print "<TABLE BORDER=\"1\">"; + print "<TR>"; + print "<TH>Nom</TH>"; + print "<TH>Type</TH>"; + print "<TH>Longueur</TH>"; + print "</TR>"; + $ncols = OCINumCols($stmt); + for ( $i = 1; $i <= $ncols; $i++ ) { + $column_name = OCIColumnName($stmt,$i); + $column_type = OCIColumnType($stmt,$i); + $column_size = OCIColumnSize($stmt,$i); + print "<TR>"; + print "<TD>$column_name</TD>"; + print "<TD>$column_type</TD>"; + print "<TD>$column_size</TD>"; + print "</TR>"; } - ociFreeStatement($stmt); - ociLogoff($conn); - print "</PRE>"; - print "</HTML>\n"; -?> + print "</TABLE>\n"; + OCIFreeStatement($stmt); + OCILogoff($conn); + print "</PRE>"; + print "</HTML>\n"; +?> +]]> </programlisting> </example> </para> Index: phpdoc-fr/reference/oci8/functions/ocicolumntyperaw.xml diff -u phpdoc-fr/reference/oci8/functions/ocicolumntyperaw.xml:1.1 phpdoc-fr/reference/oci8/functions/ocicolumntyperaw.xml:1.2 --- phpdoc-fr/reference/oci8/functions/ocicolumntyperaw.xml:1.1 Sun Apr 14 20:35:21 2002 +++ phpdoc-fr/reference/oci8/functions/ocicolumntyperaw.xml Mon Feb 10 22:14:20 2003 @@ -3,18 +3,18 @@ <!-- last change to 'ocicolumntyperaw' in en/ tree in rev 1.23 --> <refentry id="function.ocicolumntyperaw"> <refnamediv> - <refname>OCIColumnTypeRaw</refname> - <refpurpose>Bientôt documenté....</refpurpose> + <refname>ocicolumntyperaw</refname> + <refpurpose>Lit directement le type de colonne Oracle</refpurpose> </refnamediv> <refsect1> <title>Description</title> <methodsynopsis> <type>mixed</type><methodname>ocicolumntyperaw</methodname> - <methodparam><type>resource</type><parameter>stmt</parameter></methodparam> + <methodparam><type>int</type><parameter>stmt</parameter></methodparam> <methodparam><type>int</type><parameter>col</parameter></methodparam> </methodsynopsis> <simpara> - Bientôt documenté.... + &warn.undocumented.func; </simpara> </refsect1> </refentry> Index: phpdoc-fr/reference/oci8/functions/ocicommit.xml diff -u phpdoc-fr/reference/oci8/functions/ocicommit.xml:1.1 phpdoc-fr/reference/oci8/functions/ocicommit.xml:1.2 --- phpdoc-fr/reference/oci8/functions/ocicommit.xml:1.1 Sun Apr 14 20:35:21 2002 +++ phpdoc-fr/reference/oci8/functions/ocicommit.xml Mon Feb 10 22:14:20 2003 @@ -4,18 +4,56 @@ <refentry id="function.ocicommit"> <refnamediv> <refname>ociCommit</refname> - <refpurpose>Valide les transactions en cours.</refpurpose> + <refpurpose>Valide les transactions en cours</refpurpose> </refnamediv> <refsect1> <title>Description</title> <methodsynopsis> - <type>int</type><methodname>ocicommit</methodname> - <methodparam><type>resource</type><parameter>connection</parameter></methodparam> + <type>bool</type><methodname>OCICommit</methodname> + <methodparam><type>int</type><parameter>connection</parameter></methodparam> </methodsynopsis> <para> <function>ocicommit</function> valide toutes les transactions en cours sur la connexion Oracle <parameter>connection</parameter>. + &return.success; </para> + <para> + This example demonstrates how OCICommit is used. + <example> + <title>OCICommit</title> + <programlisting> +<![CDATA[ +<?php + // Connexion au serveur Oracle + $conn = OCILogon('scott', 'tiger'); + + // Analyse de la requête SQL + $stmt = OCIParse($conn, "INSERT INTO employees (name, surname) VALUES ('Maxim', 'Maletsky')"); + + // Exécution de la requête + OCIExecute($stmt); + + // Validation de la transaction + $committed = OCICommit($conn); + + // Vérification de la validation : si une erreur est survenue, afficher + // le message d'erreur + if(!$committed) { + $error = OCIError($conn); + echo 'Lavalidation a échoué. Oracle dit : ' . $error['message']; + } + + // Fermeture de la connexion + OCILogoff($conn); +?> +]]> + </programlisting> + </example> + </para> + <simpara> + Voir aussi + <function>ocirollback</function>. + </simpara> </refsect1> </refentry> Index: phpdoc-fr/reference/oci8/functions/ocidefinebyname.xml diff -u phpdoc-fr/reference/oci8/functions/ocidefinebyname.xml:1.1 phpdoc-fr/reference/oci8/functions/ocidefinebyname.xml:1.2 --- phpdoc-fr/reference/oci8/functions/ocidefinebyname.xml:1.1 Sun Apr 14 20:35:21 2002 +++ phpdoc-fr/reference/oci8/functions/ocidefinebyname.xml Mon Feb 10 22:14:20 2003 @@ -5,14 +5,14 @@ <refnamediv> <refname>ociDefineByName</refname> <refpurpose> - Utilise une variable PHP pour la phase de définition, dans une commande SELECT. + Utilise une variable PHP pour la phase de définition, dans une commande SELECT </refpurpose> </refnamediv> <refsect1> <title>Description</title> <methodsynopsis> - <type>int</type><methodname>ocidefinebyname</methodname> - <methodparam><type>resource</type><parameter>stmt</parameter></methodparam> + <type>bool</type><methodname>ocidefinebyname</methodname> + <methodparam><type>int</type><parameter>stmt</parameter></methodparam> <methodparam><type>string</type><parameter>Column-Name</parameter></methodparam> <methodparam><type>mixed</type><parameter>variable</parameter></methodparam> <methodparam choice="opt"><type>int</type><parameter>type</parameter></methodparam> @@ -34,23 +34,30 @@ Reportez-vous aussi à <function>ocibindbyname</function>. </para> <example> - <title>ociDefineByName</title> + <title>Exemple avec <function>ocidefinebyname</function></title> <programlisting role="php"> -<?php -/* Exemple ociDefineByPos par thies@thieso.net (980219) */ -$conn = ociLogon("scott","tiger"); -$stmt = ociparse($conn,"select empno, ename from emp"); -/* La définition DOIT être faîte AVANT ociexecute! */ -ociDefineByName($stmt,"EMPNO",&$empno); -ociDefineByName($stmt,"ENAME",&$ename); -ociexecute($stmt); -while (ociFetch($stmt)) { - echo "empno:".$empno."\n"; - echo "ename:".$ename."\n"; +<![CDATA[ +<?php +$conn = OCILogon("scott","tiger"); + +$stmt = OCIParse($conn,"select empno, ename from emp"); + +/* La définition DOIT intervenir AVANT l'exécution! */ + +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); -?> + +OCIFreeStatement($stmt); +OCILogoff($conn); +?> +]]> </programlisting> </example> </refsect1> Index: phpdoc-fr/reference/oci8/functions/ocierror.xml diff -u phpdoc-fr/reference/oci8/functions/ocierror.xml:1.1 phpdoc-fr/reference/oci8/functions/ocierror.xml:1.2 --- phpdoc-fr/reference/oci8/functions/ocierror.xml:1.1 Sun Apr 14 20:35:22 2002 +++ phpdoc-fr/reference/oci8/functions/ocierror.xml Mon Feb 10 22:14:20 2003 @@ -3,23 +3,26 @@ <!-- last change to 'ocierror' in en/ tree in rev 1.2 --> <refentry id="function.ocierror"> <refnamediv> - <refname>ociError</refname> + <refname>ocierror</refname> <refpurpose> - Retourne la dernière erreur de stmt|conn|global. + Retourne la dernière erreur de stmt|conn|global </refpurpose> </refnamediv> <refsect1> <title>Description</title> <methodsynopsis> - <type>array</type><methodname>ocierror</methodname> - <methodparam choice="opt"><type>int</type><parameter>stmt|conn</parameter></methodparam> + <type>array</type><methodname>OCIError</methodname> + <methodparam choice="opt"><type>int</type><parameter>stmt|conn|global</parameter></methodparam> </methodsynopsis> <simpara> <function>ocierror</function> retourne la dernière erreur trouvée. Si l'option <parameter>stmt|conn</parameter> n'est pas fournie, la dernière erreur rencontrée est retournée. Si aucune erreur n'est trouvée, <function>ocierror</function> retourne - <literal>FALSE</literal>. + &false;. <function>ocierror</function> retourne l'erreur sous la forme + d'un tableau associatif. Dans ce tableau, l'élément + <literal>code</literal> contient le numéro d'erreur Oracle + et <literal>message</literal> contient le message d'erreur. </simpara> </refsect1> </refentry> Index: phpdoc-fr/reference/oci8/functions/ociexecute.xml diff -u phpdoc-fr/reference/oci8/functions/ociexecute.xml:1.1 phpdoc-fr/reference/oci8/functions/ociexecute.xml:1.2 --- phpdoc-fr/reference/oci8/functions/ociexecute.xml:1.1 Sun Apr 14 20:35:22 2002 +++ phpdoc-fr/reference/oci8/functions/ociexecute.xml Mon Feb 10 22:14:20 2003 @@ -4,13 +4,13 @@ <refentry id="function.ociexecute"> <refnamediv> <refname>ociexecute</refname> - <refpurpose>Exécute une commande.</refpurpose> + <refpurpose>Exécute une commande</refpurpose> </refnamediv> <refsect1> <title>Description</title> <methodsynopsis> <type>int</type><methodname>ociexecute</methodname> - <methodparam><type>resource</type><parameter>statement</parameter></methodparam> + <methodparam><type>int</type><parameter>statement</parameter></methodparam> <methodparam choice="opt"><type>int</type><parameter>mode</parameter></methodparam> </methodsynopsis> <para> @@ -18,8 +18,11 @@ déjà préparée (voir <function>ociparse</function>). L'option <parameter>mode</parameter> vous permet de spécifier le mode d'exécution (par défaut, - il est à oci_COMMIT_ON_SUCCESS). Si vous ne voulez pas que la - commande soit automatiquement validée, utilisez le mode oci_DEFAULT. + il est à <constant>OCI_COMMIT_ON_SUCCESS</constant>). Si vous ne voulez pas que la + commande soit automatiquement validée, utilisez le mode <constant>OCI_DEFAULT</constant>. + </para> + <para> + &return.success; </para> </refsect1> </refentry> Index: phpdoc-fr/reference/oci8/functions/ocifetch.xml diff -u phpdoc-fr/reference/oci8/functions/ocifetch.xml:1.1 phpdoc-fr/reference/oci8/functions/ocifetch.xml:1.2 --- phpdoc-fr/reference/oci8/functions/ocifetch.xml:1.1 Sun Apr 14 20:35:23 2002 +++ phpdoc-fr/reference/oci8/functions/ocifetch.xml Mon Feb 10 22:14:20 2003 @@ -3,20 +3,20 @@ <!-- last change to 'ocifetch' in en/ tree in rev 1.2 --> <refentry id="function.ocifetch"> <refnamediv> - <refname>ociFetch</refname> + <refname>ocifetch</refname> <refpurpose> - Modifie la prochaine ligne dans le résultat. + Lit la prochaine ligne dans le résultat Oracle </refpurpose> </refnamediv> <refsect1> <title>Description</title> <methodsynopsis> - <type>int</type><methodname>ocifetch</methodname> - <methodparam><type>resource</type><parameter>statement</parameter></methodparam> + <type>bool</type><methodname>ocifetch</methodname> + <methodparam><type>int</type><parameter>statement</parameter></methodparam> </methodsynopsis> <para> - <function>ocifetch</function> place la prochaine ligne - (d'une commande SELECT) dans le pointeur interne de résultat. + <function>ocifetch</function> lit la prochaine ligne + (d'une commande SELECT) et la place dans le buffer interne de résultat. </para> </refsect1> </refentry> Index: phpdoc-fr/reference/oci8/functions/ocifetchinto.xml diff -u phpdoc-fr/reference/oci8/functions/ocifetchinto.xml:1.1 phpdoc-fr/reference/oci8/functions/ocifetchinto.xml:1.2 --- phpdoc-fr/reference/oci8/functions/ocifetchinto.xml:1.1 Sun Apr 14 20:35:23 2002 +++ phpdoc-fr/reference/oci8/functions/ocifetchinto.xml Mon Feb 10 22:14:20 2003 @@ -3,15 +3,15 @@ <!-- last change to 'ocifetchinto' in en/ tree in rev 1.2 --> <refentry id="function.ocifetchinto"> <refnamediv> - <refname>ociFetchInto</refname> - <refpurpose>Retourne la ligne suivante dans un tableau.</refpurpose> + <refname>ocifetchinto</refname> + <refpurpose>Retourne la ligne suivante dans un tableau</refpurpose> </refnamediv> <refsect1> <title>Description</title> <methodsynopsis> <type>int</type><methodname>ocifetchinto</methodname> - <methodparam><type>resource</type><parameter>stmt</parameter></methodparam> - <methodparam><type>array &</type><parameter>result</parameter></methodparam> + <methodparam><type>int</type><parameter>stmt</parameter></methodparam> + <methodparam><type>array</type><parameter>&result</parameter></methodparam> <methodparam choice="opt"><type>int</type><parameter>mode</parameter></methodparam> </methodsynopsis> <para> @@ -30,21 +30,47 @@ (i.e. OCI_ASSOC+OCI_RETURN_NULLS). Les modes valides sont : <simplelist> <member> - <literal>OCI_ASSOC</literal> Retourne un tableau associatif. + <constant>OCI_ASSOC</constant> retourne un tableau associatif. </member> <member> - <literal>OCI_NUM</literal> Retourne un tableau à index numérique + <constant>OCI_NUM</constant> retourne un tableau à index numérique (DEFAULT, valeur par défaut) </member> <member> - <literal>OCI_RETURN_NULLS</literal> Retourne les colonnes vides. + <constant>OCI_RETURN_NULLS</constant> retourne les colonnes vides. </member> <member> - <literal>OCI_RETURN_LOBS</literal> Retourne la valeur des objets LOB + <constant>OCI_RETURN_LOBS</constant> retourne la valeur des objets LOB plutôt que leur descripteur. </member> </simplelist> </para> + <para> + <example> + <title>Exemple avec <function>ocifetchinto</function></title> + <programlisting role="php"> +<![CDATA[ +<?php +$conn = ocilogon("username","password"); + +$query = "SELECT pommes FROM arbre"; + +$statement = OCIParse ($conn, $query); +OCIExecute ($statement); + +while (OCIFetchInto ($statement, $row, OCI_ASSOC)) { + print $row['pommes']; +} +?> +]]> + </programlisting> + </example> + </para> + <para> + Voir aussi + <function>ocifetch</function> et + <function>ociexecute</function>. + </para> </refsect1> </refentry> Index: phpdoc-fr/reference/oci8/functions/ocifetchstatement.xml diff -u phpdoc-fr/reference/oci8/functions/ocifetchstatement.xml:1.1 phpdoc-fr/reference/oci8/functions/ocifetchstatement.xml:1.2 --- phpdoc-fr/reference/oci8/functions/ocifetchstatement.xml:1.1 Sun Apr 14 20:35:23 2002 +++ phpdoc-fr/reference/oci8/functions/ocifetchstatement.xml Mon Feb 10 22:14:20 2003 @@ -3,15 +3,15 @@ <!-- last change to 'ocifetchstatement' in en/ tree in rev 1.2 --> <refentry id="function.ocifetchstatement"> <refnamediv> - <refname>ociFetchStatement</refname> - <refpurpose>Retourne toutes les lignes d'un résultat.</refpurpose> + <refname>ocifetchstatement</refname> + <refpurpose>Retourne toutes les lignes d'un résultat</refpurpose> </refnamediv> <refsect1> <title>Description</title> <methodsynopsis> - <type>int</type><methodname>ocifetchstatement</methodname> - <methodparam><type>resource</type><parameter>stmt</parameter></methodparam> - <methodparam><type>array &</type><parameter>variable</parameter></methodparam> + <type>int</type><methodname>ocifetchstatement</methodname> + <methodparam><type>resource</type><parameter>stmt</parameter></methodparam> + <methodparam><type>array &</type><parameter>variable</parameter></methodparam> </methodsynopsis> <para> <function>ocifetchstatement</function> retourne toutes les lignes @@ -20,38 +20,44 @@ de lignes retournées. </para> <example> - <title>ociFetchStatement</title> + <title>Exemple avec <function>ocifetchstatement</function></title> <programlisting role="php"> -<?php -/* exemple ociFetchStatement par mbritton@verinet.com (990624) */ -$conn = ociLogon("scott","tiger"); -$stmt = ociparse($conn,"select * from emp"); -ociexecute($stmt); -$nrows = ociFetchStatement($stmt,$results); -if ( $nrows > 0 ) { - print "<TABLE BORDER=\"1\">\n"; - print "<TR>\n"; +<![CDATA[ +<?php +$conn = OCILogon("scott","tiger"); + +$stmt = OCIParse($conn,"select * from emp"); + +OCIExecute($stmt); + +$nrows = OCIFetchStatement($stmt,$results); +if ( $nrows > 0 ) { + print "<TABLE BORDER=\"1\">\n"; + print "<TR>\n"; while ( list( $key, $val ) = each( $results ) ) { - print "<TH>$key</TH>\n"; + print "<TH>$key</TH>\n"; } - print "</TR>\n"; - for ( $i = 0; $i < $nrows; $i++ ) { + print "</TR>\n"; + + for ( $i = 0; $i < $nrows; $i++ ) { reset($results); - print "<TR>\n"; - while ( $column = each($results) ) { + print "<TR>\n"; + while ( $column = each($results) ) { $data = $column['value']; - print "<TD>$data[$i]</TD>\n"; + print "<TD>$data[$i]</TD>\n"; } - print "</TR>\n"; + print "</TR>\n"; } - print "</TABLE>\n"; + print "</TABLE>\n"; } else { - echo "Rien n'a été trouvé<br>\n"; -} -print "$nrows Records Selected<br>\n"; -ociFreeStatement($stmt); -ociLogoff($conn); -?> + echo "Aucune données trouvées<BR>\n"; +} +print "$nrows lignes lues<BR>\n"; + +OCIFreeStatement($stmt); +OCILogoff($conn); +?> +]]> </programlisting> </example> </refsect1> Index: phpdoc-fr/reference/oci8/functions/ocifreecollection.xml diff -u phpdoc-fr/reference/oci8/functions/ocifreecollection.xml:1.1 phpdoc-fr/reference/oci8/functions/ocifreecollection.xml:1.2 --- phpdoc-fr/reference/oci8/functions/ocifreecollection.xml:1.1 Sun Apr 14 20:35:23 2002 +++ phpdoc-fr/reference/oci8/functions/ocifreecollection.xml Mon Feb 10 22:14:20 2003 @@ -3,17 +3,17 @@ <!-- last change to 'ocifreecollection' in en/ tree in rev 1.23 --> <refentry id="function.ocifreecollection"> <refnamediv> - <refname>OCIFreeCollection</refname> - <refpurpose>Bientôt documenté....</refpurpose> + <refname>ocifreecollection</refname> + <refpurpose>Supprime une collection</refpurpose> </refnamediv> <refsect1> <title>Description</title> <methodsynopsis> - <type>string</type><methodname>ocifreecollection</methodname> + <type>bool</type><methodname>ocifreecollection</methodname> <methodparam><type>object</type><parameter>lob</parameter></methodparam> </methodsynopsis> <simpara> - Bientôt documenté.... + &warn.undocumented.func; </simpara> </refsect1> </refentry> Index: phpdoc-fr/reference/oci8/functions/ocifreecursor.xml diff -u phpdoc-fr/reference/oci8/functions/ocifreecursor.xml:1.2 phpdoc-fr/reference/oci8/functions/ocifreecursor.xml:1.3 --- phpdoc-fr/reference/oci8/functions/ocifreecursor.xml:1.2 Tue Aug 13 22:19:33 2002 +++ phpdoc-fr/reference/oci8/functions/ocifreecursor.xml Mon Feb 10 22:14:20 2003 @@ -5,18 +5,19 @@ <refnamediv> <refname>ociFreeCursor</refname> <refpurpose> - Libère toutes les ressources occupées par un pointeur. + Libère toutes les ressources réservées par un résultat Oracle </refpurpose> </refnamediv> <refsect1> <title>Description</title> <methodsynopsis> - <type>boolean</type><methodname>ocifreecursor</methodname> - <methodparam><type>resource</type><parameter>stmt</parameter></methodparam> + <type>int</type><methodname>ocifreecursor</methodname> + <methodparam><type>int</type><parameter>stmt</parameter></methodparam> </methodsynopsis> <para> - <function>ocifreecursor</function> retourne &true; en cas de - succès, et &false;en cas d'échec. + <function>ocifreecursor</function> libère toutes les ressources + réservées par le résultat Oracle <parameter>stmt</parameter>. + &return.success; </para> </refsect1> </refentry> Index: phpdoc-fr/reference/oci8/functions/ocifreedesc.xml diff -u phpdoc-fr/reference/oci8/functions/ocifreedesc.xml:1.2 phpdoc-fr/reference/oci8/functions/ocifreedesc.xml:1.3 --- phpdoc-fr/reference/oci8/functions/ocifreedesc.xml:1.2 Tue Aug 13 22:19:33 2002 +++ phpdoc-fr/reference/oci8/functions/ocifreedesc.xml Mon Feb 10 22:14:20 2003 @@ -3,18 +3,18 @@ <!-- last change to 'ocifreedesc' in en/ tree in rev 1.2 --> <refentry id="function.ocifreedesc"> <refnamediv> - <refname>ociFreeDesc</refname> - <refpurpose>Supprime un descripteur de LOB</refpurpose> + <refname>ocifreedesc</refname> + <refpurpose>Détruit un pointeur de LOB</refpurpose> </refnamediv> <refsect1> <title>Description</title> <methodsynopsis> - <type>int</type><methodname>ocifreedesc</methodname> + <type>bool</type><methodname>ocifreedesc</methodname> <methodparam><type>object</type><parameter>lob</parameter></methodparam> </methodsynopsis> <para> - <function>ocifreedesc</function> retourne &true; en cas de - succès, et &false;en cas d'échec. + <function>ocifreedesc</function> détruit le pointeur de LOB + <parameter>lob</parameter>. &return.success; </para> </refsect1> </refentry> Index: phpdoc-fr/reference/oci8/functions/ocifreestatement.xml diff -u phpdoc-fr/reference/oci8/functions/ocifreestatement.xml:1.2 phpdoc-fr/reference/oci8/functions/ocifreestatement.xml:1.3 --- phpdoc-fr/reference/oci8/functions/ocifreestatement.xml:1.2 Tue Aug 13 22:19:33 2002 +++ phpdoc-fr/reference/oci8/functions/ocifreestatement.xml Mon Feb 10 22:14:20 2003 @@ -3,20 +3,20 @@ <!-- last change to 'ocifreestatement' in en/ tree in rev 1.2 --> <refentry id="function.ocifreestatement"> <refnamediv> - <refname>ociFreeStatement</refname> + <refname>ocifreestatement</refname> <refpurpose> - Libère toutes les ressources occupées par une commande. + Libère toutes les ressources occupées par une commande </refpurpose> </refnamediv> <refsect1> <title>Description</title> <methodsynopsis> - <type>int</type><methodname>ocifreestatement</methodname> + <type>bool</type><methodname>ocifreestatement</methodname> <methodparam><type>resource</type><parameter>stmt</parameter></methodparam> </methodsynopsis> <para> - <function>ocifreestatement</function> retourne &true; - en cas de succès, et &false;en cas d'échec. + <function>ocifreestatement</function> libère toutes les ressources + occupées par la commande <parameter>stmt</parameter>. &return.success; </para> </refsect1> </refentry> Index: phpdoc-fr/reference/oci8/functions/ociinternaldebug.xml diff -u phpdoc-fr/reference/oci8/functions/ociinternaldebug.xml:1.1 phpdoc-fr/reference/oci8/functions/ociinternaldebug.xml:1.2 --- phpdoc-fr/reference/oci8/functions/ociinternaldebug.xml:1.1 Sun Apr 14 20:35:24 2002 +++ phpdoc-fr/reference/oci8/functions/ociinternaldebug.xml Mon Feb 10 22:14:20 2003 @@ -18,7 +18,7 @@ <function>ociinternaldebug</function> active ou désactive l'affichage des informations de debuggage. Pour les afficher, mettez <parameter>onoff</parameter> à 1, ou sinon mettez - <parameter>onoff</parameter> à 0 pour les cacher. + <parameter>onoff</parameter> à 0 pour les masquer. </simpara> </refsect1> </refentry> Index: phpdoc-fr/reference/oci8/functions/ociloadlob.xml diff -u phpdoc-fr/reference/oci8/functions/ociloadlob.xml:1.1 phpdoc-fr/reference/oci8/functions/ociloadlob.xml:1.2 --- phpdoc-fr/reference/oci8/functions/ociloadlob.xml:1.1 Sun Apr 14 20:35:25 2002 +++ phpdoc-fr/reference/oci8/functions/ociloadlob.xml Mon Feb 10 22:14:20 2003 @@ -3,8 +3,8 @@ <!-- last change to 'ociloadlob' in en/ tree in rev 1.23 --> <refentry id="function.ociloadlob"> <refnamediv> - <refname>OCILoadLob</refname> - <refpurpose>Bientôt documenté....</refpurpose> + <refname>ociloadlob</refname> + <refpurpose>Charge un LOB</refpurpose> </refnamediv> <refsect1> <title>Description</title> @@ -13,7 +13,7 @@ <methodparam><type>object</type><parameter>lob</parameter></methodparam> </methodsynopsis> <simpara> - Bientôt documenté.... + &warn.undocumented.func; </simpara> </refsect1> </refentry> Index: phpdoc-fr/reference/oci8/functions/ocilogoff.xml diff -u phpdoc-fr/reference/oci8/functions/ocilogoff.xml:1.1 phpdoc-fr/reference/oci8/functions/ocilogoff.xml:1.2 --- phpdoc-fr/reference/oci8/functions/ocilogoff.xml:1.1 Sun Apr 14 20:35:25 2002 +++ phpdoc-fr/reference/oci8/functions/ocilogoff.xml Mon Feb 10 22:14:20 2003 @@ -3,17 +3,25 @@ <!-- last change to 'ocilogoff' in en/ tree in rev 1.2 --> <refentry id="function.ocilogoff"> <refnamediv> - <refname>ociLogOff</refname> - <refpurpose>Déconnexion d'un serveur Oracle.</refpurpose> + <refname>ocilogoff</refname> + <refpurpose>Déconnecte d'un serveur Oracle</refpurpose> </refnamediv> <refsect1> <title>Description</title> <methodsynopsis> - <type>int</type><methodname>ocilogoff</methodname> + <type>bool</type><methodname>ocilogoff</methodname> <methodparam><type>resource</type><parameter>connection</parameter></methodparam> </methodsynopsis> <para> - <function>ocilogoff</function> ferme la connexion Oracle. + <function>ocilogoff</function> ferme la connexion Oracle + <parameter>connection</parameter>. + </para> + <para> + Utiliser <function>ocilogoff</function> n'est pas nécessaire, + car les connexions non persistantes seront automatiquement + fermée à la fin du script. Voyez aussi le chapitre sur la + <link linkend="language.types.resource.self-destruct">libération des + ressources</link>. </para> </refsect1> </refentry> Index: phpdoc-fr/reference/oci8/functions/ocilogon.xml diff -u phpdoc-fr/reference/oci8/functions/ocilogon.xml:1.1 phpdoc-fr/reference/oci8/functions/ocilogon.xml:1.2 --- phpdoc-fr/reference/oci8/functions/ocilogon.xml:1.1 Sun Apr 14 20:35:25 2002 +++ phpdoc-fr/reference/oci8/functions/ocilogon.xml Mon Feb 10 22:14:20 2003 @@ -3,22 +3,26 @@ <!-- last change to 'ocilogon' in en/ tree in rev 1.2 --> <refentry id="function.ocilogon"> <refnamediv> - <refname>ociLogon</refname> - <refpurpose>Etablit une connexion à un serveur Oracle.</refpurpose> + <refname>ocilogon</refname> + <refpurpose>Etablit une connexion à un serveur Oracle</refpurpose> </refnamediv> <refsect1> <title>Description</title> <methodsynopsis> - <type>resource</type><methodname>ocilogon</methodname> + <type>int</type><methodname>ocilogon</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>ocilogon</function> retourne un identifiant de connexion, - nécessaire à la plupart des fonctions oci. Si l'option - ORACLE_SID n'est pas précisée, PHP utilisera la variable - d'environnement ORACLE_SID pour déterminer le serveur de connexion. + nécessaire à la plupart des fonctions oci. Le paramètre + optionnel <parameter>db</parameter> peut contenir le nom local + du serveur Oracle, ou bien son nom dans la table d'entrées + tnsnames.ora à laquelle vous voulez vous connecter. Si le troisième + paramètre n'est pas spécifié, &php; utilisera la variable d'environnement + <varname>ORACLE_SID</varname> (instance Oracle) ou <varname>TWO_TASK</varname> + (tnsnames.ora) pour déterminer la base à laquelle se connecter. </para> <para> Les connexions sont partagées, à l'intérieur @@ -28,72 +32,97 @@ même si vous avez créé de multiples connexions. </para> <para> + Les connexions sont partagées au niveau de la page, lorsque vous utilisez + <function>ocilogon</function>. Cela signifie que les validations et annulations + s'appliquent à toutes les transactions de la page, même si vous avez + créé de multiples connexions à un même serveur Oracle. + </para> + <para> Cet exemple montre comment les connexions sont partagées : <example> - <title>ociLogon</title> + <title>Exemple avec <function>ocilogon</function></title> <programlisting role="php"> -<?php -print "<HTML><PRE>"; +<![CDATA[ +<?php +print "<HTML><PRE>"; $db = ""; + $c1 = ocilogon("scott","tiger",$db); $c2 = ocilogon("scott","tiger",$db); + function create_table($conn) -{ $stmt = ociparse($conn,"create table scott.hallo (test -varchar2(64))"); +{ $stmt = ociparse($conn,"create table scott.hallo (test varchar2(64))"); ociexecute($stmt); - echo $conn." created table\n\n"; + echo $conn." a créé une table\n\n"; } + function drop_table($conn) { $stmt = ociparse($conn,"drop table scott.hallo"); ociexecute($stmt); - echo $conn." dropped table\n\n"; + echo $conn." a effacé une 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"; +{ $stmt = ociparse($conn,"insert into scott.hallo + values('$conn' || ' ' || to_char(sysdate,'DD-MON-YY HH24:MI:SS'))"); + ociexecute($stmt,OCI_DEFAULT); + echo $conn." a inséré dans hallo\n\n"; } + function delete_data($conn) { $stmt = ociparse($conn,"delete from scott.hallo"); - ociexecute($stmt,oci_DEFAULT); - echo $conn." deleted hallo\n\n"; + ociexecute($stmt,OCI_DEFAULT); + echo $conn." a effacé dans hallo\n\n"; } + function commit($conn) { ocicommit($conn); - echo $conn." commited\n\n"; + echo $conn." validé\n\n"; } + function rollback($conn) { ocirollback($conn); - echo $conn." rollback\n\n"; + echo $conn." annulé\n\n"; } + function select_data($conn) { $stmt = ociparse($conn,"select * from scott.hallo"); - ociexecute($stmt,oci_DEFAULT); - echo $conn."----selecting\n\n"; + ociexecute($stmt,OCI_DEFAULT); + echo $conn."----selection\n\n"; while (ocifetch($stmt)) - echo $conn." <".ociresult($stmt,"TEST").">\n\n"; - echo $conn."----done\n\n"; + echo $conn." <".ociresult($stmt,"TEST").">\n\n"; + echo $conn."----fin\n\n"; } + create_table($c1); -insert_data($c1); // Insertion d'une ligne avec c1 -insert_data($c2); // Insertion d'une ligne avec c2 -select_data($c1); // Les résultats des deux insertions sont retournés -select_data($c2); -rollback($c1); // Annulation avec c1 -select_data($c1); // Les résultats des deux insertions sont annulés -select_data($c2); -insert_data($c2); // Insertion d'une ligne avec c2 -commit($c2); // Validation avec using c2 -select_data($c1); // Le résultat de c2 est retourné +insert_data($c1); // Insertion avec c1 +insert_data($c2); // Insertion avec c2 + +select_data($c1); // Resultats des insertions +select_data($c2); + +rollback($c1); // Annulation sur c1 + +select_data($c1); // Les deux insertions ont été annulées +select_data($c2); + +insert_data($c2); // Insertion avec c2 +commit($c2); // Validation avec c2 + +select_data($c1); // Le résultat de l'insertion via c2 + delete_data($c1); // Effacement de toutes les lignes avec c1 -select_data($c1); // Aucune ligne n'est retournée -select_data($c2); // Aucune ligne n'est retournée +select_data($c1); // Aucune ligne lue +select_data($c2); // Aucune ligne lue commit($c1); // Validation avec c1 -select_data($c1); // Aucune ligne n'est retournée -select_data($c2); // Aucune ligne n'est retournée + +select_data($c1); // Aucune ligne lue +select_data($c2); // Aucune ligne lue + drop_table($c1); -print "</PRE></HTML>"; -?> +print "</PRE></HTML>"; +?> +]]> </programlisting> </example> </para> Index: phpdoc-fr/reference/oci8/functions/ocinewcollection.xml diff -u phpdoc-fr/reference/oci8/functions/ocinewcollection.xml:1.1 phpdoc-fr/reference/oci8/functions/ocinewcollection.xml:1.2 --- phpdoc-fr/reference/oci8/functions/ocinewcollection.xml:1.1 Sun Apr 14 20:35:25 2002 +++ phpdoc-fr/reference/oci8/functions/ocinewcollection.xml Mon Feb 10 22:14:20 2003 @@ -3,19 +3,19 @@ <!-- last change to 'ocinewcollection' in en/ tree in rev 1.23 --> <refentry id="function.ocinewcollection"> <refnamediv> - <refname>OCINewCollection</refname> - <refpurpose>Bientôt documenté....</refpurpose> + <refname>ocinewcollection</refname> + <refpurpose>Initialise une nouvelle collection</refpurpose> </refnamediv> <refsect1> <title>Description</title> <methodsynopsis> - <type>string</type><methodname>ocinewcollection</methodname> + <type>bool</type><methodname>ocinewcollection</methodname> <methodparam><type>int</type><parameter>conn</parameter></methodparam> <methodparam><type>string</type><parameter>tdo</parameter></methodparam> <methodparam choice="opt"><type>string</type><parameter>shema</parameter></methodparam> </methodsynopsis> <simpara> - Bientôt documenté.... + &warn.undocumented.func; </simpara> </refsect1> </refentry> Index: phpdoc-fr/reference/oci8/functions/ocinewcursor.xml diff -u phpdoc-fr/reference/oci8/functions/ocinewcursor.xml:1.1 phpdoc-fr/reference/oci8/functions/ocinewcursor.xml:1.2 --- phpdoc-fr/reference/oci8/functions/ocinewcursor.xml:1.1 Sun Apr 14 20:35:26 2002 +++ phpdoc-fr/reference/oci8/functions/ocinewcursor.xml Mon Feb 10 22:14:20 2003 @@ -3,7 +3,7 @@ <!-- last change to 'ocinewcursor' in en/ tree in rev 1.2 --> <refentry id="function.ocinewcursor"> <refnamediv> - <refname>ociNewCursor</refname> + <refname>ocinewcursor</refname> <refpurpose> Retourne un nouveau pointeur à utiliser pour lier les pointeurs de références @@ -12,7 +12,7 @@ <refsect1> <title>Description</title> <methodsynopsis> - <type>int</type><methodname>ocinewcursor</methodname> + <type>resource</type><methodname>ocinewcursor</methodname> <methodparam><type>resource</type><parameter>conn</parameter></methodparam> </methodsynopsis> <para> @@ -22,25 +22,31 @@ <para> <example> <title> - Utiliser un REF CURSOR issue d'une procédure enregistrée. + Utiliser un REF CURSOR issue d'une procédure enregistrée </title> <programlisting role="php"> -<?php -// supposons que votre procédure stoquée info.output retourne un pointeur -// de curseur dans : data -$conn = ociLogon("scott","tiger"); -$curs = ociNewCursor($conn); -$stmt = ociparse($conn,"begin info.output(:data); end;"); -ocibindbyname($stmt,"data",&$curs,-1,oci_B_CURSOR); +<![CDATA[ +<?php +// supposons que votre procédure stockée info.output retourne un curseur de référence dans :data + +$conn = OCILogon("scott","tiger"); +$curs = OCINewCursor($conn); +$stmt = OCIParse($conn,"begin info.output(:data); end;"); + +ocibindbyname($stmt,"data",&$curs,-1,OCI_B_CURSOR); ociexecute($stmt); ociexecute($curs); -while (ociFetchInto($curs,&$data)) { + +while (OCIFetchInto($curs,&$data)) { var_dump($data); } -ociFreeStatement($curs); -ociFreeCursor($stmt); -ociLogoff($conn); -?> + +OCIFreeStatement($stmt); +OCIFreeCursor($curs); +OCILogoff($conn); +?> +]]> + </programlisting> </example> </para> @@ -48,37 +54,41 @@ <example> <title>Utiliser un REF CURSOR issue d'une commande SELECT</title> <programlisting role="php"> -<?php -print "<HTML><BODY>"; -$conn = ociLogon("scott","tiger"); +<![CDATA[ +<?php +print "<HTML><BODY>"; +$conn = OCILogon("scott","tiger"); $count_cursor = "CURSOR(select count(empno) num_emps from emp " . "where emp.deptno = dept.deptno) as EMPCNT from dept"; -$stmt = ociparse($conn,"select deptno,dname,$count_cursor"); +$stmt = OCIParse($conn,"select deptno,dname,$count_cursor"); + ociexecute($stmt); -print "<TABLE BORDER=\"1\">"; -print "<TR>"; -print "<TH>DEPT NAME</TH>"; -print "<TH>DEPT #</TH>"; -print "<TH># EMPLOYEES</TH>"; -print "</TR>"; -while (ociFetchInto($stmt,&$data,oci_ASSOC)) { - print "<TR>"; +print "<TABLE BORDER=\"1\">"; +print "<TR>"; +print "<TH>DEPT NAME</TH>"; +print "<TH>DEPT #</TH>"; +print "<TH># EMPLOYEES</TH>"; +print "</TR>"; + +while (OCIFetchInto($stmt,&$data,OCI_ASSOC)) { + print "<TR>"; $dname = $data["DNAME"]; $deptno = $data["DEPTNO"]; - print "<TD>$dname</TD>"; - print "<TD>$deptno</TD>"; - ociexecute($data[ "EMPCNT" ]); - while (ociFetchInto($data[ "EMPCNT" ],&$subdata,oci_ASSOC)) { + print "<TD>$dname</TD>"; + print "<TD>$deptno</TD>"; + ociexecute($data["EMPCNT"]); + while (OCIFetchInto($data["EMPCNT"],&$subdata,OCI_ASSOC)) { $num_emps = $subdata["NUM_EMPS"]; - print "<TD>$num_emps</TD>"; + print "<TD>$num_emps</TD>"; } - print "</TR>"; + print "</TR>"; } -print "</TABLE>"; -print "</BODY></HTML>"; -ociFreeStatement($stmt); -ociLogoff($conn); -?> +print "</TABLE>"; +print "</BODY></HTML>"; +OCIFreeStatement($stmt); +OCILogoff($conn); +?> +]]> </programlisting> </example> </para> Index: phpdoc-fr/reference/oci8/functions/ocinewdescriptor.xml diff -u phpdoc-fr/reference/oci8/functions/ocinewdescriptor.xml:1.1 phpdoc-fr/reference/oci8/functions/ocinewdescriptor.xml:1.2 --- phpdoc-fr/reference/oci8/functions/ocinewdescriptor.xml:1.1 Sun Apr 14 20:35:26 2002 +++ phpdoc-fr/reference/oci8/functions/ocinewdescriptor.xml Mon Feb 10 22:14:20 2003 @@ -3,91 +3,106 @@ <!-- last change to 'ocinewdescriptor' in en/ tree in rev 1.2 --> <refentry id="function.ocinewdescriptor"> <refnamediv> - <refname>ociNewDescriptor</refname> + <refname>ocinewdescriptor</refname> <refpurpose>Initialise un nouveau pointeur vide de LOB/FILE</refpurpose> </refnamediv> <refsect1> <title>Description</title> <methodsynopsis> - <type>resource</type><methodname>ocinewdescriptor</methodname> - <methodparam><type>resource</type><parameter>connection</parameter></methodparam> + <type>string</type><methodname>ocinewdescriptor</methodname> + <methodparam><type>int</type><parameter>connection</parameter></methodparam> <methodparam choice="opt"><type>int</type><parameter>type</parameter></methodparam> </methodsynopsis> <para> <function>ocinewdescriptor</function> alloue l'espace nécessaire pour stocker un descripteur, ou un pointeur de LOB. Les valeurs acceptées pour type sont - oci_D_FILE, oci_D_LOB et oci_D_ROWID. + OCI_D_FILE, OCI_D_LOB et OCI_D_ROWID. + Pour les pointeurs de LOB, les méthodes load, save, et savefile sont + associées avec le pointeur. Pour les pointeurs de type BFILE, + seule la méthode load existe. Voyez le second exemple pour une + illustration. </para> <example> <title>ocinewdescriptor</title> <programlisting role="php"> -<?php +<![CDATA[ +<?php /* Ce script est fait pour être appelé dans un formulaire HTML * Il attends les variables $user, $password, $table, $where, et $commitsize * Le script efface alors les lignes sélectionnées avec ROWID et valide * l'effacement après chaque groupe de $commitsize lignes. * (Utilisez avec prudence, car il n'y a pas d'annulation possible). */ - $conn = ociLogon($user, $password); - $stmt = ociparse($conn,"select rowid from $table $where"); - $rowid = ociNewDescriptor($conn,oci_D_ROWID); - ociDefineByName($stmt,"ROWID",&$rowid); - ociexecute($stmt); - while ( ociFetch($stmt) ) { - $nrows = ociRowCount($stmt); - $delete = ociparse($conn,"delete from $table where ROWID = :rid"); - ociBindByName($delete,":rid",&$rowid,-1,oci_B_ROWID); - ociexecute($delete); + $conn = OCILogon($user, $password); + $stmt = OCIParse($conn,"select rowid from $table $where"); + $rowid = OCINewDescriptor($conn,OCI_D_ROWID); + OCIDefineByName($stmt,"ROWID",&$rowid); + OCIExecute($stmt); + while ( OCIFetch($stmt) ) { + $nrows = OCIRowCount($stmt); + $delete = OCIParse($conn,"delete from $table where ROWID = :rid"); + OCIBindByName($delete,":rid",&$rowid,-1,OCI_B_ROWID); + OCIExecute($delete); print "$nrows\n"; if ( ($nrows % $commitsize) == 0 ) { - ociCommit($conn); - } + OCICommit($conn); + } } - $nrows = ociRowCount($stmt); - print "$nrows effacées...\n"; - ociFreeStatement($stmt); - ociLogoff($conn); -?> + $nrows = OCIRowCount($stmt); + print "$nrows deleted...\n"; + OCIFreeStatement($stmt); + OCILogoff($conn); +?> +]]> </programlisting> <programlisting role="php"> -<?php +<![CDATA[ +<?php /* Ce script est fait pour être appelé depuis un formulaire HTML. * Il attends les variables $user, $password, $table, $where, et $commitsize, * données par le formulaire. Le script efface * les lignes sélectionnées avec ROWID est valide les transactions * à chaque jeu de $commitsize lignes. (Attention : il n'y plus d'annulation) */ if(!isset($lob_upload) || $lob_upload == 'none'){ -?> -<form action="upload.php3" method="post" enctype="multipart/form-data"> -Upload file: <input type="file" name="lob_upload"><br> -<input type="submit" value="Upload"> - <input type="reset"> -</form> -<?php +?> +<form action="upload.php" method="post" enctype="multipart/form-data"> +Fichier à télécharger : <input type="file" name="lob_upload"><br> +<input type="submit" value="Envoyer"> - <input type="reset"> +</form> +<?php } else { + // $lob_upload contains the temporary filename of the uploaded file - $conn = ociLogon($user, $password); - $lob = ociNewDescriptor($conn, oci_D_LOB); - $stmt = ociparse($conn,"insert into $table (id, the_blob) values(my_seq.NEXTVAL, EMPTY_BLOB()) returning the_blob into :the_blob"); - ociBindByName($stmt, ':the_blob', &$lob, -1, oci_B_BLOB); - ociexecute($stmt, oci_DEFAULT); + + // see also the features section on file upload, + // if you would like to use secure uploads + + $conn = OCILogon($user, $password); + $lob = OCINewDescriptor($conn, OCI_D_LOB); + $stmt = OCIParse($conn,"insert into $table (id, the_blob) + values(my_seq.NEXTVAL, EMPTY_BLOB()) returning the_blob into :the_blob"); + OCIBindByName($stmt, ':the_blob', &$lob, -1, OCI_B_BLOB); + OCIExecute($stmt, OCI_DEFAULT); if($lob->savefile($lob_upload)){ - ociCommit($conn); - echo "Blob sauvé!\n"; + OCICommit($conn); + echo "Blob successfully uploaded\n"; }else{ - echo "Impossible de sauver le Blob\n"; + echo "Couldn't upload Blob\n"; } - ociFreeDescriptor($lob); - ociFreeStatement($stmt); - ociLogoff($conn); + OCIFreeDesc($lob); + OCIFreeStatement($stmt); + OCILogoff($conn); } -?> +?> +]]> </programlisting> </example> <example> <title>Exemple avec <function>ocinewdescriptor</function></title> <programlisting> -<?php +<![CDATA[ +<?php /* Appel d'une procédure PL/SQL stockée qui prend un clobs * en entrée (PHP 4 >= 4.0.6). * Exemple de signateure de procédure stockée PL/SQL : @@ -111,7 +126,8 @@ $clob->close(); $clob->free(); OCIFreeStatement($stmt); -?> +?> +]]> </programlisting> </example> </refsect1> Index: phpdoc-fr/reference/oci8/functions/ocinlogon.xml diff -u phpdoc-fr/reference/oci8/functions/ocinlogon.xml:1.1 phpdoc-fr/reference/oci8/functions/ocinlogon.xml:1.2 --- phpdoc-fr/reference/oci8/functions/ocinlogon.xml:1.1 Sun Apr 14 20:35:26 2002 +++ phpdoc-fr/reference/oci8/functions/ocinlogon.xml Mon Feb 10 22:14:20 2003 @@ -3,24 +3,28 @@ <!-- last change to 'ocinlogon' in en/ tree in rev 1.15 --> <refentry id="function.ocinlogon"> <refnamediv> - <refname>ociNLogon</refname> + <refname>ocinlogon</refname> <refpurpose> - Se connecte à un serveur Oracle avec une nouvelle connexion. + Etablit une nouvelle correction avec un serveur Oracle </refpurpose> </refnamediv> <refsect1> <title>Description</title> <methodsynopsis> - <type>resource</type><methodname>ocinlogon</methodname> + <type>int</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> crée une nouvelle connexion à - un serveur Oracle et s'authentifie. Si l'option ORACLE_SID n'est pas - spécifié, PHP utilisera la variable d'environnement - ORACLE_SID pour déterminer le serveur de connexion. + un serveur Oracle et s'identifie. Le paramètre + optionnel <parameter>db</parameter> peut contenir le nom local + du serveur Oracle, ou bien son nom dans la table d'entrées + tnsnames.ora à laquelle vous voulez vous connecter. Si le troisième + paramètre n'est pas spécifié, &php; utilisera la variable d'environnement + <varname>ORACLE_SID</varname> (instance Oracle) ou <varname>TWO_TASK</varname> + (tnsnames.ora) pour déterminer la base à laquelle se connecter. </para> <para> <function>ocinlogon</function> force le serveur à @@ -38,69 +42,89 @@ L'exemple ci-dessous montre l'utilisation des connexions séparées. <example> - <title>ociNLogon</title> + <title>Exemple avec <function>ocinlogon</function></title> <programlisting role="php"> -<?php -print "<HTML><PRE>"; +<![CDATA[ +<?php +print "<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))"); +{ $stmt = ociparse($conn,"create table scott.hallo (test varchar2(64))"); ociexecute($stmt); - echo $conn." created table\n\n"; + echo $conn." a créé une table\n\n"; } + function drop_table($conn) { $stmt = ociparse($conn,"drop table scott.hallo"); ociexecute($stmt); - echo $conn." dropped table\n\n"; + echo $conn." a effacé une 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"; +{ $stmt = ociparse($conn,"insert into scott.hallo + values('$conn' || ' ' || to_char(sysdate,'DD-MON-YY HH24:MI:SS'))"); + ociexecute($stmt,OCI_DEFAULT); + echo $conn." a inséré dans hallo\n\n"; } + function delete_data($conn) { $stmt = ociparse($conn,"delete from scott.hallo"); - ociexecute($stmt,oci_DEFAULT); - echo $conn." deleted hallo\n\n"; + ociexecute($stmt,OCI_DEFAULT); + echo $conn." a effacé dans hallo\n\n"; } + function commit($conn) { ocicommit($conn); - echo $conn." commited\n\n"; + echo $conn." validé\n\n"; } + function rollback($conn) { ocirollback($conn); - echo $conn." rollback\n\n"; + echo $conn." annulé\n\n"; } + function select_data($conn) { $stmt = ociparse($conn,"select * from scott.hallo"); - ociexecute($stmt,oci_DEFAULT); - echo $conn."----selecting\n\n"; + ociexecute($stmt,OCI_DEFAULT); + echo $conn."----selection\n\n"; while (ocifetch($stmt)) - echo $conn." <".ociresult($stmt,"TEST").">\n\n"; - echo $conn."----done\n\n"; + echo $conn." <".ociresult($stmt,"TEST").">\n\n"; + echo $conn."----fin\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); -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); -print "</PRE></HTML>"; -?> +print "</PRE></HTML>"; +?> +]]> </programlisting> </example> </para> Index: phpdoc-fr/reference/oci8/functions/ocinumcols.xml diff -u phpdoc-fr/reference/oci8/functions/ocinumcols.xml:1.1 phpdoc-fr/reference/oci8/functions/ocinumcols.xml:1.2 --- phpdoc-fr/reference/oci8/functions/ocinumcols.xml:1.1 Sun Apr 14 20:35:27 2002 +++ phpdoc-fr/reference/oci8/functions/ocinumcols.xml Mon Feb 10 22:14:20 2003 @@ -3,7 +3,7 @@ <!-- last change to 'ocinumcols' in en/ tree in rev 1.2 --> <refentry id="function.ocinumcols"> <refnamediv> - <refname>ociNumCols</refname> + <refname>ocinumcols</refname> <refpurpose>Retourne le nombre de colonnes dans un résultat</refpurpose> </refnamediv> <refsect1> @@ -14,31 +14,33 @@ </methodsynopsis> <para> <function>ocinumcols</function> retourne le nombre de colonnes - dans un résultat. + dans le résultat <parameter>stmt</parameter>. </para> <example> - <title>ociNumCols</title> + <title>Exemple avec <function>ocinumcols</function></title> <programlisting role="php"> -<?php - print "<HTML><PRE>\n"; - $conn = ociLogon("scott", "tiger"); - $stmt = ociparse($conn,"select * from emp"); - ociexecute($stmt); - while ( ociFetch($stmt) ) { - print "\n"; - $ncols = ociNumCols($stmt); - for ( $i = 1; $i <= $ncols; $i++ ) { - $column_name = ociColumnName($stmt,$i); - $column_value = ociResult($stmt,$i); +<![CDATA[ +<?php + print "<HTML><PRE>\n"; + $conn = OCILogon("scott", "tiger"); + $stmt = OCIParse($conn,"select * from emp"); + OCIExecute($stmt); + while ( OCIFetch($stmt) ) { + print "\n"; + $ncols = OCINumCols($stmt); + for ( $i = 1; $i <= $ncols; $i++ ) { + $column_name = OCIColumnName($stmt,$i); + $column_value = OCIResult($stmt,$i); print $column_name . ': ' . $column_value . "\n"; } print "\n"; } - ociFreeStatement($stmt); - ociLogoff($conn); - print "</PRE>"; - print "</HTML>\n"; -?> + OCIFreeStatement($stmt); + OCILogoff($conn); + print "</PRE>"; + print "</HTML>\n"; +?> +]]> </programlisting> </example> </refsect1> Index: phpdoc-fr/reference/oci8/functions/ociparse.xml diff -u phpdoc-fr/reference/oci8/functions/ociparse.xml:1.2 phpdoc-fr/reference/oci8/functions/ociparse.xml:1.3 --- phpdoc-fr/reference/oci8/functions/ociparse.xml:1.2 Tue Aug 13 22:19:33 2002 +++ phpdoc-fr/reference/oci8/functions/ociparse.xml Mon Feb 10 22:14:20 2003 @@ -4,20 +4,20 @@ <refentry id="function.ociparse"> <refnamediv> <refname>ociparse</refname> - <refpurpose>Analyse une requête.</refpurpose> + <refpurpose>Analyse une requête SQL avec Oracle</refpurpose> </refnamediv> <refsect1> <title>Description</title> <methodsynopsis> <type>int</type><methodname>ociparse</methodname> - <methodparam><type>resource</type><parameter>conn</parameter></methodparam> + <methodparam><type>int</type><parameter>conn</parameter></methodparam> <methodparam><type>string</type><parameter>query</parameter></methodparam> </methodsynopsis> <simpara> <function>ociparse</function> analyse la requête <parameter>query</parameter> sur la connexion <parameter>conn</parameter>, et retourne &true; si la requête - <parameter>query</parameter> est valide, et <literal>FALSE</literal>, si + <parameter>query</parameter> est valide, et &false;, si ce n'est pas le cas. <parameter>query</parameter> peut être n'importe quelle requête SQL. </simpara> Index: phpdoc-fr/reference/oci8/functions/ociplogon.xml diff -u phpdoc-fr/reference/oci8/functions/ociplogon.xml:1.1 phpdoc-fr/reference/oci8/functions/ociplogon.xml:1.2 --- phpdoc-fr/reference/oci8/functions/ociplogon.xml:1.1 Sun Apr 14 20:35:27 2002 +++ phpdoc-fr/reference/oci8/functions/ociplogon.xml Mon Feb 10 22:14:20 2003 @@ -3,30 +3,34 @@ <!-- last change to 'ociplogon' in en/ tree in rev 1.15 --> <refentry id="function.ociplogon"> <refnamediv> - <refname>ociPLogon</refname> - <refpurpose>Connection persistante à un serveur Oracle.</refpurpose> + <refname>ociplogon</refname> + <refpurpose>Ouvre une connexion persistante à un serveur Oracle</refpurpose> </refnamediv> <refsect1> <title>Description</title> <methodsynopsis> - <type>resource</type><methodname>ociplogon</methodname> + <type>int</type><methodname>ociplogon</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>ociplogon</function> crée une connexion persistante - à un serveur Oracle 8 et s'authentifie. Si l'option ORACLE_SID - n'est pas spécifiée, PHP utilisera la variable - d'environnement ORACLE_SID pour déterminer le serveur de - connexion. + à un serveur Oracle 8 et s'authentifie. Le paramètre + optionnel <parameter>db</parameter> peut contenir le nom local + du serveur Oracle, ou bien son nom dans la table d'entrées + tnsnames.ora à laquelle vous voulez vous connecter. Si le troisième + paramètre n'est pas spécifié, &php; utilisera la variable d'environnement + <varname>ORACLE_SID</varname> (instance Oracle) ou <varname>TWO_TASK</varname> + (tnsnames.ora) pour déterminer la base à laquelle se connecter. </para> <simpara> Voir aussi <function>ocilogon</function> et <function>ocinlogon</function>. </simpara> - </refsect1></refentry> + </refsect1> + </refentry> <!-- Keep this comment at the end of the file Local variables: Index: phpdoc-fr/reference/oci8/functions/ociresult.xml diff -u phpdoc-fr/reference/oci8/functions/ociresult.xml:1.1 phpdoc-fr/reference/oci8/functions/ociresult.xml:1.2 --- phpdoc-fr/reference/oci8/functions/ociresult.xml:1.1 Sun Apr 14 20:35:27 2002 +++ phpdoc-fr/reference/oci8/functions/ociresult.xml Mon Feb 10 22:14:20 2003 @@ -3,14 +3,14 @@ <!-- last change to 'ociresult' in en/ tree in rev 1.2 --> <refentry id="function.ociresult"> <refnamediv> - <refname>ociResult</refname> - <refpurpose>Retourne la valeur d'une colonne</refpurpose> + <refname>ociresult</refname> + <refpurpose>Retourne la valeur d'une colonne dans un résultat Oracle</refpurpose> </refnamediv> <refsect1> <title>Description</title> <methodsynopsis> <type>mixed</type><methodname>ociresult</methodname> - <methodparam><type>resource</type><parameter>statement</parameter></methodparam> + <methodparam><type>int</type><parameter>statement</parameter></methodparam> <methodparam><type>mixed</type><parameter>column</parameter></methodparam> </methodsynopsis> <para> Index: phpdoc-fr/reference/oci8/functions/ocirollback.xml diff -u phpdoc-fr/reference/oci8/functions/ocirollback.xml:1.1 phpdoc-fr/reference/oci8/functions/ocirollback.xml:1.2 --- phpdoc-fr/reference/oci8/functions/ocirollback.xml:1.1 Sun Apr 14 20:35:27 2002 +++ phpdoc-fr/reference/oci8/functions/ocirollback.xml Mon Feb 10 22:14:20 2003 @@ -3,19 +3,24 @@ <!-- last change to 'ocirollback' in en/ tree in rev 1.2 --> <refentry id="function.ocirollback"> <refnamediv> - <refname>ociRollback</refname> - <refpurpose>Annule les transactions en cours.</refpurpose> + <refname>ocirollback</refname> + <refpurpose>Annule les transactions Oracle en cours</refpurpose> </refnamediv> <refsect1> <title>Description</title> <methodsynopsis> - <type>int</type><methodname>ocirollback</methodname> + <type>bool</type><methodname>ocirollback</methodname> <methodparam><type>resource</type><parameter>connection</parameter></methodparam> </methodsynopsis> <para> <function>ocirollback</function> annule les transactions en cours sur la connexion Oracle <parameter>connection</parameter>. + &return.success; </para> + <simpara> + Voir aussi + <function>ocicommit</function>. + </simpara> </refsect1> </refentry> Index: phpdoc-fr/reference/oci8/functions/ocirowcount.xml diff -u phpdoc-fr/reference/oci8/functions/ocirowcount.xml:1.1 phpdoc-fr/reference/oci8/functions/ocirowcount.xml:1.2 --- phpdoc-fr/reference/oci8/functions/ocirowcount.xml:1.1 Sun Apr 14 20:35:29 2002 +++ phpdoc-fr/reference/oci8/functions/ocirowcount.xml Mon Feb 10 22:14:20 2003 @@ -3,8 +3,8 @@ <!-- last change to 'ocirowcount' in en/ tree in rev 1.2 --> <refentry id="function.ocirowcount"> <refnamediv> - <refname>ociRowCount</refname> - <refpurpose>Retourne le nombre de lignes affectées.</refpurpose> + <refname>ocirowcount</refname> + <refpurpose>Retourne le nombre de lignes affectées</refpurpose> </refnamediv> <refsect1> <title>Description</title> @@ -14,32 +14,34 @@ </methodsynopsis> <para> <function>ocirowcount</function> retourne le nombre de lignes - affectées par une commande de modification. Cette fonction - ne vous indiquera pas le nombre de lignes retournées par + affectées par la commande de modification (UPDATE) <parameter>statement</parameter>. + Cette fonction ne vous indiquera pas le nombre de lignes retournées par un SELECT : il faut que les lignes aient été modifiées. </para> <para> <example> - <title>ociRowCount</title> + <title>Exemple avec <function>ocirowcount</function></title> <programlisting role="php"> -<?php - print "<HTML><PRE>"; - $conn = ociLogon("scott","tiger"); - $stmt = ociparse($conn,"create table emp2 as select * from emp"); - ociexecute($stmt); - print ociRowCount($stmt) . " rows inserted.<br>"; - ociFreeStatement($stmt); - $stmt = ociparse($conn,"delete from emp2"); - ociexecute($stmt); - print ociRowCount($stmt) . " rows deleted.<br>"; - ociCommit($conn); - ociFreeStatement($stmt); - $stmt = ociparse($conn,"drop table emp2"); - ociexecute($stmt); - ociFreeStatement($stmt); - ociLogOff($conn); - print "</PRE></HTML>"; -?> +<![CDATA[ +<?php + print "<HTML><PRE>"; + $conn = OCILogon("scott","tiger"); + $stmt = OCIParse($conn,"create table emp2 as select * from emp"); + OCIExecute($stmt); + print OCIRowCount($stmt) . " rows inserted.<BR>"; + OCIFreeStatement($stmt); + $stmt = OCIParse($conn,"delete from emp2"); + OCIExecute($stmt); + print OCIRowCount($stmt) . " rows deleted.<BR>"; + OCICommit($conn); + OCIFreeStatement($stmt); + $stmt = OCIParse($conn,"drop table emp2"); + OCIExecute($stmt); + OCIFreeStatement($stmt); + OCILogOff($conn); + print "</PRE></HTML>"; +?> +]]> </programlisting> </example> </para> Index: phpdoc-fr/reference/oci8/functions/ocisavelob.xml diff -u phpdoc-fr/reference/oci8/functions/ocisavelob.xml:1.1 phpdoc-fr/reference/oci8/functions/ocisavelob.xml:1.2 --- phpdoc-fr/reference/oci8/functions/ocisavelob.xml:1.1 Sun Apr 14 20:35:29 2002 +++ phpdoc-fr/reference/oci8/functions/ocisavelob.xml Mon Feb 10 22:14:20 2003 @@ -3,17 +3,17 @@ <!-- last change to 'ocisavelob' in en/ tree in rev 1.23 --> <refentry id="function.ocisavelob"> <refnamediv> - <refname>OCISaveLob</refname> - <refpurpose>Bientôt documenté....</refpurpose> + <refname>ocisavelob</refname> + <refpurpose>Sauve un LOB</refpurpose> </refnamediv> <refsect1> <title>Description</title> <methodsynopsis> - <type>string</type><methodname>ocisavelob</methodname> + <type>bool</type><methodname>ocisavelob</methodname> <methodparam><type>object</type><parameter>lob</parameter></methodparam> </methodsynopsis> <simpara> - Bientôt documenté.... + &warn.undocumented.func; </simpara> </refsect1> </refentry> Index: phpdoc-fr/reference/oci8/functions/ocisavelobfile.xml diff -u phpdoc-fr/reference/oci8/functions/ocisavelobfile.xml:1.1 phpdoc-fr/reference/oci8/functions/ocisavelobfile.xml:1.2 --- phpdoc-fr/reference/oci8/functions/ocisavelobfile.xml:1.1 Sun Apr 14 20:35:30 2002 +++ phpdoc-fr/reference/oci8/functions/ocisavelobfile.xml Mon Feb 10 22:14:20 2003 @@ -3,17 +3,17 @@ <!-- last change to 'ocisavelobfile' in en/ tree in rev 1.23 --> <refentry id="function.ocisavelobfile"> <refnamediv> - <refname>OCISaveLobFile</refname> - <refpurpose>Bientôt documenté....</refpurpose> + <refname>ocisavelobfile</refname> + <refpurpose>Sauve un LOB fichier</refpurpose> </refnamediv> <refsect1> <title>Description</title> <methodsynopsis> - <type>string</type><methodname>ocisavelobfile</methodname> + <type>bool</type><methodname>ocisavelobfile</methodname> <methodparam><type>object</type><parameter>lob</parameter></methodparam> </methodsynopsis> <simpara> - Bientôt documenté.... + &warn.undocumented.func; </simpara> </refsect1> </refentry> Index: phpdoc-fr/reference/oci8/functions/ociserverversion.xml diff -u phpdoc-fr/reference/oci8/functions/ociserverversion.xml:1.1 phpdoc-fr/reference/oci8/functions/ociserverversion.xml:1.2 --- phpdoc-fr/reference/oci8/functions/ociserverversion.xml:1.1 Sun Apr 14 20:35:30 2002 +++ phpdoc-fr/reference/oci8/functions/ociserverversion.xml Mon Feb 10 22:14:20 2003 @@ -3,9 +3,9 @@ <!-- last change to 'ociserverversion' in en/ tree in rev 1.2 --> <refentry id="function.ociserverversion"> <refnamediv> - <refname>ociServerVersion</refname> + <refname>ociserverversion</refname> <refpurpose> - Retourne une chaîne contenant les informations de version du serveur. + Retourne une chaîne contenant les informations de version du serveur Oracle </refpurpose> </refnamediv> <refsect1> @@ -16,15 +16,18 @@ </methodsynopsis> <para> <function>ociserverversion</function> retourne une chaîne contenant les - informations de version du serveur + informations de version du serveur Oracle, identifié par la connexion + <parameter>conn</parameter>. <example> <title>Exemple avec <function>ociserverversion</function></title> <programlisting role="php"> -<?php - $conn = ociLogon("scott","tiger"); - print "Version du serveur : " . ociServerVersion($conn); - ociLogOff($conn); -?> +<![CDATA[ +<?php + $conn = OCILogon("scott","tiger"); + print "Version du serveur Oracle : " . OCIServerVersion($conn); + OCILogOff($conn); +?> +]]> </programlisting> </example> </para> Index: phpdoc-fr/reference/oci8/functions/ocisetprefetch.xml diff -u phpdoc-fr/reference/oci8/functions/ocisetprefetch.xml:1.1 phpdoc-fr/reference/oci8/functions/ocisetprefetch.xml:1.2 --- phpdoc-fr/reference/oci8/functions/ocisetprefetch.xml:1.1 Sun Apr 14 20:35:30 2002 +++ phpdoc-fr/reference/oci8/functions/ocisetprefetch.xml Mon Feb 10 22:14:20 2003 @@ -14,8 +14,10 @@ <methodparam><type>int</type><parameter>rows</parameter></methodparam> </methodsynopsis> <simpara> - <function>ocisetprefetch</function> indique le nombre des premières lignes - qui doivent être pré-lues. La valeur par défaut est de 1. + <function>ocisetprefetch</function> spécifie le nombre des premières lignes + qui doivent être pré-lues à <parameter>rows</parameter> pour la + connexion Oracle <parameter>stmt</parameter>. La valeur par défaut + de <parameter>rows</parameter> est 1 ligne. </simpara> </refsect1> </refentry> Index: phpdoc-fr/reference/oci8/functions/ocistatementtype.xml diff -u phpdoc-fr/reference/oci8/functions/ocistatementtype.xml:1.1 phpdoc-fr/reference/oci8/functions/ocistatementtype.xml:1.2 --- phpdoc-fr/reference/oci8/functions/ocistatementtype.xml:1.1 Sun Apr 14 20:35:30 2002 +++ phpdoc-fr/reference/oci8/functions/ocistatementtype.xml Mon Feb 10 22:14:20 2003 @@ -3,8 +3,8 @@ <!-- last change to 'ocistatementtype' in en/ tree in rev 1.2 --> <refentry id="function.ocistatementtype"> <refnamediv> - <refname>ociStatementType</refname> - <refpurpose>Retourne le type de commande OCI.</refpurpose> + <refname>ocistatementtype</refname> + <refpurpose>Retourne le type de commande OCI</refpurpose> </refnamediv> <refsect1> <title>Description</title> @@ -15,33 +15,37 @@ <para> <function>ocistatementtype</function> retourne une des valeurs suivantes : <orderedlist> - <listitem><simpara>"SELECT"</simpara></listitem> - <listitem><simpara>"UPDATE"</simpara></listitem> - <listitem><simpara>"DELETE"</simpara></listitem> - <listitem><simpara>"INSERT"</simpara></listitem> - <listitem><simpara>"CREATE"</simpara></listitem> - <listitem><simpara>"DROP"</simpara></listitem> - <listitem><simpara>"ALTER"</simpara></listitem> - <listitem><simpara>"BEGIN"</simpara></listitem> - <listitem><simpara>"DECLARE"</simpara></listitem> - <listitem><simpara>"UNKNOWN"</simpara></listitem> + <listitem><simpara><literal>SELECT</literal></simpara></listitem> + <listitem><simpara><literal>UPDATE</literal></simpara></listitem> + <listitem><simpara><literal>DELETE</literal></simpara></listitem> + <listitem><simpara><literal>INSERT</literal></simpara></listitem> + <listitem><simpara><literal>CREATE</literal></simpara></listitem> + <listitem><simpara><literal>DROP</literal></simpara></listitem> + <listitem><simpara><literal>ALTER</literal></simpara></listitem> + <listitem><simpara><literal>BEGIN</literal></simpara></listitem> + <listitem><simpara><literal>DECLARE</literal></simpara></listitem> + <listitem><simpara><literal>UNKNOWN</literal></simpara></listitem> </orderedlist> </para> <para> <example> - <title>Exemples</title> + <title>Exemple avec <function>ocistatementtype</function></title> <programlisting role="php"> -<?php - print "<HTML><PRE>"; - $conn = ociLogon("scott","tiger"); +<![CDATA[ +<?php + print "<HTML><PRE>"; + $conn = OCILogon("scott","tiger"); $sql = "delete from emp where deptno = 10"; - $stmt = ociparse($conn,$sql); - if ( ociStatementType($stmt) == "DELETE" ) { - die "Vous n'etes pas autorisé à effacer dans cette table.<BR>"; + + $stmt = OCIParse($conn,$sql); + if ( OCIStatementType($stmt) == "DELETE" ) { + die "Nous n'êtes pas autorisés à effacer des lignes dans cette table<BR>"; } - ociLogoff($conn); - print "</PRE></HTML>"; -?> + + OCILogoff($conn); + print "</PRE></HTML>"; +?> +]]> </programlisting> </example> </para> Index: phpdoc-fr/reference/oci8/functions/ociwritelobtofile.xml diff -u phpdoc-fr/reference/oci8/functions/ociwritelobtofile.xml:1.1 phpdoc-fr/reference/oci8/functions/ociwritelobtofile.xml:1.2 --- phpdoc-fr/reference/oci8/functions/ociwritelobtofile.xml:1.1 Sun Apr 14 20:35:30 2002 +++ phpdoc-fr/reference/oci8/functions/ociwritelobtofile.xml Mon Feb 10 22:14:20 2003 @@ -3,20 +3,20 @@ <!-- last change to 'ociwritelobtofile' in en/ tree in rev 1.23 --> <refentry id="function.ociwritelobtofile"> <refnamediv> - <refname>OCIWriteLobToFile</refname> - <refpurpose>Bientôt documenté....</refpurpose> + <refname>ociwritelobtofile</refname> + <refpurpose>Ecrit un LOB dans un fichier</refpurpose> </refnamediv> <refsect1> <title>Description</title> <methodsynopsis> - <type>void</type><methodname>ociwritelobtofile</methodname> + <type>bool</type><methodname>ociwritelobtofile</methodname> <methodparam><type>object</type><parameter>lob</parameter></methodparam> <methodparam choice="opt"><type>string</type><parameter>filename</parameter></methodparam> <methodparam choice="opt"><type>int</type><parameter>start</parameter></methodparam> <methodparam choice="opt"><type>int</type><parameter>lenght</parameter></methodparam> </methodsynopsis> <simpara> - Bientôt documenté.... + &warn.undocumented.func; </simpara> </refsect1> </refentry>