Skip to content

Instantly share code, notes, and snippets.

@chadhutchins
Created February 20, 2014 03:12
Show Gist options
  • Save chadhutchins/9106455 to your computer and use it in GitHub Desktop.
Save chadhutchins/9106455 to your computer and use it in GitHub Desktop.
Remove old SugarChimp events.
<?php
$db_time = date($timedate->get_db_date_format(), strtotime("-20 DAY"));
$query = "DELETE FROM atc_sugarchimpclient WHERE (status = 'Processed' OR status = 'Error') AND date_entered <= '{$db_time}'";
$db->query($query);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment