Hi Jeff
You are comparing your orders_id to your products_id on your join. You need to join orders to orders_products on order_id and then do a second join for your products table. Like
This is from doing an SQL in phpMyAdminCode:SELECT p.products_id, o.date_purchased, q.products_status FROM zen_orders o JOIN zen_orders_products p ON o.orders_id = p.orders_id JOIN zen_products q ON p.products_id = q.products_id WHERE o.date_purchased <= DATE_SUB( CURDATE( ) , INTERVAL 90 DAY ) AND q.products_status =1
I'm still thinking about the other part of your question.


Reply With Quote
