i can retrieve data from oracle db by php when i try do loop to get data it give me error
undefined index: id in C:\xampp\htdocs\testing\test.php on line 15
here is my code
<?php
$username = "kemo";
$password = "kemoacer77";
$server = "localhost/XE";
$conn = oci_connect($username, $password, $server);
if(!$conn){
die("connect error".oci_error());
}
$stid = oci_parse($conn, 'SELECT id, username FROM users');
oci_execute($stid);
while (($row = oci_fetch_array($stid, OCI_BOTH))) {
// Use the uppercase column names for the associative array indices
echo $row['id'] ;
echo $row['username'];
}
oci_free_statement($stid);
oci_close($conn);
?>