cvs: phpdoc-it /reference/ibase/functions ibase-blob-create.xml ibase-blob-echo.xml ibase-blob-get.xml ibase-blob-import.xml ibase-blob-info.xml
ibase-blob-open.xml ibase-close.xml ibase-commit.xml ibase-connect.xml ibase-errmsg.xml ibase-execute.xml ibase-fetch-object.xml

From: Date: Fri, 20 Feb 2004 20:39:09 +0000
Subject: cvs: phpdoc-it /reference/ibase/functions ibase-blob-create.xml ibase-blob-echo.xml ibase-blob-get.xml ibase-blob-import.xml ibase-blob-info.xml
ibase-blob-open.xml ibase-close.xml ibase-commit.xml ibase-connect.xml ibase-errmsg.xml ibase-execute.xml ibase-fetch-object.xml
Groups: php.doc.it 
Request: Send a blank email to doc-it+get-556@lists.php.net to get a copy of this message
darvina Fri Feb 20 15:39:09 2004 EDT Modified files: /phpdoc-it/reference/ibase/functions ibase-blob-create.xml ibase-blob-echo.xml ibase-blob-get.xml ibase-blob-import.xml ibase-blob-info.xml ibase-blob-open.xml ibase-close.xml ibase-commit.xml ibase-connect.xml ibase-errmsg.xml ibase-execute.xml ibase-fetch-object.xml Log: Sync to En tree

