From 2f5bac1c8cad435f3e729fd6c04bbaefe7b03b04 Mon Sep 17 00:00:00 2001 From: lacatoire Date: Thu, 26 Feb 2026 16:01:54 +0100 Subject: [PATCH 1/2] Remove obsolete OCI8 function files These 48 files document OCI8 functions that no longer exist in doc-en. OCI8 was moved to PECL in PHP 8.4, and the EN documentation was cleaned up accordingly. These IT translations are now orphaned. Source: https://doc.php.net/revcheck.php?p=oldfiles&lang=it --- reference/oci8/functions/oci-bind-by-name.xml | 889 ------------------ reference/oci8/functions/oci-cancel.xml | 65 -- reference/oci8/functions/ocicancel.xml | 43 - reference/oci8/functions/ocicollappend.xml | 42 - reference/oci8/functions/ocicollassign.xml | 42 - .../oci8/functions/ocicollassignelem.xml | 43 - reference/oci8/functions/ocicollgetelem.xml | 43 - reference/oci8/functions/ocicollmax.xml | 42 - reference/oci8/functions/ocicollsize.xml | 42 - reference/oci8/functions/ocicolltrim.xml | 43 - reference/oci8/functions/ocicolumnisnull.xml | 47 - reference/oci8/functions/ocicolumnname.xml | 86 -- .../oci8/functions/ocicolumnprecision.xml | 43 - reference/oci8/functions/ocicolumnscale.xml | 43 - reference/oci8/functions/ocicolumnsize.xml | 88 -- reference/oci8/functions/ocicolumntype.xml | 87 -- reference/oci8/functions/ocicolumntyperaw.xml | 43 - reference/oci8/functions/ocicommit.xml | 79 -- reference/oci8/functions/ocidefinebyname.xml | 88 -- reference/oci8/functions/ocierror.xml | 49 - reference/oci8/functions/ociexecute.xml | 51 - reference/oci8/functions/ocifetch.xml | 43 - reference/oci8/functions/ocifetchinto.xml | 96 -- .../oci8/functions/ocifetchstatement.xml | 89 -- .../oci8/functions/ocifreecollection.xml | 42 - reference/oci8/functions/ocifreecursor.xml | 45 - reference/oci8/functions/ocifreedesc.xml | 43 - reference/oci8/functions/ocifreestatement.xml | 45 - reference/oci8/functions/ociinternaldebug.xml | 46 - reference/oci8/functions/ociloadlob.xml | 42 - reference/oci8/functions/ocilogoff.xml | 50 - reference/oci8/functions/ocilogon.xml | 147 --- reference/oci8/functions/ocinewcollection.xml | 44 - reference/oci8/functions/ocinewcursor.xml | 115 --- reference/oci8/functions/ocinewdescriptor.xml | 159 ---- reference/oci8/functions/ocinlogon.xml | 152 --- reference/oci8/functions/ocinumcols.xml | 72 -- reference/oci8/functions/ociparse.xml | 48 - reference/oci8/functions/ociplogon.xml | 57 -- reference/oci8/functions/ociresult.xml | 47 - reference/oci8/functions/ocirollback.xml | 47 - reference/oci8/functions/ocirowcount.xml | 71 -- reference/oci8/functions/ocisavelob.xml | 42 - reference/oci8/functions/ocisavelobfile.xml | 42 - reference/oci8/functions/ociserverversion.xml | 54 -- reference/oci8/functions/ocisetprefetch.xml | 44 - reference/oci8/functions/ocistatementtype.xml | 76 -- .../oci8/functions/ociwritelobtofile.xml | 45 - 48 files changed, 3801 deletions(-) delete mode 100644 reference/oci8/functions/oci-bind-by-name.xml delete mode 100644 reference/oci8/functions/oci-cancel.xml delete mode 100644 reference/oci8/functions/ocicancel.xml delete mode 100644 reference/oci8/functions/ocicollappend.xml delete mode 100644 reference/oci8/functions/ocicollassign.xml delete mode 100644 reference/oci8/functions/ocicollassignelem.xml delete mode 100644 reference/oci8/functions/ocicollgetelem.xml delete mode 100644 reference/oci8/functions/ocicollmax.xml delete mode 100644 reference/oci8/functions/ocicollsize.xml delete mode 100644 reference/oci8/functions/ocicolltrim.xml delete mode 100644 reference/oci8/functions/ocicolumnisnull.xml delete mode 100644 reference/oci8/functions/ocicolumnname.xml delete mode 100644 reference/oci8/functions/ocicolumnprecision.xml delete mode 100644 reference/oci8/functions/ocicolumnscale.xml delete mode 100644 reference/oci8/functions/ocicolumnsize.xml delete mode 100644 reference/oci8/functions/ocicolumntype.xml delete mode 100644 reference/oci8/functions/ocicolumntyperaw.xml delete mode 100644 reference/oci8/functions/ocicommit.xml delete mode 100644 reference/oci8/functions/ocidefinebyname.xml delete mode 100644 reference/oci8/functions/ocierror.xml delete mode 100644 reference/oci8/functions/ociexecute.xml delete mode 100644 reference/oci8/functions/ocifetch.xml delete mode 100644 reference/oci8/functions/ocifetchinto.xml delete mode 100644 reference/oci8/functions/ocifetchstatement.xml delete mode 100644 reference/oci8/functions/ocifreecollection.xml delete mode 100644 reference/oci8/functions/ocifreecursor.xml delete mode 100644 reference/oci8/functions/ocifreedesc.xml delete mode 100644 reference/oci8/functions/ocifreestatement.xml delete mode 100644 reference/oci8/functions/ociinternaldebug.xml delete mode 100644 reference/oci8/functions/ociloadlob.xml delete mode 100644 reference/oci8/functions/ocilogoff.xml delete mode 100644 reference/oci8/functions/ocilogon.xml delete mode 100644 reference/oci8/functions/ocinewcollection.xml delete mode 100644 reference/oci8/functions/ocinewcursor.xml delete mode 100644 reference/oci8/functions/ocinewdescriptor.xml delete mode 100644 reference/oci8/functions/ocinlogon.xml delete mode 100644 reference/oci8/functions/ocinumcols.xml delete mode 100644 reference/oci8/functions/ociparse.xml delete mode 100644 reference/oci8/functions/ociplogon.xml delete mode 100644 reference/oci8/functions/ociresult.xml delete mode 100644 reference/oci8/functions/ocirollback.xml delete mode 100644 reference/oci8/functions/ocirowcount.xml delete mode 100644 reference/oci8/functions/ocisavelob.xml delete mode 100644 reference/oci8/functions/ocisavelobfile.xml delete mode 100644 reference/oci8/functions/ociserverversion.xml delete mode 100644 reference/oci8/functions/ocisetprefetch.xml delete mode 100644 reference/oci8/functions/ocistatementtype.xml delete mode 100644 reference/oci8/functions/ociwritelobtofile.xml diff --git a/reference/oci8/functions/oci-bind-by-name.xml b/reference/oci8/functions/oci-bind-by-name.xml deleted file mode 100644 index 3a57f4c91..000000000 --- a/reference/oci8/functions/oci-bind-by-name.xml +++ /dev/null @@ -1,889 +0,0 @@ - - - - - - oci_bind_by_name - Effettua il binding di una variabile PHP a un segnaposto Oracle - - - - &reftitle.description; - - booloci_bind_by_name - resourcestatement - stringparam - mixedvar - intmax_length-1 - inttype0 - - - Associa una variabile PHP var al segnaposto per - la variabile di bind Oracle param. Il binding - è importante per le prestazioni del database Oracle e anche come metodo per - evitare problemi di sicurezza legati all'SQL Injection. - - - - Il binding consente al database di riutilizzare il contesto della dichiarazione e - le cache dalle esecuzioni precedenti della dichiarazione, anche se un altro - utente o processo l'ha inizialmente eseguita. Il binding riduce i rischi - legati all'SQL Injection, perché i dati associati a una variabile - di bind non sono mai trattati come parte della dichiarazione SQL. Non - è necessaria né il quoting né l'escaping. - - - - Le variabili PHP sui cui è stato effettuato il binding possono essere modificate e la - dichiarazione rieseguita senza bisogno di rieffettuare il parsing della dichiarazione o - di rifare il bind. - - - - In Oracle, le variabili di bind sono comunemente suddivise - in bind IN per i valori che vengono passati nel - database, e bind OUT per i valori che vengono - restituiti a PHP. Una variabile di bind può essere - sia IN che OUT. Se una - variabile di bind verrà utilizzata per l'input o per l'output viene determinato in - fase di esecuzione. - - - - Bisogna specificare max_length quando si utilizza - un bind OUT affinché PHP possa allocare abbastanza memoria - per contenere il valore restituito. - - - - Per i bind IN, è consigliato impostare - la lunghezza di max_length se la dichiarazione viene - rieseguita più volte con valori differenti per la variabile - PHP. Altrimenti Oracle potrebbe troncare i dati alla lunghezza del - valore iniziale della variabile PHP. Se non si conosce quale sarà la lunghezza - massima, richiamare di nuovo oci_bind_by_name - con la dimensione dei dati correnti prima di - ogni chiamata a oci_execute. Un binding con una - lunghezza eccessivamente grande avrà un impatto sulla memoria del processo - nel database. - - - - Una chiamata al bind indica a Oracle da quale indirizzo di memoria leggere i dati. - Per i bind IN, questo indirizzo deve contenere - dati validi quando viene chiamato oci_execute. Ciò - significa che la variabile su cui è stato fatto il binding deve rimanere in scope fino - all'esecuzione. Se non rimane in scope, potrebbero verificarsi risultati imprevisti - o errori come - "ORA-01460: unimplemented or unreasonable conversion requested". Per i bind OUT, uno dei sintomi è che nessun - valore viene impostato nella variabile PHP. - - - - Per una dichiarazione che viene eseguita ripetutamente, effeettuare il binding di valori che - non cambiano mai potrebbe ridurre la capacità dell'ottimizzatore Oracle di - scegliere il piano di esecuzione migliore. Le dichiarazioni di lunga durata - che vengono rieseguite raramente potrebbero non trarre vantaggio dal binding. Tuttavia, - in entrambi i casi, il binding potrebbe essere più sicuro rispetto all'unione di stringhe in una - dichiarazione SQL, poiché questo può rappresentare un rischio per la sicurezza se vengono concatenate - stringhe dell'utente non filtrate. - - - - - &reftitle.parameters; - - - - statement - - - Un identificatore valido di una dichiarazione OCI8. - - - - - param - - - Il segnaposto della variabile bind con prefisso due punti utilizzato nella - dichiarazione. Il due punti è opzionale - in param. Oracle non utilizza i punti interrogativi - per i segnaposti. - - - - - var - - - La variabile PHP da associare a param - - - - - max_length - - - Imposta la lunghezza massima per i dati. Se la imposti su -1, questa - funzione utilizzerà la lunghezza attuale - di var per impostare la lunghezza - massima. In questo caso, var deve - esistere e contenere dati - quando viene chiamato oci_bind_by_name. - - - - - type - - - Il tipo di dato che Oracle tratterà come tale. Il - tipo default utilizzato - è SQLT_CHR. Oracle convertirà i dati - tra questo tipo e la colonna del database (o il tipo di - variabile PL/SQL), se possibile. - - - Se devi associare un tipo di dato astratto (LOB/ROWID/BFILE), devi - prima allocarlo utilizzando la funzione - oci_new_descriptor. La - length non viene utilizzata per i tipi di dato astratti - e dovrebbe essere impostata su -1. - - - I valori possibili per type sono: - - - - SQLT_BFILEE o OCI_B_BFILE - - per i BFILE; - - - - - SQLT_CFILEE o OCI_B_CFILEE - - per i CFILE; - - - - - SQLT_CLOB o OCI_B_CLOB - - per i CLOB; - - - - - SQLT_BLOB o OCI_B_BLOB - - per i BLOB; - - - - - SQLT_RDD o OCI_B_ROWID - - per i ROWID; - - - - - SQLT_NTY o OCI_B_NTY - - per tipi di dati nominati; - - - - - SQLT_INT o OCI_B_INT - per gli interi; - - - - - SQLT_CHR - per i VARCHAR; - - - - - SQLT_BIN o OCI_B_BIN - - per le colonne RAW; - - - - - SQLT_LNG - per le colonne LONG; - - - - - SQLT_LBI - per le colonne LONG RAW; - - - - - SQLT_RSET - per i cursori creati - con oci_new_cursor; - - - - - SQLT_BOL o OCI_B_BOL - - per i BOOLEAN di PL/SQL (Richiede Oracle Database 12c) - - - - - - - - - - - - &reftitle.returnvalues; - - &return.success; - - - - - &reftitle.examples; - - - Inserimento di dati con <function>oci_bind_by_name</function> - - -]]> - - - - - - - Binding una sola volta per più esecuzioni - - -]]> - - - - - - - Binding con un ciclo <literal>foreach</literal> - - 'IT Support', ':loc' => 1700); - -foreach ($ba as $key => $val) { - - // oci_bind_by_name($stid, $key, $val) non funziona - // perché associa ogni segnaposto alla stessa posizione: $val - // invece usa la posizione effettiva dei dati: $ba[$key] - oci_bind_by_name($stid, $key, $ba[$key]); -} - -oci_execute($stid); -$row = oci_fetch_array($stid, OCI_ASSOC+OCI_RETURN_NULLS); -foreach ($row as $item) { - print $item."
\n"; -} - -oci_free_statement($stid); -oci_close($conn); - -?> -]]> -
-
-
- - - - Binding in una clausola WHERE - -\n"; -} - -// L'output è -// Austin -// Ernst -// Hunold -// Lorentz -// Pataballa - -oci_free_statement($stid); -oci_close($conn); - -?> -]]> - - - - - - - Binding con una clausola LIKE - -\n"; -} -// L'output è -// South Brunswick -// South San Francisco -// Southlake - -oci_free_statement($stid); -oci_close($conn); - -?> -]]> - - - - - - - Binding con REGEXP_LIKE - -\n"; -} -// L'output è -// Beijing -// Singapore - -oci_free_statement($stid); -oci_close($conn); - -?> -]]> - - - - - - Per un numero limitato e fisso di condizioni nella clausola IN, usare variabili - di bind individuali. I valori sconosciuti al momento dell'esecuzione possono essere impostati su NULL. - Questo permette di utilizzare una singola dichiarazione per tutti gli utenti - dell'applicazione, massimizzando l'efficienza della cache del database Oracle. - - - - - Binding di più valori in una clausola IN - -\n"; -} - -// L'output è: -// Ernst -// Hunold - -oci_free_statement($stid); -oci_close($conn); - -?> -]]> - - - - - - - Binding di un ROWID restituito da una query - - -]]> - - - - - - - Binding di un ROWID su INSERT - - "Larry", - 2222 => "Bill", - 3333 => "Jim"); - -// Stipendio per ogni persona -$salary = 10000; - -// Inserisce ed immediatamente aggiorna ogni riga -foreach ($data as $id => $name) { - oci_execute($ins_stid); - oci_execute($upd_stid); -} - -$rowid->free(); -oci_free_statement($upd_stid); -oci_free_statement($ins_stid); - -// Mostra le nuove righe -$stid = oci_parse($conn, "SELECT * FROM mytab"); -oci_execute($stid); -while ($row = oci_fetch_array($stid, OCI_ASSOC+OCI_RETURN_NULLS)) { - var_dump($row); -} - -oci_free_statement($stid); -oci_close($conn); - -?> -]]> - - - - - - - Binding per una stored function PL/SQL - - -]]> - - - - - - - Binding di parametri per una stored procedure PL/SQL - - -]]> - - - - - - - Binding di una colonna CLOB - -save("A very long string"); - -oci_commit($conn); - -// Recupero dei dati CLOB - -$query = 'SELECT myclob FROM mytab WHERE mykey = :mykey'; - -$stid = oci_parse ($conn, $query); -oci_bind_by_name($stid, ":mykey", $mykey, 5); -oci_execute($stid); - -print ''; -while ($row = oci_fetch_array($stid, OCI_ASSOC+OCI_RETURN_LOBS)) { - print ''; - // In un ciclo, liberare la variabile di grandi dimensioni prima del secondo fetch riduce l'utilizzo massimo della memoria da parte di PHP - unset($row); -} -print '
'.$row['MYCLOB'].'
'; - -?> -]]> -
-
-
- - - - Binding di un BOOLEAN PL/SQL - - -]]> - - - - -
- - - &reftitle.notes; - - - Non usare addslashes - e oci_bind_by_name contemporaneamente, in quanto non - è necessario nessun quoting. Qualsiasi tipo di quote applicato magicamente verrà scritto - nel tuo database, poiché oci_bind_by_name - inserisce i dati letteralmente e non rimuove le virgolette o i caratteri - di escape. - - - - - Se associ una stringa a una colonna CHAR in - una clausola WHERE, ricorda che Oracle utilizza - la semantica di confronto con padding vuoto per le colonne - CHAR. La tua variabile PHP dovrebbe essere riempita con spazi vuoti alla stessa - larghezza della colonna affinché la clausola WHERE abbia - successo. - - - - - L'argomento var di PHP è un riferimento. Alcune - forme di loop non funzionano come ci si aspetterebbe: - - - - $value) { - oci_bind_by_name($stid, $key, $value); -} -?> -]]> - - - - Questo associa ogni chiave alla posizione di $value, quindi tutte le variabili - legate finiscono per puntare al valore dell'ultima iterazione - del ciclo. Usa invece il seguente codice: - - - - $value) { - oci_bind_by_name($stid, $key, $myarray[$key]); -} -?> -]]> - - - - - - - &reftitle.seealso; - - - oci_bind_array_by_name - oci_parse - - - - -
- \ No newline at end of file diff --git a/reference/oci8/functions/oci-cancel.xml b/reference/oci8/functions/oci-cancel.xml deleted file mode 100644 index 92d71613f..000000000 --- a/reference/oci8/functions/oci-cancel.xml +++ /dev/null @@ -1,65 +0,0 @@ - - - - - oci_cancel - Interrompe la lettura del cursore - - - - &reftitle.description; - - booloci_cancel - resourcestatement - - - Invalida un cursore, rilasciando tutte le risorse associate e cancella - la possibilità di leggere da esso. - - - - - &reftitle.parameters; - - - - statement - - - Uno statement OCI. - - - - - - - - - &reftitle.returnvalues; - - &return.success; - - - - - - diff --git a/reference/oci8/functions/ocicancel.xml b/reference/oci8/functions/ocicancel.xml deleted file mode 100644 index 96bea18ae..000000000 --- a/reference/oci8/functions/ocicancel.xml +++ /dev/null @@ -1,43 +0,0 @@ - - - - - - - - ocicancel - Interrompe la lettura del cursore - - - Descrizione - - boolocicancel - resourcestmt - - - Se non si vogliono leggere altri dati da un cursore, chiamare - ocicancel. - - - - - diff --git a/reference/oci8/functions/ocicollappend.xml b/reference/oci8/functions/ocicollappend.xml deleted file mode 100644 index d31c669e6..000000000 --- a/reference/oci8/functions/ocicollappend.xml +++ /dev/null @@ -1,42 +0,0 @@ - - - - - - - - ocicollappend - Aggiunge un oggetto alla collezione - - - Descrizione - - boolocicollappend - objectvalore - - - &warn.undocumented.func; - - - - - diff --git a/reference/oci8/functions/ocicollassign.xml b/reference/oci8/functions/ocicollassign.xml deleted file mode 100644 index 86d05226a..000000000 --- a/reference/oci8/functions/ocicollassign.xml +++ /dev/null @@ -1,42 +0,0 @@ - - - - - - - - ocicollassign - Assegna una collezione da un'altra collezione esistente - - - Descrizione - - boolocicollassign - objectda - - - &warn.undocumented.func; - - - - - diff --git a/reference/oci8/functions/ocicollassignelem.xml b/reference/oci8/functions/ocicollassignelem.xml deleted file mode 100644 index c7c9498c3..000000000 --- a/reference/oci8/functions/ocicollassignelem.xml +++ /dev/null @@ -1,43 +0,0 @@ - - - - - - - - ocicollassignelem - Assegna un elemento alla collezione in una specifica posizione - - - Descrizione - - boolocicollassignelem - intndx - stringval - - - &warn.undocumented.func; - - - - - diff --git a/reference/oci8/functions/ocicollgetelem.xml b/reference/oci8/functions/ocicollgetelem.xml deleted file mode 100644 index a0bca3f52..000000000 --- a/reference/oci8/functions/ocicollgetelem.xml +++ /dev/null @@ -1,43 +0,0 @@ - - - - - - - - ocicollgetelem - Coming soon - - - Descrizione - - stringocicollgetelem - objectcollection - stringndx - - - &warn.undocumented.func; - - - - - diff --git a/reference/oci8/functions/ocicollmax.xml b/reference/oci8/functions/ocicollmax.xml deleted file mode 100644 index b640221a8..000000000 --- a/reference/oci8/functions/ocicollmax.xml +++ /dev/null @@ -1,42 +0,0 @@ - - - - - - - - ocicollmax - Coming soon - - - Descrizione - - intocicollmax - objectcollection - - - &warn.undocumented.func; - - - - - diff --git a/reference/oci8/functions/ocicollsize.xml b/reference/oci8/functions/ocicollsize.xml deleted file mode 100644 index 0acfcbc4b..000000000 --- a/reference/oci8/functions/ocicollsize.xml +++ /dev/null @@ -1,42 +0,0 @@ - - - - - - - - ocicollsize - Coming soon - - - Descrizione - - intocicollsize - objectcollection - - - &warn.undocumented.func; - - - - - diff --git a/reference/oci8/functions/ocicolltrim.xml b/reference/oci8/functions/ocicolltrim.xml deleted file mode 100644 index 93fac3759..000000000 --- a/reference/oci8/functions/ocicolltrim.xml +++ /dev/null @@ -1,43 +0,0 @@ - - - - - - - - ocicolltrim - Coming soon - - - Descrizione - - boolocicolltrim - objectcollection - intnum - - - &warn.undocumented.func; - - - - - diff --git a/reference/oci8/functions/ocicolumnisnull.xml b/reference/oci8/functions/ocicolumnisnull.xml deleted file mode 100644 index 6335ab046..000000000 --- a/reference/oci8/functions/ocicolumnisnull.xml +++ /dev/null @@ -1,47 +0,0 @@ - - - - - - - - ocicolumnisnull - Verifica se un campo di risultato è &null; - - - Descrizione - - boolocicolumnisnull - resourcestmt - mixedcol - - - ocicolumnisnull restituisce &true; se il - campo col nel risultato dell'istruzione - stmt è &null;. Si può usare il - numero del campo (primo campo=1) o il nome del campo per il - parametro col. - - - - - diff --git a/reference/oci8/functions/ocicolumnname.xml b/reference/oci8/functions/ocicolumnname.xml deleted file mode 100644 index 08a11523a..000000000 --- a/reference/oci8/functions/ocicolumnname.xml +++ /dev/null @@ -1,86 +0,0 @@ - - - - - - - - ocicolumnname - Restituisce il nome di un campo - - - Descrizione - - stringocicolumnname - intstmt - intcol - - - ocicolumnname restituisce il nome del campo - corrispondente alla posizione (1 = primo campo) specificata. - - - - esempio di <function>ocicolumnname</function> - -
\n";   
-    $conn = OCILogon("scott", "tiger");
-    $stmt = OCIParse($conn,"select * from emp");
-    OCIExecute($stmt);
-    print "";
-    print "";
-    print "";
-    print "";
-    print "";
-    print "";
-    $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 "";
-        print "";
-        print "";
-        print "";
-        print "";
-    }
-    print "
NameTypeLength
$column_name$column_type$column_size
\n"; - OCIFreeStatement($stmt); - OCILogoff($conn); - print "
"; - print "\n"; -?> -]]> -
-
-
- - Vedere anche ocinumcols, - ocicolumntype, - e ocicolumnsize. - -
-
- - diff --git a/reference/oci8/functions/ocicolumnprecision.xml b/reference/oci8/functions/ocicolumnprecision.xml deleted file mode 100644 index 25c01aac1..000000000 --- a/reference/oci8/functions/ocicolumnprecision.xml +++ /dev/null @@ -1,43 +0,0 @@ - - - - - - - - ocicolumnprecision - Coming soon - - - Descrizione - - intocicolumnprecision - intstmt - intcol - - - &warn.undocumented.func; - - - - - diff --git a/reference/oci8/functions/ocicolumnscale.xml b/reference/oci8/functions/ocicolumnscale.xml deleted file mode 100644 index 6c8a36123..000000000 --- a/reference/oci8/functions/ocicolumnscale.xml +++ /dev/null @@ -1,43 +0,0 @@ - - - - - - - - ocicolumnscale - Coming soon - - - Descrizione - - intocicolumnscale - intstmt - intcol - - - &warn.undocumented.func; - - - - - diff --git a/reference/oci8/functions/ocicolumnsize.xml b/reference/oci8/functions/ocicolumnsize.xml deleted file mode 100644 index 469877fd3..000000000 --- a/reference/oci8/functions/ocicolumnsize.xml +++ /dev/null @@ -1,88 +0,0 @@ - - - - - - - - ocicolumnsize - Restituisce la dimensione del campo - - - Descrizione - - intocicolumnsize - intstmt - mixedcolumn - - - ocicolumnsize restituisce la dimensione del campo - come riportata da Oracle. Si può usare il - numero del campo (primo campo=1) o il nome del campo per - il parametro col. - - - - esempio di <function>ocicolumnsize</function> - -
\n";
-    $conn = OCILogon("scott", "tiger");
-    $stmt = OCIParse($conn,"select * from emp");
-    OCIExecute($stmt);
-    print "";
-    print "";
-    print "";
-    print "";
-    print "";
-    print "";
-    $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 "";
-        print "";
-        print "";
-        print "";
-        print "";
-    }
-    print "
NameTypeLength
$column_name$column_type$column_size
"; - OCIFreeStatement($stmt); - OCILogoff($conn); - print "
"; - print "\n"; -?> -]]> -
-
-
- - Vedere anche ocinumcols, - ocicolumnname e - ocicolumnsize. - -
-
- - diff --git a/reference/oci8/functions/ocicolumntype.xml b/reference/oci8/functions/ocicolumntype.xml deleted file mode 100644 index cf3b19106..000000000 --- a/reference/oci8/functions/ocicolumntype.xml +++ /dev/null @@ -1,87 +0,0 @@ - - - - - - - - ocicolumntype - Restituisce il tipo di dati di un campo - - - Descrizione - - mixedocicolumntype - intstmt - intcol - - - ocicolumntype restituisce il tipo del campo - corrispondente alla posizione (1 = primo campo) - specificata. - - - - OCIColumnType - -
\n";   
-    $conn = OCILogon("scott", "tiger");
-    $stmt = OCIParse($conn,"select * from emp");
-    OCIExecute($stmt);
-    print "";
-    print "";
-    print "";
-    print "";
-    print "";
-    print "";
-    $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 "";
-        print "";
-        print "";
-        print "";
-        print "";
-    }
-    print "
NameTypeLength
$column_name$column_type$column_size
\n"; - OCIFreeStatement($stmt); - OCILogoff($conn); - print "
"; - print "\n"; -?> -]]> -
-
-
- - Vedere anche ocinumcols, - ocicolumnname, - e ocicolumnsize. - -
-
- - diff --git a/reference/oci8/functions/ocicolumntyperaw.xml b/reference/oci8/functions/ocicolumntyperaw.xml deleted file mode 100644 index 953bc9bd6..000000000 --- a/reference/oci8/functions/ocicolumntyperaw.xml +++ /dev/null @@ -1,43 +0,0 @@ - - - - - - - - ocicolumntyperaw - Coming soon - - - Descrizione - - mixedocicolumntyperaw - intstmt - intcol - - - &warn.undocumented.func; - - - - - diff --git a/reference/oci8/functions/ocicommit.xml b/reference/oci8/functions/ocicommit.xml deleted file mode 100644 index 15a2c1552..000000000 --- a/reference/oci8/functions/ocicommit.xml +++ /dev/null @@ -1,79 +0,0 @@ - - - - - - - - OCICommit - Esegue le transazioni in sospeso - - - Descrizione - - boolOCICommit - intconnection - - - ocicommit esegue tutte le transazioni in sospeso - sulla connessione Oracle connection. - &return.success; - - - Questo esempio dimostra l'utilizzo di OCICommit. - - OCICommit - - -]]> - - - - - Vedere anche ocirollback. - - - - - diff --git a/reference/oci8/functions/ocidefinebyname.xml b/reference/oci8/functions/ocidefinebyname.xml deleted file mode 100644 index 7b7c16204..000000000 --- a/reference/oci8/functions/ocidefinebyname.xml +++ /dev/null @@ -1,88 +0,0 @@ - - - - - - - - OCIDefineByName - - Utilizza una variabile PHP per la fase di definizione in un comando SELECT - - - - Descrizione - - boolocidefinebyname - intstmt - stringColumn-Name - mixedvariable - inttype - - - ocidefinebyname aggancia le variabili PHP ai - campi SQL. Attenzione: Oracle usa nomi di colonna MAIUSCOLI, - mentre nella SELECT si possono anche scrivere minuscoli. - ocidefinebyname vuole - il parametro Column-Name in caratteri maiuscoli. Se si - definisce una variabile che non esiste nel comando SELECT, non - viene dato alcun errore! - - - Se occorre definire un tipo di dati astratto (LOB/ROWID/BFILE) - lo si deve prima allocare usando la funzione - OCINewDescriptor. Vedere anche la - funzione OCIBindByName. - - - OCIDefineByName - - -]]> - - - - - - diff --git a/reference/oci8/functions/ocierror.xml b/reference/oci8/functions/ocierror.xml deleted file mode 100644 index 3f7f3f150..000000000 --- a/reference/oci8/functions/ocierror.xml +++ /dev/null @@ -1,49 +0,0 @@ - - - - - - - - OCIError - Restituisce l'ultimo errore di stmt|conn|global - - - Descrizione - - arrayOCIError - intstmt|conn|global - - - ocierror restituisce l'ultimo errore. Se - il parametro opzionale stmt|conn|global non è - specificato, viene restituito l'ultimo errore generato. Se non ci sono - errori, ocierror restituisce - &false;. ocierror restituisce l'errore in un - array associativo. In questo array, code - dà il codice d'errora oracle e message - dà la stringa d'errore. - - - - - diff --git a/reference/oci8/functions/ociexecute.xml b/reference/oci8/functions/ociexecute.xml deleted file mode 100644 index 0e4dd58c4..000000000 --- a/reference/oci8/functions/ociexecute.xml +++ /dev/null @@ -1,51 +0,0 @@ - - - - - - - - ociexecute - Esegue un comando SQL - - - Descrizione - - intociexecute - intstatement - intmode - - - ociexecute esegue un comando precedentemente - analizzato. (vedere ociparse). Il parametro opzionale - mode permette di specificare la modalità - di esecuzione (il default è OCI_COMMIT_ON_SUCCESS). Se non si - desidera che i comandi eseguano un commit automatico, usare OCI_DEFAULT nella - variabile mode. - - - &return.success; - - - - - diff --git a/reference/oci8/functions/ocifetch.xml b/reference/oci8/functions/ocifetch.xml deleted file mode 100644 index 383c203af..000000000 --- a/reference/oci8/functions/ocifetch.xml +++ /dev/null @@ -1,43 +0,0 @@ - - - - - - - - ocifetch - Estrae la prossima tupla opnendola nel buffer di risultato. - - - Descrizione - - boolocifetch - intstatement - - - ocifetch estrae la prossima tupla (nelle istruzioni SELECT) - ponendola nel buffer interno di risultato. - - - - - diff --git a/reference/oci8/functions/ocifetchinto.xml b/reference/oci8/functions/ocifetchinto.xml deleted file mode 100644 index d32afa5a4..000000000 --- a/reference/oci8/functions/ocifetchinto.xml +++ /dev/null @@ -1,96 +0,0 @@ - - - - - - - - ocifetchinto - Estrae la prossima tupla ponendola in un array - - - Descrizione - - intocifetchinto - intstmt - array&result - intmode - - - ocifetchinto estrae la prossima tupla (nelle istruzioni - SELECT) ponendola nell'array result. - ocifetchinto sovrascriverà il precedente - contenuto di result. Di default - result conterrà un array (primo indice = 1) di tutti i campi - che non sono &null;. - - - Il parametro mode permette di cambiare il comportamento - predefinito. E' possibile specificare più di un'opzione sommandole - (es. OCI_ASSOC+OCI_RETURN_NULLS). Le opzioni valide - sono: - - - OCI_ASSOC Restituisce un array associativo. - - - OCI_NUM Restituisce un array indicizzato - (primo indice = 0). (DEFAULT) - - - OCI_RETURN_NULLS Restituisce anche i campi &null;. - - - OCI_RETURN_LOBS Restituisce il valore di un LOB - invece del descrittore. - - - - - - Un semplice esempio di <function>ocifetchinto</function> - - -]]> - - - - - Vedere anche ocifetch e - ociexecute. - - - - - diff --git a/reference/oci8/functions/ocifetchstatement.xml b/reference/oci8/functions/ocifetchstatement.xml deleted file mode 100644 index 6664a614e..000000000 --- a/reference/oci8/functions/ocifetchstatement.xml +++ /dev/null @@ -1,89 +0,0 @@ - - - - - - - - ocifetchstatement - Estrae tutte le tuple in un array - - - Descrizione - - intocifetchstatement - resourcestmt - array &variable - - - ocifetchstatement estrae tutte le tuple da un risultato - ponendole in un array definito dall'utente. - ocifetchstatement restituisce il numero di tuple - estratte. - - - Esempio di <function>ocifetchstatement</function> - - 0 ) { - print "\n"; - print "\n"; - while ( list( $key, $val ) = each( $results ) ) { - print "\n"; - } - print "\n"; - - for ( $i = 0; $i < $nrows; $i++ ) { - reset($results); - print "\n"; - while ( $column = each($results) ) { - $data = $column['value']; - print "\n"; - } - print "\n"; - } - print "
$key
$data[$i]
\n"; -} else { - echo "No data found
\n"; -} -print "$nrows Records Selected
\n"; - -OCIFreeStatement($stmt); -OCILogoff($conn); -?> -]]> -
-
-
-
- - diff --git a/reference/oci8/functions/ocifreecollection.xml b/reference/oci8/functions/ocifreecollection.xml deleted file mode 100644 index b33492a4e..000000000 --- a/reference/oci8/functions/ocifreecollection.xml +++ /dev/null @@ -1,42 +0,0 @@ - - - - - - - - ocifreecollection - Coming soon - - - Descrizione - - boolocifreecollection - objectlob - - - &warn.undocumented.func; - - - - - diff --git a/reference/oci8/functions/ocifreecursor.xml b/reference/oci8/functions/ocifreecursor.xml deleted file mode 100644 index ca452a096..000000000 --- a/reference/oci8/functions/ocifreecursor.xml +++ /dev/null @@ -1,45 +0,0 @@ - - - - - - - - ocifreecursor - - Libera tutte le risorse associate ad un cursore - - - - Descrizione - - intocifreecursor - intstmt - - - ocifreecursor libera tutte le risorse associate al - cursore stmt. &return.success; - - - - - diff --git a/reference/oci8/functions/ocifreedesc.xml b/reference/oci8/functions/ocifreedesc.xml deleted file mode 100644 index 89b44e8de..000000000 --- a/reference/oci8/functions/ocifreedesc.xml +++ /dev/null @@ -1,43 +0,0 @@ - - - - - - - - ocifreedesc - Cancella un descrittore di oggetto binario (LOB) - - - Descrizione - - boolocifreedesc - objectlob - - - ocifreedesc cancella il descrittore di oggetto binario - lob. &return.success; - - - - - diff --git a/reference/oci8/functions/ocifreestatement.xml b/reference/oci8/functions/ocifreestatement.xml deleted file mode 100644 index 536975f92..000000000 --- a/reference/oci8/functions/ocifreestatement.xml +++ /dev/null @@ -1,45 +0,0 @@ - - - - - - - - ocifreestatement - - Libera tutte le risorse associate ad un'istruzione - - - - Descrizione - - boolocifreestatement - resourcestmt - - - ocifreestatement libera tutte le risorse associate - all'istruzione stmt.&return.success; - - - - - diff --git a/reference/oci8/functions/ociinternaldebug.xml b/reference/oci8/functions/ociinternaldebug.xml deleted file mode 100644 index f07f37c46..000000000 --- a/reference/oci8/functions/ociinternaldebug.xml +++ /dev/null @@ -1,46 +0,0 @@ - - - - - - - - ociinternaldebug - - Abilita o disabilita la visualizzazione del debug interno. - - - - Descrizione - - voidociinternaldebug - intonoff - - - ociinternaldebug abilita la visualizzazione del debug interno. - Impostare onoff a 0 per spegnere - il debug, 1 per accenderlo. - - - - - diff --git a/reference/oci8/functions/ociloadlob.xml b/reference/oci8/functions/ociloadlob.xml deleted file mode 100644 index a00c36f48..000000000 --- a/reference/oci8/functions/ociloadlob.xml +++ /dev/null @@ -1,42 +0,0 @@ - - - - - - - - ociloadlob - Coming soon - - - Descrizione - - stringociloadlob - objectlob - - - &warn.undocumented.func; - - - - - diff --git a/reference/oci8/functions/ocilogoff.xml b/reference/oci8/functions/ocilogoff.xml deleted file mode 100644 index 6ab2b7d88..000000000 --- a/reference/oci8/functions/ocilogoff.xml +++ /dev/null @@ -1,50 +0,0 @@ - - - - - - - - ocilogoff - Disconnette da Oracle - - - Descrizione - - boolocilogoff - resourceconnessione - - - ocilogoff chiude la - connessione Oracle. - - - L'uso di ocilogoff normalmente non è necessario, - dal momento che i collegamenti non persistenti sono automaticamente chiusi alla fine - dell'esecuzione dello script. Vedere anche - liberare - le risorse - - - - - diff --git a/reference/oci8/functions/ocilogon.xml b/reference/oci8/functions/ocilogon.xml deleted file mode 100644 index 693133ca0..000000000 --- a/reference/oci8/functions/ocilogon.xml +++ /dev/null @@ -1,147 +0,0 @@ - - - - - - - - ocilogon - Stabilisce una connessione a Oracle - - - Descrizione - - intocilogon - stringusername - stringpassword - stringdb - - - ocilogon restituisce un identificatore di connessione - necessario per la maggior parte delle altre chiamate OCI. Il terzo parametro opzionale - può contenere il nome della istanza Oracle locale o il nome - della voce in tnsnames.ora a cui ci si vuole connettere. - Se il terzo parametro opzionale non è specificato, PHP usa la - variabile d'ambiente ORACLE_SID (istanza di Oracle) o TWO_TASK - (in tnsnames.ora) per determinare a quale database collegarsi. - - Le connessioni sono condivise a livello di pagina quando si usa - OCILogon. Questo significa che i commit e i - rollback avvengono su tutte le transazioni aperte nella pagina, anche se sono - state create connessioni multiple. - - - Questo esempio dimostra come le connessioni sono condivise. - - esempio di <function>ocilogon</function> - -
";
-$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))");
-  ociexecute($stmt);
-  echo $conn." created table\n\n";
-}
-
-function drop_table($conn)
-{ $stmt = ociparse($conn,"drop table scott.hallo");
-  ociexecute($stmt);
-  echo $conn." dropped table\n\n";
-}
-
-function insert_data($conn)
-{ $stmt = ociparse($conn,"insert into scott.hallo 
-            values('$conn' || ' ' || to_char(sysdate,'DD-MON-YY HH24:MI:SS'))");
-  ociexecute($stmt,OCI_DEFAULT);
-  echo $conn." inserted hallo\n\n";
-}
-
-function delete_data($conn)
-{ $stmt = ociparse($conn,"delete from scott.hallo");
-  ociexecute($stmt,OCI_DEFAULT);
-  echo $conn." deleted hallo\n\n";
-}
-
-function commit($conn)
-{ ocicommit($conn);
-  echo $conn." committed\n\n";
-}
-
-function rollback($conn)
-{ ocirollback($conn);
-  echo $conn." rollback\n\n";
-}
-
-function select_data($conn)
-{ $stmt = ociparse($conn,"select * from scott.hallo");
-  ociexecute($stmt,OCI_DEFAULT);
-  echo $conn."----selecting\n\n";
-  while (ocifetch($stmt))
-    echo $conn." <".ociresult($stmt,"TEST").">\n\n";
-  echo $conn."----done\n\n";
-}
-
-create_table($c1);
-insert_data($c1);   // Insert a row using c1
-insert_data($c2);   // Insert a row using c2
-
-select_data($c1);   // Results of both inserts are returned
-select_data($c2);   
-
-rollback($c1);      // Rollback using c1
-
-select_data($c1);   // Both inserts have been rolled back
-select_data($c2);   
-
-insert_data($c2);   // Insert a row using c2
-commit($c2);        // Commit using c2
-
-select_data($c1);   // Result of c2 insert is returned
-
-delete_data($c1);   // Delete all rows in table using c1
-select_data($c1);   // No rows returned
-select_data($c2);   // No rows returned
-commit($c1);        // Commit using c1
-
-select_data($c1);   // No rows returned
-select_data($c2);   // No rows returned
-
-drop_table($c1);
-print "
"; -?> -]]> -
-
-
- - Vedere anche ociplogon e - ocinlogon. -
-
- - diff --git a/reference/oci8/functions/ocinewcollection.xml b/reference/oci8/functions/ocinewcollection.xml deleted file mode 100644 index dda620cae..000000000 --- a/reference/oci8/functions/ocinewcollection.xml +++ /dev/null @@ -1,44 +0,0 @@ - - - - - - - - ocinewcollection - Coming soon - - - Descrizione - - boolocinewcollection - intconn - stringtdo - stringshema - - - &warn.undocumented.func; - - - - - diff --git a/reference/oci8/functions/ocinewcursor.xml b/reference/oci8/functions/ocinewcursor.xml deleted file mode 100644 index ad2813f50..000000000 --- a/reference/oci8/functions/ocinewcursor.xml +++ /dev/null @@ -1,115 +0,0 @@ - - - - - - - - ocinewcursor - - Restituisce un nuovo cursore (Statement-Handle) - - - - Descrizione - - resourceocinewcursor - resourceconn - - - ocinewcursor alloca un nuovo identificatore di istruzione sulla connessione - specificata. - - - - Using a REF CURSOR from a stored procedure - - -]]> - - - - - - Using a REF CURSOR in a select statement - -"; -$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"); - -ociexecute($stmt); -print ""; -print ""; -print ""; -print ""; -print ""; -print ""; - -while (OCIFetchInto($stmt,&$data,OCI_ASSOC)) { - print ""; - $dname = $data["DNAME"]; - $deptno = $data["DEPTNO"]; - print ""; - print ""; - ociexecute($data["EMPCNT"]); - while (OCIFetchInto($data["EMPCNT"],&$subdata,OCI_ASSOC)) { - $num_emps = $subdata["NUM_EMPS"]; - print ""; - } - print ""; -} -print "
DEPT NAMEDEPT ## EMPLOYEES
$dname$deptno$num_emps
"; -print ""; -OCIFreeStatement($stmt); -OCILogoff($conn); -?> -]]> -
-
-
-
-
- - diff --git a/reference/oci8/functions/ocinewdescriptor.xml b/reference/oci8/functions/ocinewdescriptor.xml deleted file mode 100644 index 98051ca30..000000000 --- a/reference/oci8/functions/ocinewdescriptor.xml +++ /dev/null @@ -1,159 +0,0 @@ - - - - - - - - ocinewdescriptor - - Inizializza un nuovo descrittore LOB/FILE vuoto - - - - Descrizione - - stringocinewdescriptor - intconnection - inttype - - - ocinewdescriptor alloca memoria per accogliere - descrittori o locatori LOB. I valori validi per il parametro - type sono OCI_D_FILE, - OCI_D_LOB e OCI_D_ROWID. - Per i descrittori LOB, i metodi load, save, e savefile sono - associati al descrittore, per i BFILE esiste solo il - metodo load. Vedere i suggerimenti nel secondo esempio. - - - esempio di <function>ocinewdescriptor</function> - - -]]> - - - - * - * ... - */ - if(!isset($lob_upload) || $lob_upload == 'none'){ -?> -
-Upload file:
- - -
-savefile($lob_upload)){ - OCICommit($conn); - echo "Blob successfully uploaded\n"; - }else{ - echo "Couldn't upload Blob\n"; - } - OCIFreeDesc($lob); - OCIFreeStatement($stmt); - OCILogoff($conn); - } -?> -]]> -
-
- - OCINewDescriptor - -= 4.0.6). - * La signature della stored prodedure PL/SQL d'esempio è: - * - * PROCEDURE save_data - * Argument Name Type In/Out Default? - * ------------------------------ ----------------------- ------ -------- - * KEY NUMBER(38) IN - * DATA CLOB IN - * - */ - - $conn = OCILogon($user, $password); - $stmt = OCIParse($conn, "begin save_data(:key, :data); end;"); - $clob = OCINewDescriptor($conn, OCI_D_LOB); - OCIBindByName($stmt, ':key', $key); - OCIBindByName($stmt, ':data', $clob, -1, OCI_B_CLOB); - $clob->WriteTemporary($data); - OCIExecute($stmt, OCI_DEFAULT); - OCICommit($conn); - $clob->close(); - $clob->free(); - OCIFreeStatement($stmt); -?> -]]> - - -
-
- - diff --git a/reference/oci8/functions/ocinlogon.xml b/reference/oci8/functions/ocinlogon.xml deleted file mode 100644 index c28f18013..000000000 --- a/reference/oci8/functions/ocinlogon.xml +++ /dev/null @@ -1,152 +0,0 @@ - - - - - - - - ocinlogon - Stabilisce, una nuova connessione a Oracle. - - - Descrizione - - intocinlogon - stringusername - stringpassword - stringdb - - - ocinlogon crea una nuova connessione - a un database Oracle 8 e si autentica. Il terzo parametro opzionale - può contenere il nome della istanza Oracle locale o il nome - della voce in tnsnames.ora a cui ci si vuole connettere. - Se il terzo parametro opzionale non è specificato, PHP usa la - variabile d'ambiente ORACLE_SID (istanza di Oracle) o TWO_TASK - (in tnsnames.ora) per determinare a quale database collegarsi. - - - ocinlogon forza una nuova connessione. - Si deve usare quando si ha necessità di isolare un insieme di transazioni. Di - default, le connessioni sono condivise a livello di pagina se si usa - ocilogon o a livello di processo del web server - se si usa ociplogon. Se ci sono connessioni - multiple aperte con ocinlogon, tutti i - commit e rollback avverranno solo sulla connessione specificata. - - - Questo esempio dimostra come le connessioni sono isolate. - - esempio di <function>ocinlogon</function> - -
";
-$db = "";
-
-$c1 = ocilogon("scott","tiger",$db);
-$c2 = ocinlogon("scott","tiger",$db);
-
-function create_table($conn)
-{ $stmt = ociparse($conn,"create table scott.hallo (test
-varchar2(64))");
-  ociexecute($stmt);
-  echo $conn." created table\n\n";
-}
-
-function drop_table($conn)
-{ $stmt = ociparse($conn,"drop table scott.hallo");
-  ociexecute($stmt);
-  echo $conn." dropped table\n\n";
-}
-
-function insert_data($conn)
-{ $stmt = ociparse($conn,"insert into scott.hallo 
-            values('$conn' || ' ' || to_char(sysdate,'DD-MON-YY HH24:MI:SS'))");
-  ociexecute($stmt,OCI_DEFAULT);
-  echo $conn." inserted hallo\n\n";
-}
-
-function delete_data($conn)
-{ $stmt = ociparse($conn,"delete from scott.hallo");
-  ociexecute($stmt,OCI_DEFAULT);
-  echo $conn." deleted hallo\n\n";
-}
-
-function commit($conn)
-{ ocicommit($conn);
-  echo $conn." committed\n\n";
-}
-
-function rollback($conn)
-{ ocirollback($conn);
-  echo $conn." rollback\n\n";
-}
-
-function select_data($conn)
-{ $stmt = ociparse($conn,"select * from scott.hallo");
-  ociexecute($stmt,OCI_DEFAULT);
-  echo $conn."----selecting\n\n";
-  while (ocifetch($stmt))
-    echo $conn." <".ociresult($stmt,"TEST").">\n\n";
-  echo $conn."----done\n\n";
-}
-
-create_table($c1);
-insert_data($c1);
-
-select_data($c1);   
-select_data($c2);   
-
-rollback($c1);      
-
-select_data($c1);   
-select_data($c2);   
-
-insert_data($c2);   
-commit($c2);        
-
-select_data($c1);   
-
-delete_data($c1);   
-select_data($c1);   
-select_data($c2);   
-commit($c1);        
-
-select_data($c1);
-select_data($c2);
-
-drop_table($c1);
-print "
"; -?> -]]> -
-
-
- - Vedere anche ocilogon e - ociplogon. - -
-
- - diff --git a/reference/oci8/functions/ocinumcols.xml b/reference/oci8/functions/ocinumcols.xml deleted file mode 100644 index db55b342c..000000000 --- a/reference/oci8/functions/ocinumcols.xml +++ /dev/null @@ -1,72 +0,0 @@ - - - - - - - - ocinumcols - - Restituisce il numero di campi che risultano da un comando SQL - - - - Descrizione - - intocinumcols - resourcestmt - - - ocinumcols restituisce il numero di campi contenuti in - un'istruzione SQL. - - - <function>ocinumcols</function> - -
\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 "
"; - print "\n"; -?> -]]> -
-
-
-
- - diff --git a/reference/oci8/functions/ociparse.xml b/reference/oci8/functions/ociparse.xml deleted file mode 100644 index a3f66de7b..000000000 --- a/reference/oci8/functions/ociparse.xml +++ /dev/null @@ -1,48 +0,0 @@ - - - - - - - - ociparse - Analizza una query e restituisce un'istruzione. - - - Descrizione - - intociparse - intconn - stringquery - - - ociparse analizza la - query rispetto alla connessione conn. - Restituisce un identificatore di istruzione se la query - è valida, &false; - altrimenti. La query può essere qualsiasi - comando SQL o blocco di codice PL/SQL. - - - - - diff --git a/reference/oci8/functions/ociplogon.xml b/reference/oci8/functions/ociplogon.xml deleted file mode 100644 index e98e1d6c1..000000000 --- a/reference/oci8/functions/ociplogon.xml +++ /dev/null @@ -1,57 +0,0 @@ - - - - - - - - ociplogon - - Stabilisce una connessione permanente a Oracle. - - - - Descrizione - - intociplogon - stringusername - stringpassword - stringdb - - - ociplogon crea una connessione persistente - a un database Oracle 8 e si autentica. Il terzo parametro opzionale - può contenere il nome della istanza Oracle locale o il nome - della voce in tnsnames.ora a cui ci si vuole connettere. - Se il terzo parametro opzionale non è specificato, PHP usa la - variabile d'ambiente ORACLE_SID (istanza di Oracle) - o TWO_TASK - (in tnsnames.ora) per determinare a quale database collegarsi. - - - Vedere anche ocilogon e - ocinlogon. - - - - - diff --git a/reference/oci8/functions/ociresult.xml b/reference/oci8/functions/ociresult.xml deleted file mode 100644 index 377badc9c..000000000 --- a/reference/oci8/functions/ociresult.xml +++ /dev/null @@ -1,47 +0,0 @@ - - - - - - - - ociresult - Restituisce il valore di campo della tupla estratta - - - Descrizione - - mixedociresult - intstatement - mixedcolumn - - - ociresult restituisce i dati del campo - column nella tupla corrente (vedere - ocifetch).ociresult restituirà - tutto come stringa, eccetto i tipi astratti (ROWIDs, - LOBs e FILEs). - - - - - diff --git a/reference/oci8/functions/ocirollback.xml b/reference/oci8/functions/ocirollback.xml deleted file mode 100644 index 1c6d9d0aa..000000000 --- a/reference/oci8/functions/ocirollback.xml +++ /dev/null @@ -1,47 +0,0 @@ - - - - - - - - ocirollback - Annulla le transazioni in sospeso - - - Descrizione - - boolocirollback - resourceconnection - - - ocirollback annulla tutte le transazioni in sospeso - sulla connessione Oracle connection. - &return.success; - - - Vedere anche ocicommit - - - - - diff --git a/reference/oci8/functions/ocirowcount.xml b/reference/oci8/functions/ocirowcount.xml deleted file mode 100644 index 8f2ca97c4..000000000 --- a/reference/oci8/functions/ocirowcount.xml +++ /dev/null @@ -1,71 +0,0 @@ - - - - - - - - ocirowcount - Restituisce il numero di tuple modificate - - - Descrizione - - intocirowcount - resourcestatement - - - ocirowcount restituisce il numero di tuple modificate, - ad esempio, da un comando update. Questa funzione non riporta il numero - di tuple restituite da una select! - - - - esempio di <function>ocirowcount</function> - -
";
-    $conn = OCILogon("scott","tiger");
-    $stmt = OCIParse($conn,"create table emp2 as select * from emp");
-    OCIExecute($stmt);
-    print OCIRowCount($stmt) . " rows inserted.
"; - OCIFreeStatement($stmt); - $stmt = OCIParse($conn,"delete from emp2"); - OCIExecute($stmt); - print OCIRowCount($stmt) . " rows deleted.
"; - OCICommit($conn); - OCIFreeStatement($stmt); - $stmt = OCIParse($conn,"drop table emp2"); - OCIExecute($stmt); - OCIFreeStatement($stmt); - OCILogOff($conn); - print "
"; -?> -]]> -
-
-
-
-
- - diff --git a/reference/oci8/functions/ocisavelob.xml b/reference/oci8/functions/ocisavelob.xml deleted file mode 100644 index f06749c7d..000000000 --- a/reference/oci8/functions/ocisavelob.xml +++ /dev/null @@ -1,42 +0,0 @@ - - - - - - - - ocisavelob - Coming soon - - - Descrizione - - boolocisavelob - objectlob - - - &warn.undocumented.func; - - - - - diff --git a/reference/oci8/functions/ocisavelobfile.xml b/reference/oci8/functions/ocisavelobfile.xml deleted file mode 100644 index d048777b0..000000000 --- a/reference/oci8/functions/ocisavelobfile.xml +++ /dev/null @@ -1,42 +0,0 @@ - - - - - - - - ocisavelobfile - Coming soon - - - Descrizione - - boolocisavelobfile - objectlob - - - &warn.undocumented.func; - - - - - diff --git a/reference/oci8/functions/ociserverversion.xml b/reference/oci8/functions/ociserverversion.xml deleted file mode 100644 index c304f1ff9..000000000 --- a/reference/oci8/functions/ociserverversion.xml +++ /dev/null @@ -1,54 +0,0 @@ - - - - - - - - ociserverversion - Restituisce una stringa contenente informazioni sulla versione - del server - - - Descrizione - - stringociserverversion - resourceconn - - - - esempio di <function>ociserverversion</function> - - -]]> - - - - - - - diff --git a/reference/oci8/functions/ocisetprefetch.xml b/reference/oci8/functions/ocisetprefetch.xml deleted file mode 100644 index c448aa4c1..000000000 --- a/reference/oci8/functions/ocisetprefetch.xml +++ /dev/null @@ -1,44 +0,0 @@ - - - - - - - - ocisetprefetch - Imposta il numero di tuple da precaricare - - - Descrizione - - intocisetprefetch - resourcestmt - introws - - - Imposta a rows il numero di tuple da precaricare. - Il valore di default è 1. - - - - - diff --git a/reference/oci8/functions/ocistatementtype.xml b/reference/oci8/functions/ocistatementtype.xml deleted file mode 100644 index d08b4c0d0..000000000 --- a/reference/oci8/functions/ocistatementtype.xml +++ /dev/null @@ -1,76 +0,0 @@ - - - - - - - - ocistatementtype - Restituisce il tipo di un'istruzione OCI - - - Descrizione - - stringocistatementtype - resourcestmt - - - ocistatementtype restituisce uno dei seguenti - valori: - - SELECT - UPDATE - DELETE - INSERT - CREATE - DROP - ALTER - BEGIN - DECLARE - UNKNOWN - - - - Esempi di <function>ocistatementtype</function> - -
";
-    $conn = OCILogon("scott","tiger");
-    $sql  = "delete from emp where deptno = 10";
-   
-    $stmt = OCIParse($conn,$sql);
-    if ( OCIStatementType($stmt) == "DELETE" ) {
-        die "You are not allowed to delete from this table
"; - } - - OCILogoff($conn); - print "
"; -?> -]]> -
-
-
-
-
- - diff --git a/reference/oci8/functions/ociwritelobtofile.xml b/reference/oci8/functions/ociwritelobtofile.xml deleted file mode 100644 index baab23dc4..000000000 --- a/reference/oci8/functions/ociwritelobtofile.xml +++ /dev/null @@ -1,45 +0,0 @@ - - - - - - - - ociwritelobtofile - Coming soon - - - Descrizione - - boolociwritelobtofile - objectlob - stringfilename - intstart - intlenght - - - &warn.undocumented.func; - - - - - From 8e35780fd14b4c26ff8ce535c35a30b256bfbac0 Mon Sep 17 00:00:00 2001 From: lacatoire Date: Thu, 26 Feb 2026 17:45:43 +0100 Subject: [PATCH 2/2] Restore oci-bind-by-name and oci-cancel (still present in doc-en) --- reference/oci8/functions/oci-bind-by-name.xml | 889 ++++++++++++++++++ reference/oci8/functions/oci-cancel.xml | 65 ++ 2 files changed, 954 insertions(+) create mode 100644 reference/oci8/functions/oci-bind-by-name.xml create mode 100644 reference/oci8/functions/oci-cancel.xml diff --git a/reference/oci8/functions/oci-bind-by-name.xml b/reference/oci8/functions/oci-bind-by-name.xml new file mode 100644 index 000000000..3a57f4c91 --- /dev/null +++ b/reference/oci8/functions/oci-bind-by-name.xml @@ -0,0 +1,889 @@ + + + + + + oci_bind_by_name + Effettua il binding di una variabile PHP a un segnaposto Oracle + + + + &reftitle.description; + + booloci_bind_by_name + resourcestatement + stringparam + mixedvar + intmax_length-1 + inttype0 + + + Associa una variabile PHP var al segnaposto per + la variabile di bind Oracle param. Il binding + è importante per le prestazioni del database Oracle e anche come metodo per + evitare problemi di sicurezza legati all'SQL Injection. + + + + Il binding consente al database di riutilizzare il contesto della dichiarazione e + le cache dalle esecuzioni precedenti della dichiarazione, anche se un altro + utente o processo l'ha inizialmente eseguita. Il binding riduce i rischi + legati all'SQL Injection, perché i dati associati a una variabile + di bind non sono mai trattati come parte della dichiarazione SQL. Non + è necessaria né il quoting né l'escaping. + + + + Le variabili PHP sui cui è stato effettuato il binding possono essere modificate e la + dichiarazione rieseguita senza bisogno di rieffettuare il parsing della dichiarazione o + di rifare il bind. + + + + In Oracle, le variabili di bind sono comunemente suddivise + in bind IN per i valori che vengono passati nel + database, e bind OUT per i valori che vengono + restituiti a PHP. Una variabile di bind può essere + sia IN che OUT. Se una + variabile di bind verrà utilizzata per l'input o per l'output viene determinato in + fase di esecuzione. + + + + Bisogna specificare max_length quando si utilizza + un bind OUT affinché PHP possa allocare abbastanza memoria + per contenere il valore restituito. + + + + Per i bind IN, è consigliato impostare + la lunghezza di max_length se la dichiarazione viene + rieseguita più volte con valori differenti per la variabile + PHP. Altrimenti Oracle potrebbe troncare i dati alla lunghezza del + valore iniziale della variabile PHP. Se non si conosce quale sarà la lunghezza + massima, richiamare di nuovo oci_bind_by_name + con la dimensione dei dati correnti prima di + ogni chiamata a oci_execute. Un binding con una + lunghezza eccessivamente grande avrà un impatto sulla memoria del processo + nel database. + + + + Una chiamata al bind indica a Oracle da quale indirizzo di memoria leggere i dati. + Per i bind IN, questo indirizzo deve contenere + dati validi quando viene chiamato oci_execute. Ciò + significa che la variabile su cui è stato fatto il binding deve rimanere in scope fino + all'esecuzione. Se non rimane in scope, potrebbero verificarsi risultati imprevisti + o errori come + "ORA-01460: unimplemented or unreasonable conversion requested". Per i bind OUT, uno dei sintomi è che nessun + valore viene impostato nella variabile PHP. + + + + Per una dichiarazione che viene eseguita ripetutamente, effeettuare il binding di valori che + non cambiano mai potrebbe ridurre la capacità dell'ottimizzatore Oracle di + scegliere il piano di esecuzione migliore. Le dichiarazioni di lunga durata + che vengono rieseguite raramente potrebbero non trarre vantaggio dal binding. Tuttavia, + in entrambi i casi, il binding potrebbe essere più sicuro rispetto all'unione di stringhe in una + dichiarazione SQL, poiché questo può rappresentare un rischio per la sicurezza se vengono concatenate + stringhe dell'utente non filtrate. + + + + + &reftitle.parameters; + + + + statement + + + Un identificatore valido di una dichiarazione OCI8. + + + + + param + + + Il segnaposto della variabile bind con prefisso due punti utilizzato nella + dichiarazione. Il due punti è opzionale + in param. Oracle non utilizza i punti interrogativi + per i segnaposti. + + + + + var + + + La variabile PHP da associare a param + + + + + max_length + + + Imposta la lunghezza massima per i dati. Se la imposti su -1, questa + funzione utilizzerà la lunghezza attuale + di var per impostare la lunghezza + massima. In questo caso, var deve + esistere e contenere dati + quando viene chiamato oci_bind_by_name. + + + + + type + + + Il tipo di dato che Oracle tratterà come tale. Il + tipo default utilizzato + è SQLT_CHR. Oracle convertirà i dati + tra questo tipo e la colonna del database (o il tipo di + variabile PL/SQL), se possibile. + + + Se devi associare un tipo di dato astratto (LOB/ROWID/BFILE), devi + prima allocarlo utilizzando la funzione + oci_new_descriptor. La + length non viene utilizzata per i tipi di dato astratti + e dovrebbe essere impostata su -1. + + + I valori possibili per type sono: + + + + SQLT_BFILEE o OCI_B_BFILE + - per i BFILE; + + + + + SQLT_CFILEE o OCI_B_CFILEE + - per i CFILE; + + + + + SQLT_CLOB o OCI_B_CLOB + - per i CLOB; + + + + + SQLT_BLOB o OCI_B_BLOB + - per i BLOB; + + + + + SQLT_RDD o OCI_B_ROWID + - per i ROWID; + + + + + SQLT_NTY o OCI_B_NTY + - per tipi di dati nominati; + + + + + SQLT_INT o OCI_B_INT - per gli interi; + + + + + SQLT_CHR - per i VARCHAR; + + + + + SQLT_BIN o OCI_B_BIN + - per le colonne RAW; + + + + + SQLT_LNG - per le colonne LONG; + + + + + SQLT_LBI - per le colonne LONG RAW; + + + + + SQLT_RSET - per i cursori creati + con oci_new_cursor; + + + + + SQLT_BOL o OCI_B_BOL + - per i BOOLEAN di PL/SQL (Richiede Oracle Database 12c) + + + + + + + + + + + + &reftitle.returnvalues; + + &return.success; + + + + + &reftitle.examples; + + + Inserimento di dati con <function>oci_bind_by_name</function> + + +]]> + + + + + + + Binding una sola volta per più esecuzioni + + +]]> + + + + + + + Binding con un ciclo <literal>foreach</literal> + + 'IT Support', ':loc' => 1700); + +foreach ($ba as $key => $val) { + + // oci_bind_by_name($stid, $key, $val) non funziona + // perché associa ogni segnaposto alla stessa posizione: $val + // invece usa la posizione effettiva dei dati: $ba[$key] + oci_bind_by_name($stid, $key, $ba[$key]); +} + +oci_execute($stid); +$row = oci_fetch_array($stid, OCI_ASSOC+OCI_RETURN_NULLS); +foreach ($row as $item) { + print $item."
\n"; +} + +oci_free_statement($stid); +oci_close($conn); + +?> +]]> +
+
+
+ + + + Binding in una clausola WHERE + +\n"; +} + +// L'output è +// Austin +// Ernst +// Hunold +// Lorentz +// Pataballa + +oci_free_statement($stid); +oci_close($conn); + +?> +]]> + + + + + + + Binding con una clausola LIKE + +\n"; +} +// L'output è +// South Brunswick +// South San Francisco +// Southlake + +oci_free_statement($stid); +oci_close($conn); + +?> +]]> + + + + + + + Binding con REGEXP_LIKE + +\n"; +} +// L'output è +// Beijing +// Singapore + +oci_free_statement($stid); +oci_close($conn); + +?> +]]> + + + + + + Per un numero limitato e fisso di condizioni nella clausola IN, usare variabili + di bind individuali. I valori sconosciuti al momento dell'esecuzione possono essere impostati su NULL. + Questo permette di utilizzare una singola dichiarazione per tutti gli utenti + dell'applicazione, massimizzando l'efficienza della cache del database Oracle. + + + + + Binding di più valori in una clausola IN + +\n"; +} + +// L'output è: +// Ernst +// Hunold + +oci_free_statement($stid); +oci_close($conn); + +?> +]]> + + + + + + + Binding di un ROWID restituito da una query + + +]]> + + + + + + + Binding di un ROWID su INSERT + + "Larry", + 2222 => "Bill", + 3333 => "Jim"); + +// Stipendio per ogni persona +$salary = 10000; + +// Inserisce ed immediatamente aggiorna ogni riga +foreach ($data as $id => $name) { + oci_execute($ins_stid); + oci_execute($upd_stid); +} + +$rowid->free(); +oci_free_statement($upd_stid); +oci_free_statement($ins_stid); + +// Mostra le nuove righe +$stid = oci_parse($conn, "SELECT * FROM mytab"); +oci_execute($stid); +while ($row = oci_fetch_array($stid, OCI_ASSOC+OCI_RETURN_NULLS)) { + var_dump($row); +} + +oci_free_statement($stid); +oci_close($conn); + +?> +]]> + + + + + + + Binding per una stored function PL/SQL + + +]]> + + + + + + + Binding di parametri per una stored procedure PL/SQL + + +]]> + + + + + + + Binding di una colonna CLOB + +save("A very long string"); + +oci_commit($conn); + +// Recupero dei dati CLOB + +$query = 'SELECT myclob FROM mytab WHERE mykey = :mykey'; + +$stid = oci_parse ($conn, $query); +oci_bind_by_name($stid, ":mykey", $mykey, 5); +oci_execute($stid); + +print ''; +while ($row = oci_fetch_array($stid, OCI_ASSOC+OCI_RETURN_LOBS)) { + print ''; + // In un ciclo, liberare la variabile di grandi dimensioni prima del secondo fetch riduce l'utilizzo massimo della memoria da parte di PHP + unset($row); +} +print '
'.$row['MYCLOB'].'
'; + +?> +]]> +
+
+
+ + + + Binding di un BOOLEAN PL/SQL + + +]]> + + + + +
+ + + &reftitle.notes; + + + Non usare addslashes + e oci_bind_by_name contemporaneamente, in quanto non + è necessario nessun quoting. Qualsiasi tipo di quote applicato magicamente verrà scritto + nel tuo database, poiché oci_bind_by_name + inserisce i dati letteralmente e non rimuove le virgolette o i caratteri + di escape. + + + + + Se associ una stringa a una colonna CHAR in + una clausola WHERE, ricorda che Oracle utilizza + la semantica di confronto con padding vuoto per le colonne + CHAR. La tua variabile PHP dovrebbe essere riempita con spazi vuoti alla stessa + larghezza della colonna affinché la clausola WHERE abbia + successo. + + + + + L'argomento var di PHP è un riferimento. Alcune + forme di loop non funzionano come ci si aspetterebbe: + + + + $value) { + oci_bind_by_name($stid, $key, $value); +} +?> +]]> + + + + Questo associa ogni chiave alla posizione di $value, quindi tutte le variabili + legate finiscono per puntare al valore dell'ultima iterazione + del ciclo. Usa invece il seguente codice: + + + + $value) { + oci_bind_by_name($stid, $key, $myarray[$key]); +} +?> +]]> + + + + + + + &reftitle.seealso; + + + oci_bind_array_by_name + oci_parse + + + + +
+ \ No newline at end of file diff --git a/reference/oci8/functions/oci-cancel.xml b/reference/oci8/functions/oci-cancel.xml new file mode 100644 index 000000000..92d71613f --- /dev/null +++ b/reference/oci8/functions/oci-cancel.xml @@ -0,0 +1,65 @@ + + + + + oci_cancel + Interrompe la lettura del cursore + + + + &reftitle.description; + + booloci_cancel + resourcestatement + + + Invalida un cursore, rilasciando tutte le risorse associate e cancella + la possibilità di leggere da esso. + + + + + &reftitle.parameters; + + + + statement + + + Uno statement OCI. + + + + + + + + + &reftitle.returnvalues; + + &return.success; + + + + + +