//close connection
ocilogoff($Connection);
?>
integer ocifetchstatement(integer statement, reference data)
The ocifetchstatement function places an array with all the result data in the data
argument and returns the number of rows. The data array is indexed by the names of the
columns. Each element is an array itself which is indexed by integers starting with zero.
Each element in this subarray corresponds to a row.
<?
//connect to database
$Connection = ocilogon("scott", "tiger");
//assemble query
$Query = "SELECT * ";
$Query .= "FROM emp ";
//parse query
$Statement = ociparse($Connection, $Query);
//execute query
ociexecute($Statement);
print("
$key/TH>\n"); //print data | $value[$i]/ | \n"); } print(" |
---|
//free the statement
ocifreestatement($Statement);