MySQL Forums
Forum List  »  PHP

Price : range between two dates
Posted by: Malla Ramanaji
Date: April 10, 2007 04:00AM

Hi friends

I am in learning stage of phpmysql. I am unable get script for following:

id fr_date till_date price
2 2007-04-01 2007-04-10 1000.00
3 2007-04-11 2007-04-20 1200.00
4 2007-04-21 2007-04-30 1500.00
5 2007-05-01 2007-05-10 1800.00
6 2007-05-21 2007-05-31 2000.00
7 2007-06-01 2007-06-10 2150.00

Database name : price_db
Table name : rate_table
Primary key is : id (auto increment)
Date format is : yyyy-mm-dd


I would like to know price on particular day of 2007-04-18, (the date is fallen between 2007-04-11 and 2007-04-20 and its id is 3)
It should show results is : 1200


Kindly send me mysql script for above.

Options: ReplyQuote


Subject
Written By
Posted
Price : range between two dates
April 10, 2007 04:00AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.