How can PHP handle conflicting field names from different tables in an Inner Join query in Oracle?

When performing an Inner Join query in Oracle with tables that have conflicting field names, you can use aliases to differentiate between the fields. By assigning unique aliases to the fields in each table, you can avoid conflicts and retrieve the correct data in your PHP application.

$query = "SELECT table1.field AS field1, table2.field AS field2 
          FROM table1 
          INNER JOIN table2 ON table1.id = table2.id";

// Execute the query and fetch the results
$stmt = oci_parse($conn, $query);
oci_execute($stmt);

while ($row = oci_fetch_assoc($stmt)) {
    echo $row['field1'] . " - " . $row['field2'] . "<br>";
}