I'm trying to add suggestions to product pages along the lines of : "Customers who purchased this item also purchased x and y".
The way the data is compiled right now is a mysql table with 3 rows.
PRODUCT | CUSTOMER |QUANTITY
Product is the product ID. Customer is the customer ID. Quantity is the number of time that product was bought by that customer.
For each product description page, the system needs to figure out which users bought that product, what other products those users bought, in what quantity and then return the 2 products that were bought the most by people who bought the current product.
Hopefully this makes sense and someone can point me in the right directions as to what the mysql query should look like.
Thanks.