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

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

routes - Laravel 4 Wildcard Routing to Different Controllers -

cross browser - XSLT namespace-alias Not Working in Firefox or Chrome -