Hi There,
I am working a site project and i am trying to implement a sales period
on the items based on sales start date and sales end date. HERE IS THE DB
[php]articles
id name price
1 Gy-shirt 190
2 GX-shirt 200
3 GX-glass 250[/php]
[php]sales
id product_id price start_date end_date
1 1 180 2016-08-23 2016-08-27
2 2 190 2016-08-23 2016-08-30
3 3 230 2016-08-21 2016-08-22[/php]
So i want to select the based on the opening and closing sales date
Here is my query.
[php]
SELECT s.price, CONCAT(shoe.name,’ ‘,shoe.filename,’ ',shoe.price) FROM articles AS shoe LEFT JOIN sales AS s ON (shoe.id = s.product_id BETWEEN s.start_date AND s.end_date )[/php]
But it does not return the sales price of first two articles. Why?