Hi;
Im trying to do a products have been sold report from a store using a query from Data Base, I need select just products that have been sold successfully, I don't know if I could use orders_status field, but this query shows all records with status 1 that means pending status, query is:
SELECT o.customers_id, op.orders_id, op.products_id, op.products_quantity, op.products_name, op.products_price,
op.products_model, o.customers_name, o.customers_company, o.customers_email_address, o.date_purchased,
o.orders_status
FROM orders o, orders_products op
WHERE op.orders_id = o.orders_id and date_purchased between '2010-05-01 00:00:00' AND '2010-05-31 23:59:00'
ORDER by o.date_purchased
Is this query ok for report that I need?
Best regards
Cheers
Bookmarks