Find out the data that is higher than 20 after deduction and delete it?


online

time() online 20

clipboard.png

clipboard.png

id 2"s online_status deduction time () has been higher than 30, but id 1 does not have it, but it is still found out?


 

DELETE FROM your_table WHERE online < NOW ()-20;

For more precise deletion, add where condition

later.
Menu