Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Customer orders by date range


Guest

Recommended Posts

Hi all,

 

This should be really simple but I have very limited knowledge in PHP and MySql...

 

I would like to generate a page with all my customers orders with customer names, products they ordered, within a date range (weekly) i.e. all orders from 01/01/2003 to 01/07/2003.

 

I just need data from 2 tables: orders and orders_products and don't need any store header or anything on that page. I know this must be easy in a sql select statement or a simple php page but, again, I'm just beginning to learn PHP. I checked in the contributions section but no luck.

 

Any help would be much appreciated.

 

Thanks

 

Pierre

Link to comment
Share on other sites

Something along these lines:

select * from orders_products p,  orders o where o.orders_id=p.orders_id and date_purchased > '2003-01-01 00:00:00' and date_purchased < '2003-01-08 00:00:00'

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...