I have a mysql
query prepared to search by date range:
select * from active_listings
where open_date >= '$start_date'
AND open_date <='$end_date'
which works excellent.
I have two columns in mysql: open_date and next_open_date. How can I do a range clause which includes the open_date
and next_open_date
.
I tried doing:
select * from active_listings
where (open_date,next_open_date) >= '$start_date'
AND (open_date,next_open_date) <='$end_date')
I get no results.
Could somebody please guide me or show me the directions on how I could use multiple columns for date range.
Thanks!