Hi ,all


i have two field one is checkin date and other is checkout date .
i have table structure as i attached jpg file here. when user enter dates i have to show his season on the basis of hotel id?

note:user can enter any date checkin date and checkout date


any help appre...

thanx

What did you try already that did not work for you?

What did you try already that did not work for you?

SELECT SeasonID,SeasonName FROM tblSeason 
where HotelID='14' and (startdate<= '2010/10/01') and (enddate >= '2010/12/31')

i try using this query but not getting write output based on checkin checkout.

Please show the table structure (in form of a CREATE TABLE statement). Maybe your datetime fields are in unix seconds format? Also please show the row with the HotelID 14 which should match your query.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.