for($i = 0; $i ora_numcols($Cursor); $i++)
{
print("
// get column info
print(ora_columnname($Cursor, $i). ": ");
print(ora_columntype($Cursor, $i). " ");
print("(". ora_columnsize($Cursor, $i). ")");
print("
}
print("\n");
// get each row
while(ora_fetch($Cursor))
{
print("
//loop over each column
for($i = 0; $i ora_numcols($Cursor); $i++)
{
print("
// get column
print(ora_getcolumn($Cursor, $i));
print("
}
print("
}
//close table
print("\n");
print("
\n");
print("Rows: ". ora_numrows($Cursor));
print("
\n");
// Close the Oracle cursor
ora_close($Cursor);
// disconnect.
ora_logoff($Connection);
?>
boolean ora_fetch(integer cursor)
The ora_fetch function causes a row from an executed query to be fetched into the
cursor. This allows you to call ora_getcolumn. See ora_exec for an example of use.