added a query to populate the vicidial_campaign_stats table with any missing campaign_ids just in case they were accidently removed.

git-svn-id: svn://192.168.202.10@1288 3d104415-ff17-0410-8863-d5cf3c621b8a
This commit is contained in:
mikec
2009-12-29 15:49:37 +00:00
parent 89a63aff07
commit 8f44dea3df
+6
View File
@@ -254,6 +254,12 @@ $dbhA = DBI->connect("DBI:mysql:$VARDB_database:$VARDB_server:$VARDB_port", "$VA
if ($DBX) {print "CONNECTED TO DATABASE: $VARDB_server|$VARDB_database\n";}
# make sure the vicidial_campaign_stats table has all of the campaigns.
# They should exist, but sometimes they get accidently removed during db moves and the like.
$stmtA = "insert ignore into vicidial_campaign_stats (campaign_id) select campaign_id from vicidial_campaigns;";
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
&get_time_now;
#############################################