Page 1 of 1

Deactivating campaigns 6 months old

PostPosted: Sun Apr 19, 2015 9:23 pm
by rheymzkilove
Hi guys,

i want to deactivate old campaings which is not in use about 6 months old and above. im new to mysql and im using mysql workbench to access our vicidial DB.
i dont know the exact command to run. Can you teach me on what command do i need to use?

Thanks

Re: Deactivating campaigns 6 months old

PostPosted: Thu Apr 23, 2015 9:12 pm
by MJCoate
This depends on how you are determining which ones have not been in use. Assuming you want to use the call date, I think this should do it:

UPDATE vicidial_campaigns SET active='N' WHERE campaign_calldate => 'YYYY-MM-DD HH:MM:SS';

Where the datetime is six months less your current date.

Re: Deactivating campaigns 6 months old

PostPosted: Mon Apr 27, 2015 11:09 am
by okli
Just a friendly reminder- if you are new to MySQL be very very careful if you are in production when managing vicidial directly from the database. It takes only a single overlooked query to give you serious troubles.
Get more familiar with MySQL and only then play with vicidial database, keeping backups handy.