How to query two tables based on whether or not record exists in a third?
- by Katherine
I have three tables, the first two fairly standard:
1) PRODUCTS table:
pid
pname, etc
2) CART table:
cart_id
cart_pid
cart_orderid etc
The third is designed to let people save products they buy and keep notes on them.
3) MYPRODUCTS table:
myprod_id
myprod_pid
PRODUCTS.prod_id = CART.cart_prodid = MYPRODUCTS.myprod_pid
When a user…