I know there are two tables
but the relevant fields in
customer_id, base_total_paid etc but no relation to product
and in the other table
order_id, product_id, but no relation to customer.
So I cant see any common field to link them.
I am trying to export 2 tables so that I can create a new database from scratch not based in magento, and I need to know what each customer ordered.
Something like this:
select product_id, customer_id from cp8_sales_flat_order left join cp8_sales_flat_order_item on sales_flat_order_item.order_id = sales_flat_oder.entity_id
I am getting an error that #1054 - Unknown column 'sales_flat_order_item.order_id' in 'on clause'