Jump to content

Stopping a campaign in 1 click - mysql requests


checkad

Recommended Posts

Hi,

I'm building my own script to be able to fully desactivate one campaign in one click, without having to go inside every campaign, banners and zone to set it up to 0 or desactivate.
I've tested it and it works. But could you please confirm that the 3 following mysql requests are taking "everything" into account to do it properly ?

where $campaignid is the id of the campaign

UPDATE revive_banners SET weight=0,status=1 WHERE revive_banners.campaignid='$campaignid'
UPDATE revive_campaigns SET views=0,clicks=0,priority=0,target_impression=0,expire_time=NOW() WHERE campaignid='$campaignid'
DELETE a.* FROM revive_ad_zone_assoc a LEFT JOIN revive_banners b ON b.bannerid = a.ad_id WHERE a.zone_id > 0 AND b.campaignid='$campaignid'

Thank you

Edited by Addev
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...