vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   Setting all existing infractions to expire (https://vborg.vbsupport.ru/showthread.php?t=171919)

t325 03-02-2008 06:45 PM

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.

t325 03-02-2008 07:40 PM

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.

t325 03-02-2008 08:09 PM

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';


All times are GMT. The time now is 03:23 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01836 seconds
  • Memory Usage 1,707KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (6)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete