mysql - SQL Statement Database -


i have mysql table holds dates booked (for holiday properties).

example...

table "listing_availability"

rows...

availability_date (this shows date format 2013-04-20 etc)

availability_bookable (this can yes/no. "yes" = booking changeover day , "available". "no" means property booked dates)

all other dates in year (apart ones "no") available booked. these dates not in database, booked dates.

my question is... have make sql statement first calls date function (not sure if correct terminology)

then removes dates "availability_date" "availability_bookable" = "no"

this give me dates available bookings, year, property.

can help?

regards m

seems you've written query.

select availability_date listing_availability availability_bookable <> 'no' , availability_date >= curdate() , year(curdate()) = year(availability_date) 

Comments

Popular posts from this blog

android - Why am I getting the message 'Youractivity.java is not an activity subclass or alias' -

Making Empty C++ Project: General exception (Exception from HRESULT:0x80131500) Visual Studio Community 2015 -

How to fix java warning for "The value of the local variable is not used " -