Quote:
Originally Posted by jtracking
The error states: Column 'sales_id' in field list is ambiguous
|
MySQL doesn't know which table you are referring to, because sales_id is obviously in more than one table.
You need to change it to SELECT thistable.sales_id - replacing thistable with the relevant tablename - you have done this in other places in your SQL.