I have table1 and table2 in a Mysql database.
Each table has a field with the same name, let’s say “id”.
I need a query where I can get the “id” field value of both tables. I tried this:
SELECT
table1.id,
table2.id
FROM...
But I got an error message:
Unknown column ‘table1.id’ in ‘field list’
you need to add
ALIASon the columnsand call their alias (for example)
$row["table1_ID"]in PHP .on more thing
Unknown column 'table1.id' in 'field list'results from columns that are unable to be find by the server on your join statements.follow-up question, can you post the whole query?