0
I’m trying to create a system so that the Cron run a PHP file every 2 hours, and check if there has been any record inserted in a given table, if there are new records, know the total amount of new records in the meantime.
The only approach I thought of was to consult with a COUNT, save the amount of records to a new table and then run the query that will send the notification if you have new records.
The question is: Is this approach ideal? Is there something easier or even more correct?
What if I delete a record and then create a new one? The total will be the same. In that case it would be more necessary to check if there is an id larger than the previous one.
– lazyFox
Um, really, I hadn’t thought about it. I’ll see what I do, and thank you!
– Guilherme Lirio