I would like to retrieve the column names from a multi-table join. The column names for each table share the same names.
SELECT e.id, e.name, s.id, s.name
FROM employee AS e
JOIN supervisor s ON e.id = s.id
WHERE s.id = 123;
$result = odbc_exec( $connect_id, $query );
$row = odbc_fetch_array( $result );
foreach( $row as $key => $value )
{
print $key;
}
This only prints distinct column names. I want it to print each column name from the result even though id (etc) appears twice.
Any ideas?