I have the following mySQL query that I would like to execute inside a PHP script:
$sql = "INSERT INTO InsertingTable1 (place, device, description, amount) SELECT `place`, `device`,`description`,`amount`
FROM Table1 INNER JOIN CheckingTable1
ON Table1.device = CheckingTable1.device
ORDER BY place ASC, device ASC" ;
The error I get is:
Fatal error: Uncaught exception 'mysqli_sql_exception' with message 'Column 'Device' in field list is ambiguous'
database.InsertingTable1deviceinselect statementwith respectedtable namelikeTable1.deviceorCheckingTable1.device