什么版本??建议先查看PHP手册

解决方案 »

  1.   

    ocifetchstatement
    (PHP 3>= 3.0.8, PHP 4 )ocifetchstatement -- Fetch all rows of result data into an array
    Description
    int ocifetchstatement ( resource stmt, array & variable)
    ocifetchstatement() fetches all the rows from a result into a user-defined array. ocifetchstatement() returns the number of rows fetched. 例子 1. ocifetchstatement() example<?php
    /* OCIFetchStatement example [email protected] (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";
       while ( list( $key, $val ) = each( $results ) ) {
          print "<TH>$key</TH>\n";
       }
       print "</TR>\n";
       
       for ( $i = 0; $i < $nrows; $i++ ) {
          reset($results);
          print "<TR>\n";
          while ( $column = each($results) ) {   
             $data = $column['value'];
             print "<TD>$data[$i]</TD>\n";
          }
          print "</TR>\n";
       }
       print "</TABLE>\n";
    } else {
       echo "No data found<BR>\n";
    }      
    print "$nrows Records Selected<BR>\n";
     
    OCIFreeStatement($stmt);
    OCILogoff($conn);
    ?>
     
     
      

  2.   

    我不是这个意思,我意思是我在ORACLE中自定义了一个能返回记录集的函数,现在什么在PHP中调用它。
      

  3.   

    假设你的函数是xxx();<?
    $test=xxx();print_r($test);
    ?>try......-_-~