|
Hi all, I have a little problem with Zend_Db and Oracle Cursor. A oracle procedure called FA_BILL.SEARCH returns oracle cursor $conn = oci_connect('','','') or die; $sql = "BEGIN :elenco := FA_BILL.SEARCH (:type, :year, :cod); END;"; $stmt = oci_parse($conn, $sql); // Bind the input num_entries argument to the $max_entries PHP variable $tipo= 1; oci_bind_by_name($stmt,":type",$max_entries,32); $anno= 2006; oci_bind_by_name($stmt,":year",$anno,32); $codice_dipendenza= null; oci_bind_by_name($stmt,":cod",$codice_dipendenza,32); // Create a new cursor resource $elenco = oci_new_cursor($conn); // Bind the cursor resource to the Oracle argument oci_bind_by_name($stmt,":elenco",$elenco,-1,OCI_B_CURSOR); // Execute the statement oci_execute($stmt); // Execute the cursor oci_execute($elenco); // Use OCIFetchinto in the same way as you would with SELECT echo '<pre>'; while ($entry = oci_fetch_assoc($elenco )) { print_r($entry); } Works, but if I use Zend_Db $db = Zend_Db::factory('oracle', $params); I can't bind the oracle cursor. Anybody can help me? Thank you very much, Enrico -- Faifer Enrico SOSI - Sistemi Innovativi Banca Popolare di Sondrio Via Nazionale - Loc. Ranèe 542 23010 - SAN PIETRO BERBENNO (SO) tel: 0342 528594 |
_______________________________________________ New York PHP Community Talk Mailing List http://lists.nyphp.org/mailman/listinfo/talk NYPHPCon 2006 Presentations Online http://www.nyphpcon.com Show Your Participation in New York PHP http://www.nyphp.org/show_participation.php
