$sql = 'SELECT * FROM reunion';
$stmt = oci_parse($conn, $sql);
oci_execute($stmt);
echo '<pre>';
echo 'Reached'; // works
while (($row = oci_fetch_array($stmt, OCI_BOTH)) != false) {
print_r($row); // prints nothing
}
echo '</pre>';
oci_commit($conn);
oci_close($conn);
The above code prints nothing ! I have tested the connection and the table contains rows.
According to the official docs, oci_fetch_array
returns an array containing the next result-set row of a query. Each array entry corresponds to a column of the row. This function is typically called in a loop until it returns FALSE
, indicating no more rows exist.