View Full Version : Setting all existing infractions to expire
Originally, when we set up infractions, we decided on them never expiring. However, we've now decided that we will let them expire after a year. Is there an easy way to set the expiration date on all existing infractions? Perhaps a MySQL query or something? Thanks.
snakes1100
03-02-2008, 07:09 PM
I don't believe you can do this, that value is on a timer, if you change that value with a new value, i dont believe it will count down as it should.
That value is in the infraction table in the "expires" column.
I couldn't just set the expires field to the date the infraction was made plus however many seconds are in a year?
snakes1100
03-02-2008, 07:57 PM
As i posted above, i dont believe you can.
Well, I tested it out on one member, and updated the expires field on one infraction from 0 to the date it was added plus 31536000 (one year in seconds), then I ran the scheduled task to update infractions. The infraction shows as expired and their points went down accordingly, so I think it worked, so I'm going to try it on all members, backing up the database before just to be safe
snakes1100
03-02-2008, 08:19 PM
As i said, i wasnt sure it would work or not, but you can use this query to mass update it
UPDATE infraction SET expires ='X';
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.