http://cvs.php.net/diff.php/phpdoc-it/reference/ibase/functions/ibase-blob-create.xml?r1=1.2&r2=1.3&ty=u Index: phpdoc-it/reference/ibase/functions/ibase-blob-create.xml diff -u phpdoc-it/reference/ibase/functions/ibase-blob-create.xml:1.2 phpdoc-it/reference/ibase/functions/ibase-blob-create.xml:1.3 --- phpdoc-it/reference/ibase/functions/ibase-blob-create.xml:1.2 Wed Apr 17 03:07:00 2002 +++ phpdoc-it/reference/ibase/functions/ibase-blob-create.xml Fri Feb 20 15:39:09 2004 @@ -1,23 +1,30 @@ <?xml version="1.0" encoding="iso-8859-1"?> <!-- splitted from ./it/functions/ibase.xml, last change in rev 1.12 --> -<!-- last change to 'ibase-blob-create' in en/ tree in rev 1.39 --> -<!-- EN-Revision: 1.2 Maintainer: cortesi Status: ready --> -<!-- OLD-Revision: 1.46/EN.1.39 --> +<!-- EN-Revision: 1.4 Maintainer: cortesi Status: ready --> <refentry id='function.ibase-blob-create'> <refnamediv> <refname>ibase_blob_create</refname> <refpurpose> - Crea un blob per aggiungerci dei dati + Crea un nuovo blob per aggiungerci dei dati </refpurpose> </refnamediv> <refsect1> <title>Descrizione</title> <methodsynopsis> - <type>int</type><methodname>ibase_blob_create</methodname> - <methodparam choice="opt"><type>int</type><parameter>link_identifier</parameter></methodparam> + <type>resource</type><methodname>ibase_blob_create</methodname> + <methodparam choice="opt"><type>resource</type><parameter>link_identifier</parameter></methodparam> </methodsynopsis> <para> - &warn.undocumented.func; + <function>ibase_blob_create</function> crea un nuovo blob + da riempire di dati. La funzione restituisce un puntatore al BLOB da utilizzare successivamente + con <function>ibase_blob_add</function> oppure &false; se si verifica un errore. + </para> + <para> + Vedere anche + <function>ibase_blob_add</function>, + <function>ibase_blob_cancel</function>, + <function>ibase_blob_close</function> e + <function>ibase_blob_import</function>. </para> </refsect1> </refentry> http://cvs.php.net/diff.php/phpdoc-it/reference/ibase/functions/ibase-blob-echo.xml?r1=1.2&r2=1.3&ty=u Index: phpdoc-it/reference/ibase/functions/ibase-blob-echo.xml diff -u phpdoc-it/reference/ibase/functions/ibase-blob-echo.xml:1.2 phpdoc-it/reference/ibase/functions/ibase-blob-echo.xml:1.3 --- phpdoc-it/reference/ibase/functions/ibase-blob-echo.xml:1.2 Wed Apr 17 03:07:02 2002 +++ phpdoc-it/reference/ibase/functions/ibase-blob-echo.xml Fri Feb 20 15:39:09 2004 @@ -1,8 +1,6 @@ <?xml version="1.0" encoding="iso-8859-1"?> <!-- splitted from ./it/functions/ibase.xml, last change in rev 1.12 --> -<!-- last change to 'ibase-blob-echo' in en/ tree in rev 1.39 --> -<!-- EN-Revision: 1.2 Maintainer: cortesi Status: ready --> -<!-- OLD-Revision: 1.46/EN.1.39 --> +<!-- EN-Revision: 1.4 Maintainer: cortesi Status: ready --> <refentry id='function.ibase-blob-echo'> <refnamediv> <refname>ibase_blob_echo</refname> @@ -13,11 +11,19 @@ <refsect1> <title>Descrizione</title> <methodsynopsis> - <type>int</type><methodname>ibase_blob_echo</methodname> - <methodparam><type>string</type><parameter>blob_id_str</parameter></methodparam> + <type>bool</type><methodname>ibase_blob_echo</methodname> + <methodparam><type>string</type><parameter>blob_id</parameter></methodparam> </methodsynopsis> <para> - &warn.undocumented.func; + Questa funzione apre un BLOB in lettura ed invia il suo contenuto direttamente + allo standard output (prevalentemente il browser). + &return.success; + </para> + <para> + Vedere anche + <function>ibase_blob_open</function>, + <function>ibase_blob_close</function> e + <function>ibase_blob_get</function>. </para> </refsect1> </refentry> http://cvs.php.net/diff.php/phpdoc-it/reference/ibase/functions/ibase-blob-get.xml?r1=1.2&r2=1.3&ty=u Index: phpdoc-it/reference/ibase/functions/ibase-blob-get.xml diff -u phpdoc-it/reference/ibase/functions/ibase-blob-get.xml:1.2 phpdoc-it/reference/ibase/functions/ibase-blob-get.xml:1.3 --- phpdoc-it/reference/ibase/functions/ibase-blob-get.xml:1.2 Wed Apr 17 03:07:02 2002 +++ phpdoc-it/reference/ibase/functions/ibase-blob-get.xml Fri Feb 20 15:39:09 2004 @@ -1,8 +1,6 @@ <?xml version="1.0" encoding="iso-8859-1"?> <!-- splitted from ./it/functions/ibase.xml, last change in rev 1.12 --> -<!-- last change to 'ibase-blob-get' in en/ tree in rev 1.41 --> -<!-- EN-Revision: 1.2 Maintainer: cortesi Status: ready --> -<!-- OLD-Revision: 1.46/EN.1.41 --> +<!-- EN-Revision: 1.5 Maintainer: cortesi Status: ready --> <refentry id='function.ibase-blob-get'> <refnamediv> <refname>ibase_blob_get</refname> @@ -14,11 +12,41 @@ <title>Descrizione</title> <methodsynopsis> <type>string</type><methodname>ibase_blob_get</methodname> - <methodparam><type>int</type><parameter>blob_id</parameter></methodparam> + <methodparam><type>resource</type><parameter>blob_handle</parameter></methodparam> <methodparam><type>int</type><parameter>len</parameter></methodparam> </methodsynopsis> <para> - &warn.undocumented.func; + Questa funzine restituisce almeno <parameter>len</parameter> bytes da un BLOB + che è stato aperto in lettura con <function>ibase_blob_open</function>. + Restituisce &false; se si verifica un errore. + <informalexample> + <programlisting role="php"> +<![CDATA[ +<?php + $sql = "SELECT blob_value FROM table"; + $result = ibase_query($sql); + $data = ibase_fetch_object($result); + $blob_data = ibase_blob_info($data->BLOB_VALUE); + $blob_hndl = ibase_blob_open($data->BLOB_VALUE); + echo ibase_blob_get($blob_hndl, $blob_data[0]); +?> +]]> + </programlisting> + </informalexample> + Questo esempio non fa altro che 'ibase_blob_echo($data->BLOB_VALUE)', + mostra come ottenere le informazioni in una variabile $variable da manipolare a piacere. + </para> + <note> + <para> + Non è possibile leggere da un BLOB che è stato aperto in scrittura + da <function>ibase_blob_create</function>. + </para> + </note> + <para> + Vedere anche + <function>ibase_blob_open</function>, + <function>ibase_blob_close</function> e + <function>ibase_blob_echo</function>. </para> </refsect1> </refentry> http://cvs.php.net/diff.php/phpdoc-it/reference/ibase/functions/ibase-blob-import.xml?r1=1.2&r2=1.3&ty=u Index: phpdoc-it/reference/ibase/functions/ibase-blob-import.xml diff -u phpdoc-it/reference/ibase/functions/ibase-blob-import.xml:1.2 phpdoc-it/reference/ibase/functions/ibase-blob-import.xml:1.3 --- phpdoc-it/reference/ibase/functions/ibase-blob-import.xml:1.2 Wed Apr 17 03:07:03 2002 +++ phpdoc-it/reference/ibase/functions/ibase-blob-import.xml Fri Feb 20 15:39:09 2004 @@ -1,8 +1,6 @@ <?xml version="1.0" encoding="iso-8859-1"?> <!-- splitted from ./it/functions/ibase.xml, last change in rev 1.12 --> -<!-- last change to 'ibase-blob-import' in en/ tree in rev 1.39 --> -<!-- EN-Revision: 1.2 Maintainer: cortesi Status: ready --> -<!-- OLD-Revision: 1.46/EN.1.39 --> +<!-- EN-Revision: 1.4 Maintainer: cortesi Status: ready --> <refentry id='function.ibase-blob-import'> <refnamediv> <refname>ibase_blob_import</refname> @@ -14,11 +12,20 @@ <title>Descrizione</title> <methodsynopsis> <type>string</type><methodname>ibase_blob_import</methodname> - <methodparam choice="opt"><type>int</type><parameter>link_identifier</parameter></methodparam> - <methodparam><type>int</type><parameter>file_id</parameter></methodparam> + <methodparam choice="opt"><type>resource</type><parameter>link_identifier</parameter></methodparam> + <methodparam><type>resource</type><parameter>file_handle</parameter></methodparam> </methodsynopsis> <para> - &warn.undocumented.func; + Questa funzione crea un BLOB e vi inserisce un file intero, lo chiude e + restituisce l'id assegnato al BLOB. <parameter>file_handle</parameter> è un puntatore + di file restituito da <function>fopen</function>. La funzione restituisce &false; se si verifica un errore. + </para> + <para> + Vedere anche + <function>ibase_blob_add</function>, + <function>ibase_blob_cancel</function>, + <function>ibase_blob_close</function> e + <function>ibase_blob_create</function>. </para> </refsect1> </refentry> http://cvs.php.net/diff.php/phpdoc-it/reference/ibase/functions/ibase-blob-info.xml?r1=1.2&r2=1.3&ty=u Index: phpdoc-it/reference/ibase/functions/ibase-blob-info.xml diff -u phpdoc-it/reference/ibase/functions/ibase-blob-info.xml:1.2 phpdoc-it/reference/ibase/functions/ibase-blob-info.xml:1.3 --- phpdoc-it/reference/ibase/functions/ibase-blob-info.xml:1.2 Wed Apr 17 03:07:03 2002 +++ phpdoc-it/reference/ibase/functions/ibase-blob-info.xml Fri Feb 20 15:39:09 2004 @@ -1,8 +1,6 @@ <?xml version="1.0" encoding="iso-8859-1"?> <!-- splitted from ./it/functions/ibase.xml, last change in rev 1.12 --> -<!-- last change to 'ibase-blob-info' in en/ tree in rev 1.39 --> -<!-- EN-Revision: 1.2 Maintainer: cortesi Status: ready --> -<!-- OLD-Revision: 1.46/EN.1.39 --> +<!-- EN-Revision: 1.3 Maintainer: cortesi Status: ready --> <refentry id='function.ibase-blob-info'> <refnamediv> <refname>ibase_blob_info</refname> @@ -13,11 +11,13 @@ <refsect1> <title>Descrizione</title> <methodsynopsis> - <type>object</type><methodname>ibase_blob_info</methodname> - <methodparam><type>string</type><parameter>blob_id_str</parameter></methodparam> + <type>array</type><methodname>ibase_blob_info</methodname> + <methodparam><type>string</type><parameter>blob_id</parameter></methodparam> </methodsynopsis> <para> - &warn.undocumented.func; + La funzione restituisce un array contenente informazioni su un BLOB. Le informazioni restituite + consistono nella lunghezza del BLOB, il numero di segmenti contenuti, la dimensione + del segmento più grande, e se si tratta di un BLOB segmentato o a flusso. </para> </refsect1> </refentry> http://cvs.php.net/diff.php/phpdoc-it/reference/ibase/functions/ibase-blob-open.xml?r1=1.2&r2=1.3&ty=u Index: phpdoc-it/reference/ibase/functions/ibase-blob-open.xml diff -u phpdoc-it/reference/ibase/functions/ibase-blob-open.xml:1.2 phpdoc-it/reference/ibase/functions/ibase-blob-open.xml:1.3 --- phpdoc-it/reference/ibase/functions/ibase-blob-open.xml:1.2 Wed Apr 17 03:07:03 2002 +++ phpdoc-it/reference/ibase/functions/ibase-blob-open.xml Fri Feb 20 15:39:09 2004 @@ -1,8 +1,6 @@ <?xml version="1.0" encoding="iso-8859-1"?> <!-- splitted from ./it/functions/ibase.xml, last change in rev 1.12 --> -<!-- last change to 'ibase-blob-open' in en/ tree in rev 1.39 --> -<!-- EN-Revision: 1.2 Maintainer: cortesi Status: ready --> -<!-- OLD-Revision: 1.46/EN.1.39 --> +<!-- EN-Revision: 1.3 Maintainer: cortesi Status: ready --> <refentry id='function.ibase-blob-open'> <refnamediv> <refname>ibase_blob_open</refname> @@ -13,11 +11,19 @@ <refsect1> <title>Descrizione</title> <methodsynopsis> - <type>int</type><methodname>ibase_blob_open</methodname> + <type>resource</type><methodname>ibase_blob_open</methodname> <methodparam><type>string</type><parameter>blob_id</parameter></methodparam> </methodsynopsis> <para> - &warn.undocumented.func; + <function>ibase_blob_open</function> apre un BLOB esistente in lettura. + Restituisce un puntatore al BLOB da usarsi successivamente con + <function>ibase_blob_get</function> oppure &false; se si verifica un errore. + </para> + <para> + Vedere anche + <function>ibase_blob_close</function>, + <function>ibase_blob_echo</function> e + <function>ibase_blob_get</function>. </para> </refsect1> </refentry> http://cvs.php.net/diff.php/phpdoc-it/reference/ibase/functions/ibase-close.xml?r1=1.2&r2=1.3&ty=u Index: phpdoc-it/reference/ibase/functions/ibase-close.xml diff -u phpdoc-it/reference/ibase/functions/ibase-close.xml:1.2 phpdoc-it/reference/ibase/functions/ibase-close.xml:1.3 --- phpdoc-it/reference/ibase/functions/ibase-close.xml:1.2 Wed Apr 17 03:07:03 2002 +++ phpdoc-it/reference/ibase/functions/ibase-close.xml Fri Feb 20 15:39:09 2004 @@ -1,8 +1,6 @@ <?xml version="1.0" encoding="iso-8859-1"?> <!-- splitted from ./it/functions/ibase.xml, last change in rev 1.1 --> -<!-- last change to 'ibase-close' in en/ tree in rev 1.2 --> -<!-- EN-Revision: 1.2 Maintainer: cortesi Status: ready --> -<!-- OLD-Revision: 1.46/EN.1.2 --> +<!-- EN-Revision: 1.3 Maintainer: cortesi Status: ready --> <refentry id="function.ibase-close"> <refnamediv> <refname>ibase_close</refname> @@ -13,8 +11,8 @@ <refsect1> <title>Descrizione</title> <methodsynopsis> - <type>int</type><methodname>ibase_close</methodname> - <methodparam choice="opt"><type>int</type><parameter>connection_id</parameter></methodparam> + <type>bool</type><methodname>ibase_close</methodname> + <methodparam choice="opt"><type>resource</type><parameter>connection_id</parameter></methodparam> </methodsynopsis> <para> Chiude il collegamento ad un database InterBase che è stato associato con @@ -23,6 +21,11 @@ La transazione predefinita sul collegamento viene "committed", le altre transazioni vengono "rolled back". </para> + <para> + Vedere anche + <function>ibase_connect</function> e + <function>ibase_pconnect</function>. + </para> </refsect1> </refentry> http://cvs.php.net/diff.php/phpdoc-it/reference/ibase/functions/ibase-commit.xml?r1=1.2&r2=1.3&ty=u Index: phpdoc-it/reference/ibase/functions/ibase-commit.xml diff -u phpdoc-it/reference/ibase/functions/ibase-commit.xml:1.2 phpdoc-it/reference/ibase/functions/ibase-commit.xml:1.3 --- phpdoc-it/reference/ibase/functions/ibase-commit.xml:1.2 Wed Apr 17 03:07:03 2002 +++ phpdoc-it/reference/ibase/functions/ibase-commit.xml Fri Feb 20 15:39:09 2004 @@ -1,8 +1,6 @@ <?xml version="1.0" encoding="iso-8859-1"?> <!-- splitted from ./it/functions/ibase.xml, last change in rev 1.12 --> -<!-- last change to 'ibase-commit' in en/ tree in rev 1.23 --> -<!-- EN-Revision: 1.2 Maintainer: cortesi Status: ready --> -<!-- OLD-Revision: 1.46/EN.1.23 --> +<!-- EN-Revision: 1.4 Maintainer: cortesi Status: ready --> <refentry id="function.ibase-commit"> <refnamediv> <refname>ibase_commit</refname> @@ -11,13 +9,15 @@ <refsect1> <title>Descrizione</title> <methodsynopsis> - <type>int</type><methodname>ibase_commit</methodname> - <methodparam choice="opt"><type>int</type><parameter>link_identifier</parameter></methodparam> - <methodparam><type>int</type><parameter>trans_number</parameter></methodparam> + <type>bool</type><methodname>ibase_commit</methodname> + <methodparam choice="opt"><type>resource</type><parameter>link_identifier</parameter></methodparam> </methodsynopsis> <para> - Esegue il commit della transazione <parameter>trans_number</parameter> che è stata - creata con <function>ibase_trans</function>. + Se chiamata senza parametri, la funzione esegue il commit della transazione di default, sul link + di default. Se l'argomento identifica una transazione, verrà aseguito il commit + della transazione di default su quella connessione. Se l'argomento identifica una transazione + verrà eseguito il commit della transazione. + &return.success; </para> </refsect1> </refentry> http://cvs.php.net/diff.php/phpdoc-it/reference/ibase/functions/ibase-connect.xml?r1=1.2&r2=1.3&ty=u Index: phpdoc-it/reference/ibase/functions/ibase-connect.xml diff -u phpdoc-it/reference/ibase/functions/ibase-connect.xml:1.2 phpdoc-it/reference/ibase/functions/ibase-connect.xml:1.3 --- phpdoc-it/reference/ibase/functions/ibase-connect.xml:1.2 Wed Apr 17 03:07:03 2002 +++ phpdoc-it/reference/ibase/functions/ibase-connect.xml Fri Feb 20 15:39:09 2004 @@ -1,8 +1,6 @@ <?xml version="1.0" encoding="iso-8859-1"?> <!-- splitted from ./it/functions/ibase.xml, last change in rev 1.1 --> -<!-- last change to 'ibase-connect' in en/ tree in rev 1.2 --> -<!-- EN-Revision: 1.2 Maintainer: cortesi Status: ready --> -<!-- OLD-Revision: 1.46/EN.1.2 --> +<!-- EN-Revision: 1.6 Maintainer: cortesi Status: ready --> <refentry id="function.ibase-connect"> <refnamediv> <refname>ibase_connect</refname> @@ -13,7 +11,7 @@ <refsect1> <title>Descrizione</title> <methodsynopsis> - <type>int</type><methodname>ibase_connect</methodname> + <type>resource</type><methodname>ibase_connect</methodname> <methodparam><type>string</type><parameter>database</parameter></methodparam> <methodparam choice="opt"><type>string</type><parameter>username</parameter></methodparam> <methodparam choice="opt"><type>string</type><parameter>password</parameter></methodparam> @@ -50,6 +48,8 @@ <programlisting role="php"> <![CDATA[ <?php + $host = 'localhost:/path/to/your.gdb'; + $dbh = ibase_connect($host, $username, $password); $stmt = 'SELECT * FROM tblname'; $sth = ibase_query($dbh, $stmt); @@ -65,23 +65,33 @@ </para> <note> <para> - <parameter>buffers</parameter> è stato aggiunto in PHP4RC2. + Il parametro opzionale <parameter>buffers</parameter> è stato aggiunto in PHP 4.0.0. </para> </note> <note> <para> - <parameter>dialect</parameter> è stato aggiunto in PHP4RC2. E' funzionante + <parameter>dialect</parameter> è stato aggiunto in PHP 4.0.0. E' funzionante solo con InterBase 6 e versioni successive. </para> </note> <note> <para> - <parameter>role</parameter> è stato aggiunto in PHP4RC2. E' funzionante - solo con InterBase 5 e versioni successive. + <parameter>role</parameter> è stato aggiunto in PHP 4.0.0. E' funzionante + solo con InterBase 5 e versioni successive. + </para> + </note> + <note> + <para> + Se si verificano degli errori tipo "arithmetic exception", "numeric overflow", + oppure "string truncation. Cannot transliterate character between character + sets" (questo capita quando si tenta di usare dei caratteri accentati) + questa funzione o dopo la funzione <function>ibase_query</function>, occorre + impostare il set di caratteri (ad esempio ISO8859_1 oppure il set di caratteri corrente). </para> </note> <para> - Vedere anche: <function>ibase_pconnect</function>. + Vedere anche: <function>ibase_pconnect</function> e + <function>ibase_close</function>. </para> </refsect1> </refentry> http://cvs.php.net/diff.php/phpdoc-it/reference/ibase/functions/ibase-errmsg.xml?r1=1.2&r2=1.3&ty=u Index: phpdoc-it/reference/ibase/functions/ibase-errmsg.xml diff -u phpdoc-it/reference/ibase/functions/ibase-errmsg.xml:1.2 phpdoc-it/reference/ibase/functions/ibase-errmsg.xml:1.3 --- phpdoc-it/reference/ibase/functions/ibase-errmsg.xml:1.2 Wed Apr 17 03:07:03 2002 +++ phpdoc-it/reference/ibase/functions/ibase-errmsg.xml Fri Feb 20 15:39:09 2004 @@ -1,8 +1,6 @@ <?xml version="1.0" encoding="iso-8859-1"?> <!-- splitted from ./it/functions/ibase.xml, last change in rev 1.1 --> -<!-- last change to 'ibase-errmsg' in en/ tree in rev 1.37 --> -<!-- EN-Revision: 1.2 Maintainer: cortesi Status: ready --> -<!-- OLD-Revision: 1.46/EN.1.37 --> +<!-- EN-Revision: 1.4 Maintainer: cortesi Status: ready --> <refentry id="function.ibase-errmsg"> <refnamediv> <refname>ibase_errmsg</refname> @@ -17,8 +15,13 @@ <void/> </methodsynopsis> <simpara> - Restituisce una stringa contenente un messaggio di errore. + Restituisce una stringa contenente un messaggio di errore dalla più recente funzione InterBse + eseguita. La funzione restituisce &false; se non vi sono errori. </simpara> + <para> + Vedere anche + <function>ibase_errcode</function>. + </para> </refsect1> </refentry> http://cvs.php.net/diff.php/phpdoc-it/reference/ibase/functions/ibase-execute.xml?r1=1.2&r2=1.3&ty=u Index: phpdoc-it/reference/ibase/functions/ibase-execute.xml diff -u phpdoc-it/reference/ibase/functions/ibase-execute.xml:1.2 phpdoc-it/reference/ibase/functions/ibase-execute.xml:1.3 --- phpdoc-it/reference/ibase/functions/ibase-execute.xml:1.2 Wed Apr 17 03:07:03 2002 +++ phpdoc-it/reference/ibase/functions/ibase-execute.xml Fri Feb 20 15:39:09 2004 @@ -1,8 +1,6 @@ <?xml version="1.0" encoding="iso-8859-1"?> <!-- splitted from ./it/functions/ibase.xml, last change in rev 1.1 --> -<!-- last change to 'ibase-execute' in en/ tree in rev 1.2 --> -<!-- EN-Revision: 1.2 Maintainer: cortesi Status: ready --> -<!-- OLD-Revision: 1.46/EN.1.2 --> +<!-- EN-Revision: 1.6 Maintainer: cortesi Status: ready --> <refentry id="function.ibase-execute"> <refnamediv> <refname>ibase_execute</refname> @@ -11,26 +9,38 @@ <refsect1> <title>Descrizione</title> <methodsynopsis> - <type>int</type><methodname>ibase_execute</methodname> - <methodparam><type>int</type><parameter>query</parameter></methodparam> + <type>resource</type><methodname>ibase_execute</methodname> + <methodparam><type>resource</type><parameter>query</parameter></methodparam> <methodparam choice="opt"><type>int</type><parameter>bind_args</parameter></methodparam> </methodsynopsis> <para> Esegue una query preparata da <function>ibase_prepare</function>. + Se la query genera un errore, la funzione restituisce &false;. Se invece ha successo + ed si ha un set di risultati (tipo un query SELECT), + la funzione ne restituisce l'identificativo. Se la query ha successo e non vi sono + risultati, restituisce &true; + </para> + <para> Ciò è molto più efficace che usare <function>ibase_query</function> se state ripetendo uno stesso tipo di query molte volte cambiando solo alcuni parametri. - <informalexample> + </para> + <para> + <example> + <title>Esempio di uso di <function>ibase_execute</function></title> <programlisting role="php"> <![CDATA[ <?php + + $dbh = ibase_connect($host, $username, $password); + $updates = array( 1 => 'Eric', 5 => 'Filip', 7 => 'Larry' ); - $query = ibase_prepare("UPDATE FOO SET BAR = ? WHERE BAZ = ?"); + $query = ibase_prepare($dbh, "UPDATE FOO SET BAR = ? WHERE BAZ = ?"); while (list($baz, $bar) = each($updates)) { ibase_execute($query, $bar, $baz); @@ -38,7 +48,18 @@ ?> ]]> </programlisting> - </informalexample> + </example> + </para> + <note> + <para> + In PHP 5.0.0 e successivi, questa funzione restituisce il numero di righe toccate + dalla query (se >0 ed è applicabile al tipo di query). Una query che ha successo, + ma che non modifica nessuna righa (ad esempio un UPDATE su record che non esistono) restituirà + &true; + </para> + </note> + <para> + Vedere anche <function>ibase_query</function>. </para> </refsect1> </refentry> http://cvs.php.net/diff.php/phpdoc-it/reference/ibase/functions/ibase-fetch-object.xml?r1=1.2&r2=1.3&ty=u Index: phpdoc-it/reference/ibase/functions/ibase-fetch-object.xml diff -u phpdoc-it/reference/ibase/functions/ibase-fetch-object.xml:1.2 phpdoc-it/reference/ibase/functions/ibase-fetch-object.xml:1.3 --- phpdoc-it/reference/ibase/functions/ibase-fetch-object.xml:1.2 Wed Apr 17 03:07:04 2002 +++ phpdoc-it/reference/ibase/functions/ibase-fetch-object.xml Fri Feb 20 15:39:09 2004 @@ -1,8 +1,6 @@ <?xml version="1.0" encoding="iso-8859-1"?> <!-- splitted from ./it/functions/ibase.xml, last change in rev 1.1 --> -<!-- last change to 'ibase-fetch-object' in en/ tree in rev 1.9 --> -<!-- EN-Revision: 1.2 Maintainer: cortesi Status: ready --> -<!-- OLD-Revision: 1.46/EN.1.9 --> +<!-- EN-Revision: 1.8 Maintainer: cortesi Status: ready --> <refentry id="function.ibase-fetch-object"> <refnamediv> <refname>ibase_fetch_object</refname> @@ -12,7 +10,8 @@ <title>Descrizione</title> <methodsynopsis> <type>object</type><methodname>ibase_fetch_object</methodname> - <methodparam><type>int</type><parameter>result_id</parameter></methodparam> + <methodparam><type>resource</type><parameter>result_id</parameter></methodparam> + <methodparam choice="opt"><type>int</type><parameter>fetch_flag</parameter></methodparam> </methodsynopsis> <para> Elabora una riga come un pseudo-oggetto da un @@ -22,14 +21,14 @@ <informalexample> <programlisting role="php"> <![CDATA[ -<php - $dbh = ibase_connect ($host, $username, $password); +<?php + $dbh = ibase_connect($host, $username, $password); $stmt = 'SELECT * FROM tblname'; - $sth = ibase_query ($dbh, $stmt); - while ($row = ibase_fetch_object ($sth)) { - print $row->email . "\n"; + $sth = ibase_query($dbh, $stmt); + while ($row = ibase_fetch_object($sth)) { + echo $row->email . "\n"; } - ibase_close ($dbh); + ibase_close($dbh); ?> ]]> </programlisting> @@ -41,7 +40,15 @@ ulteriori righe. </para> <para> - Vedere anche <function>ibase_fetch_row</function>. + Il parametro <parameter>fetch_flag</parameter> è una combinazione delle costanti IBASE_TEXT e IBASE_UNIXTIME + con l'operatore OR. Passando IBASE_TEXT si forza questa funzione a resituire il contenuto del BLOB + anzichè l'identificatore del BLOB. Passando IBASE_UNIXTIME si forza la funzione a restituire + i valori di data/ora com Unix timestamp anzichè come stringa formattata. + </para> + <para> + Vedere anche + <function>ibase_fetch_row</function> e + <function>ibase_fetch_assoc</function>. </para> </refsect1> </refentry>
« previous php.doc.it (#556) next »