I have a prolem with this code
$stmt = oci_parse($db, $sql);
$isQueryOk = oci_execute($stmt);
if ($isQueryOk) {
while (($row = oci_fetch_assoc($stmt)) != false) {
array_push($results, $row);
}
echo json_encode($results);
} else {
$msg = "Error FETCHING ALL [$sql] on " . mb_strtoupper($dbTable) . "!";
}
The problem is that if oci_fetch_assoc($stmt)
return 20000 rows, the while (($row = oci_fetch_assoc($stmt)) != false) {
array_push($results, $row);
}
takes to much time. Is there a way that i can return echo json_encode($results);
without the WHILE cycle.
Thanks in advance.