I have the Query below to check for unsold Products in my oscommerce store.
$products_query_raw = " select p.products_id, p.products_quantity, p.products_model, pd.products_name from (" . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd) LEFT JOIN " . TABLE_ORDERS_PRODUCTS . " op ON p.products_id = op.products_id where op.products_id IS NULL and p.products_id = pd.products_id order by p.products_model";
This seems to work fine, but I want to limit it to search for unsold products within a date range. The dates for the orders are located in the table ORDERS and the ordered products in the table ORDER_PRODUCTS.
I tried a few things but I cant seem to get it right, if there is anyone that can help me out I would be grateful.