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

sql - VB.NET Operand type clash: date is incompatible with int error -

SVG stroke-linecap doesn't work for circles in Firefox? -

python - TypeError: Scalar value for argument 'color' is not numeric in openCV -