print("
//print a line like "
print(ocicolumnname($Statement, $i). " ");
print(ocicolumntype($Statement, $i));
print("(". ocicolumnsize($Statement, $i). ")");
print("\n");
}
print("\n");
//fetch each row
while(ocifetch($Statement))
{
print("
//loop over each column
for($i=1; $i = ocinumcols($Statement); $i++)
{
//print a line like "
print("
if(ocicolumnisnull($Statement, $i))
{
print("(null)");
}
else
{
print(ociresult($Statement, $i));
}
print("
}
print("
}
//close table
print("\n");
//free the statement
ocifreestatement($Statement);
//close connection
ocilogoff($Connection);
?>
boolean ocifetchinto(integer statement, reference data, integer
mode)
Use ocifetchinto to get the next row of data from an executed statement and place it in
an array. The data argument will contain an array that by default will be indexed by
integers starting with 1. The optional mode argument controls how the array is indexed.
You may add the constants listed in Table 13.10 to get the features you desire.