Answer the question
In order to leave comments, you need to log in
How to do database change tracking in PHP?
I am writing a graduation project - an online auction. Each lot hangs on the site for a certain time during which people can place bids. After the specified time has elapsed, the winner is determined and a notification is sent to him.
The bottom line is that one lot can hang for 2 hours, and the other 2 weeks - so there are 2 fields in the table: the start time of the auction and the end time. It is necessary to make sure that the end time is somehow checked and certain actions are taken. Now there is a task for the crown (once a minute), I think this is the wrong approach, because when a large number of lots is accumulated, it will be very, very slow.
There is an option to write a nodejs module that will hang in memory and track changes. As soon as the time of any lot ends, the module will check it and give a response to the PHP script, but this is labor-intensive, and time is short. What proposals will be?
Answer the question
In order to leave comments, you need to log in
Events + UDF
dev.mysql.com/doc/refman/5.6/en/create-event.html
dev.mysql.com/doc/refman/5.6/en/adding-udf.html
An Event is created for each lot at the end time, pulling a UDF that calls PHP code.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question