"; // $conn = oci_connect('scott', 'Son', 'localhost/orcl.gateway.2wire.net'); // Excute the call to the PL/SQL stored procedure $sql = "select * from emp"; $stmt1 =oci_parse($conn, $sql); oci_execute($stmt1); echo "uses oci_bind_name
". "begin emp_proc1(:rc);end;"; // HEADER TABLE echo ""; echo ""; $ncols = oci_num_fields($stmt1); for ($i = 1; $i <= $ncols; $i++) { $column_name = oci_field_name($stmt1, $i); echo ""; } // echo "
$column_name
\n"; oci_free_statement($stmt1); // $refcur = oci_new_cursor($conn); $stmt = oci_parse($conn, "begin emp_proc1(:rc);end;"); oci_bind_by_name($stmt, ":rc",$refcur, -1, OCI_B_CURSOR); oci_execute($stmt); // Execute and fetch from the cursor oci_execute($refcur); // treat the returned cursor as an OCI8 statement resource //report $nrows =""; echo "\n"; while($row = oci_fetch_array($refcur, OCI_ASSOC)) { echo "";$nrows++; foreach ($row as $item) { echo ""; } echo "\n"; } echo "
". htmlentities($item) . "
\n"; // echo " no of rows : ". $nrows; oci_free_statement($stmt); oci_close($conn); echo "
Oracle db conection closed"; // ?>