-2
My doubt is how to query date and time with an IF to manipulate a php script on schedule and scheduled day.
I came to do so at first it worked more I know what went wrong after. In the example below would run every Saturday half day,
if(date('D') == 'Sat' AND date('H:i') == '12:00') {
echo"Isso é um teste";
}
This will only be executed if it is
12:00
, any delay will make it not run. I, very sense this build. First, that Mysql already has a resource for that which is theMySQL Scheduled Event
(not to confuse Events with Triggers). Second, that this could be done implicitly when the "player" requests the information, if you have the date of the "quest" and verify that it was done before this current week, then it must be "generated a new quest" (if this is the purpose of the code, just deducing).– Inkeliz
In the thesis it was to be able to manipulate the query by php. ?
– OnAir Publicidade Digital
I enabled in mysql SET GLOBAL event_scheduler = ON; However I can’t get Event to do it every Saturday noon.
– OnAir Publicidade Digital
Failed to declare the
date_default_timezone_set('America/Sao_Paulo');
Thank you.– OnAir Publicidade Digital