Hi
in need of some help! I am working with an oracle database, I need this code changing below so that it only outputs the data within the table instead of the the coumn name's etc as well as the data.
Thanks
//Program to read the contents of S_ITEM using ocifetchstatement()
// and display them in a table (column by column)
putenv("ORACLE_SID=teaching");
if ($Connection = ocilogon("", ""))
{
print "Connection OK<br> \n";
$sql = "select * from s_item";
// Parse Oracle query
$Statement = ociparse($Connection, $sql);
// Execute Oracle query
ociexecute($Statement);
print "SQL query executed...<br> \n";
print "<table width=500 border=1><tr>";
// fetch all rows into an array
if ($Rows = ocifetchstatement($Statement, &$Data))
{
while(list($key, $value) = each($Data))
{
print("<TR>\n");
//column name
print("<TH>$key</TH>\n");
//print data
for ($i=0; $i < $Rows; $i++)
{
print("<TD>$value[$i]</TD>\n");
}
}
}
print("</TABLE>\n");
//free the statement
ocifreestatement($Statement);
//close connection
ocilogoff($Connection);
print "Logged off.";
}
else
{
var_dump( ocierror($Connection));
} // end of if expression