I want to pull out the records that have a date that is LIKE today's date.
I have this query
$query = "select * from calendar_items WHERE expiredate LIKE '$todays_date %'
or upcoming_event_featured_date like '$todays_date %'
ORDER BY expiredate ASC";
Now I have 3 more upcoming_event_featured_date's: upcoming_event_featured_date2, upcoming_event_featured_date3, upcoming_event_featured_date4
So I want to run a query that will grab the results that has a date LIKE that of the four upcoming_event_featured_date's (upcoming_event_featured_date, upcoming_event_featured_date2, upcoming_event_featured_date3, upcoming_event_featured_date4).
Would the query look something like this?
$query = "select * from calendar_items
WHERE expiredate LIKE '$todays_date %' or
(upcoming_event_featured_date like '$todays_date %' or
upcoming_event_featured_date2 like '$todays_date %' or
upcoming_event_featured_date3 like '$todays_date %' or
upcoming_event_featured_date4 like '$todays_date %')
ORDER BY expiredate ASC";