Raised This Month: $ Target: $400
 0% 

sql checker


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 04-19-2021 , 16:27   Re: sql checker
Reply With Quote #2

You can do either, I would recommend pruning based on last update. To do this, add an int(11) field named LastTouched and when you create or update a record, set it to get_systime(). At map change, execute this to delete records that have not been touched in over 30 days (86400 is the number of seconds in 1 day).

PHP Code:
formatexszSQL charsmaxszSQL ) , "DELETE FROM myTable WHERE LastTouched < %d;" , ( get_systime() - ( 30 86400 ) ) ); 
__________________

Last edited by Bugsy; 04-19-2021 at 16:28.
Bugsy is offline
 



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 02:36.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode