if (!$conn) {
$e = oci_error();
trigger_error(htmlentities($e['message'], ENT_QUOTES), E_USER_ERROR);
}
$sql = 'SQL Here';
Then, I fetch records and would like to display it into a simple table as below. But get error while fetching the records. not sure what the issue is.
echo "<table border='1'>
";
while ($row = oci_fetch_array($stid, OCI_ASSOC + OCI_RETURN_NULLS)) {
echo "<tr>
";
foreach ($row as $item) {
echo " <td>" . ($item !== null ? htmlentities($item, ENT_QUOTES) : " ") . "</td>
";
}
echo "</tr>
";
}
echo "</table>
";
?>
Error message I get in the logs is:
[Tue Oct 25 10:41:24.186513 2016] [:error] [pid 16068] [client 10.170.33.235:59928] PHP Warning: oci_fetch_array(): ORA-24374: define not done before fetch or execute and fetch in /var/www/html/php/markitv7_1.php on line 45
[Tue Oct 25 10:42:09.508162 2016] [:error] [pid 16119] [client 10.170.33.235:59934] PHP Warning: oci_execute(): ORA-00904: "TRADING_SYMBOL": invalid identifier in /var/www/html/php/markitv7_1.php on line 42
[Tue Oct 25 10:42:09.508319 2016] [:error] [pid 16119] [client 10.170.33.235:59934] PHP Warning: oci_fetch_array(): ORA-24374: define not done before fetch or execute and fetch in /var/www/html/php/markitv7_1.php on line 45