Hello,
This question is regarding working with PHP-Oracle.
To display result of a query we use -
oci_result($statement,‘COLUMN_NAME’) function… to demonstrate the use of this function please see the following snippet -
Let’s suppose we are fetching EMPNO column from EMP table from scott’s schema -
$dbconn=oci_connect('scott','tiger');
$query="select * from emp";
$stmt=oci_parse($dbconn,$query);
oci_execute($stmt);
while (oci_fetch($stmt))
{
echo oci_result($stmt,'EMPNO');
}
Now this code displays all rows under EMPNO column… but suppose if I do not know how many columns are there in a table and want to display all columns along with all rows, how will I do that?
Urgent help required please…
Thanks in advanced