Register Members List Search Today's Posts Mark Forums Read

Reply
 
Thread Tools
  #1  
Old 22 Jun 2015, 13:12
viper357's Avatar
viper357 viper357 is offline
 
Join Date: Dec 2006
How to automate database query?

Hi all

The "Execute SQL Query" option, Is it possible to automate this?

I need to execute this query once a week, every week.
UPDATE rbs_banners SET m_expired=0

Thanks.
__________________
Marine Aquariums
Reply With Quote
  #2  
Old 22 Jun 2015, 13:37
kh99 kh99 is offline
 
Join Date: Aug 2009
Real name: Kevin
You could make a plugin using hook cron_script_cleanup_daily and code like this:

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.


It's not perfect. For one thing if, for example, you set it up to run on Monday and for some reason the cleanup script doesn't run (like your forum is down or something), it wouldn't run until the next week. BUt it might be good enough for your purposes.
Reply With Quote
  #3  
Old 22 Jun 2015, 13:50
viper357's Avatar
viper357 viper357 is offline
 
Join Date: Dec 2006
That seems great, thank you.
__________________
Marine Aquariums
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

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


New To Site? Need Help?

All times are GMT. The time now is 13:57.

Layout Options | Width: Wide Color: