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.
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b35e89-3437f.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b35e89-3437f.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?