I am making a script to trigger a message according to the record recorded in the database. It's like a CRON task.
I'm going to put a PHP page in the CRON task of Cpanel, but how can I make a query that checks every minute if the record is on the time and day to be fired?
In this image example, you should return the record when: 9 hours 5 minutes Monday, Tuesday or Thursday
See what month and day is with *
SELECT *
FROM `schedule`
WHERE 1 =1
AND (
(
dia = DAY( NOW( ) )
)
OR (hora = DAY( NOW( ))
)
How could I check the asterisk and not get into the conditions, I will use OR operator will it work?