Advertisement
Guest User

Untitled

a guest
Mar 8th, 2013
132
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
MySQL 22.61 KB | None | 0 0
  1. CREATE TABLE `email` (
  2.     `email_id` INT(11) NOT NULL AUTO_INCREMENT,
  3.     `supplier_id` INT(11) NOT NULL DEFAULT '0',
  4.     `country` ENUM('uk','ie') NOT NULL DEFAULT 'uk',
  5.     `business` ENUM('group','dead') NOT NULL DEFAULT 'group',
  6.     `business_division` ENUM('general') NOT NULL DEFAULT 'general',
  7.     `start_date` DATE NOT NULL DEFAULT '0000-00-00',
  8.     `stop_date` DATE NOT NULL DEFAULT '0000-00-00',
  9.     `subject` VARCHAR(250) NOT NULL DEFAULT '',
  10.     `agency` VARCHAR(250) NOT NULL DEFAULT '',
  11.     `lists` VARCHAR(250) NOT NULL DEFAULT '',
  12.     `cost` VARCHAR(250) NOT NULL DEFAULT '',
  13.     `broadcast_fee` DECIMAL(10,2) NOT NULL DEFAULT '0.00',
  14.     `predefined_cpa` DECIMAL(10,2) NOT NULL DEFAULT '0.00',
  15.     `type` INT(11) NOT NULL DEFAULT '1',
  16.     `subtype` INT(11) NOT NULL DEFAULT '0',
  17.     `costmethod` INT(11) NOT NULL DEFAULT '0',
  18.     `status` VARCHAR(30) NULL DEFAULT NULL,
  19.     `lastupdate` DATE NOT NULL DEFAULT '0000-00-00',
  20.     `lastsplitupdate` DATE NOT NULL DEFAULT '0000-00-00',
  21.     `islocked` TINYINT(4) NOT NULL DEFAULT '0',
  22.     `locktime` INT(14) NOT NULL DEFAULT '0',
  23.     PRIMARY KEY (`email_id`),
  24.     INDEX `supplier_id` (`supplier_id`),
  25.     INDEX `country` (`country`),
  26.     INDEX `business_division` (`business_division`),
  27.     INDEX `type` (`type`),
  28.     INDEX `business` (`business`)
  29.     )
  30.     COLLATE='utf8_general_ci'
  31.     ENGINE=MyISAM
  32.     AUTO_INCREMENT=12457;
  33.  
  34.     REPLACE INTO `UnknownTable` (`email_id`, `supplier_id`, `country`, `business`, `business_division`, `start_date`, `stop_date`, `subject`, `agency`, `lists`, `cost`, `broadcast_fee`, `predefined_cpa`, `type`, `subtype`, `costmethod`, `status`, `lastupdate`, `lastsplitupdate`, `islocked`, `locktime`, `type_id`, `typename`, `media`, `groupname`, `isActive`, `linkname`, `campaigntype_id`, `subtype_id`, `type_id`, `subtype`, `isActive`, `email_id`, `fullconversions`, `partnerconversions`, `summarydate`, `oeweekno`, `oeyearno`, `opens`, `clicks`, `conversions`, `bookings`, `diarybookings`, `invalids`, `duplicates`, `consultsattended`, `consultsunattended`, `consultsnotdue`, `suitableforlaser`, `unsuitableforlaser`, `surgerybooked`, `surgerycancelled`, `surgerylayaway`, `thinkers`, `surgeryvalue`, `tcallbacks`, `friendreferrals`, `bookedexam`, `shortchecksbooked`, `shortchecksattended`, `shortchecksdna`, `shortchecksnotdue`, `paidexamsfromshortchecks`, `paidexamsbookedoutright`, `paidexamsattended`, `paidexamsdna`, `paidexamsnotdue`, `validleads`, `email_id`, `week_id`, `weekstartdate`, `oeweekno`, `oeyearno`, `sent`, `cpl`, `adjustment`, `adjustmentreason`, `total_adjustment`, `costmethod_id`, `costmethod`) VALUES (12163, 121, 'uk', 'group', 'general', '2013-02-25', '2013-03-03', '30% Off Laser Offer', 'MFC', 'OfferX - 30% Off Laser Offer', '2', 0.00, 0.00, 5, 49, 4, 'Finished (Test Approved)', '2013-03-08', '2013-03-08', 0, 1362714002, 5, 'Display', 'online', 'Display', 1, 'display', 4, 4, 5, 'Static Banner', 1, 12163, 1, 0, '2013-02-22', 8, 2013, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0.00, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 162, 12163, 1, '2013-02-25 00:00:00', 9, 2013, 0, 2.00, 0.00, '', 0.00, 4, 'CPL');
  35.  
  36.  
  37.     CREATE TABLE `email_type` (
  38.     `type_id` INT(11) NOT NULL AUTO_INCREMENT,
  39.     `typename` VARCHAR(100) NOT NULL DEFAULT '',
  40.     `media` ENUM('online','offline') NOT NULL DEFAULT 'online',
  41.     `groupname` VARCHAR(100) NOT NULL DEFAULT '',
  42.     `isActive` TINYINT(1) NOT NULL DEFAULT '1',
  43.     `linkname` VARCHAR(20) NOT NULL DEFAULT '',
  44.     `campaigntype_id` INT(11) NOT NULL DEFAULT '0',
  45.     PRIMARY KEY (`type_id`)
  46.     )
  47.     COLLATE='utf8_general_ci'
  48.     ENGINE=MyISAM
  49.     AUTO_INCREMENT=35;
  50.  
  51.     REPLACE INTO `email_type` (`type_id`, `typename`, `media`, `groupname`, `isActive`, `linkname`, `campaigntype_id`) VALUES (1, 'Email - External', 'online', 'Email', 1, 'external', 7);
  52.     REPLACE INTO `email_type` (`type_id`, `typename`, `media`, `groupname`, `isActive`, `linkname`, `campaigntype_id`) VALUES (2, 'Email - Internal', 'online', 'Email', 1, 'internal', 3);
  53.     REPLACE INTO `email_type` (`type_id`, `typename`, `media`, `groupname`, `isActive`, `linkname`, `campaigntype_id`) VALUES (3, 'Email - Opt-in Competition', 'online', 'Email', 1, 'optin', 3);
  54.     REPLACE INTO `email_type` (`type_id`, `typename`, `media`, `groupname`, `isActive`, `linkname`, `campaigntype_id`) VALUES (4, 'Email - External (cpl) - DEPRECIATED', 'online', 'Email', 0, 'external', 3);
  55.     REPLACE INTO `email_type` (`type_id`, `typename`, `media`, `groupname`, `isActive`, `linkname`, `campaigntype_id`) VALUES (5, 'Display', 'online', 'Display', 1, 'display', 4);
  56.     REPLACE INTO `email_type` (`type_id`, `typename`, `media`, `groupname`, `isActive`, `linkname`, `campaigntype_id`) VALUES (6, 'Display (cpl) - DEPRECIATED', 'online', 'Display', 0, 'display', 4);
  57.     REPLACE INTO `email_type` (`type_id`, `typename`, `media`, `groupname`, `isActive`, `linkname`, `campaigntype_id`) VALUES (7, 'Affiliate (cpl)', 'online', 'Affiliate', 1, 'affiliate', 6);
  58.     REPLACE INTO `email_type` (`type_id`, `typename`, `media`, `groupname`, `isActive`, `linkname`, `campaigntype_id`) VALUES (8, 'Lead Gen (cpl)', 'online', 'Lead Gen', 1, 'leadgen', 5);
  59. REPLACE INTO `email_type` (`type_id`, `typename`, `media`, `groupname`, `isActive`, `linkname`, `campaigntype_id`) VALUES (9, 'PPC', 'online', 'PPC', 1, 'ppc', 1);
  60.     REPLACE INTO `email_type` (`type_id`, `typename`, `media`, `groupname`, `isActive`, `linkname`, `campaigntype_id`) VALUES (10, 'Organic', 'online', 'Organic', 1, 'organic', 2);
  61.     REPLACE INTO `email_type` (`type_id`, `typename`, `media`, `groupname`, `isActive`, `linkname`, `campaigntype_id`) VALUES (11, 'Corporate', 'online', 'Corporate', 1, 'corporate', 2);
  62.     REPLACE INTO `email_type` (`type_id`, `typename`, `media`, `groupname`, `isActive`, `linkname`, `campaigntype_id`) VALUES (12, '***Hidden***', 'online', 'Hidden', 1, 'hidden', 1);
  63.     REPLACE INTO `email_type` (`type_id`, `typename`, `media`, `groupname`, `isActive`, `linkname`, `campaigntype_id`) VALUES (13, 'Display (cpc)', 'online', 'Display', 0, 'display', 4);
  64.     REPLACE INTO `email_type` (`type_id`, `typename`, `media`, `groupname`, `isActive`, `linkname`, `campaigntype_id`) VALUES (15, 'Press', 'offline', 'press', 1, 'press', 0);
  65.     REPLACE INTO `email_type` (`type_id`, `typename`, `media`, `groupname`, `isActive`, `linkname`, `campaigntype_id`) VALUES (16, 'Radio', 'offline', 'radio', 1, 'radio', 0);
  66.     REPLACE INTO `email_type` (`type_id`, `typename`, `media`, `groupname`, `isActive`, `linkname`, `campaigntype_id`) VALUES (17, 'TV', 'offline', 'tv', 1, 'tv', 0);
  67.     REPLACE INTO `email_type` (`type_id`, `typename`, `media`, `groupname`, `isActive`, `linkname`, `campaigntype_id`) VALUES (18, 'Patient Referral', 'offline', 'patientreferral', 1, 'patientreferral', 0);
  68.     REPLACE INTO `email_type` (`type_id`, `typename`, `media`, `groupname`, `isActive`, `linkname`, `campaigntype_id`) VALUES (19, 'Direct Mail', 'offline', 'directmail', 1, 'directmail', 0);
  69.     REPLACE INTO `email_type` (`type_id`, `typename`, `media`, `groupname`, `isActive`, `linkname`, `campaigntype_id`) VALUES (20, 'Online', 'offline', 'online', 1, 'online', 0);
  70.     REPLACE INTO `email_type` (`type_id`, `typename`, `media`, `groupname`, `isActive`, `linkname`, `campaigntype_id`) VALUES (21, 'Private Healthcare', 'offline', 'privatehealthcare', 1, 'privatehealthcare', 0);
  71.     REPLACE INTO `email_type` (`type_id`, `typename`, `media`, `groupname`, `isActive`, `linkname`, `campaigntype_id`) VALUES (22, 'Yellow Pages', 'offline', 'yellowpages', 1, 'yellowpages', 0);
  72.     REPLACE INTO `email_type` (`type_id`, `typename`, `media`, `groupname`, `isActive`, `linkname`, `campaigntype_id`) VALUES (23, 'Info Pack', 'offline', 'infopack', 1, 'infopack', 0);
  73.     REPLACE INTO `email_type` (`type_id`, `typename`, `media`, `groupname`, `isActive`, `linkname`, `campaigntype_id`) VALUES (24, 'Corporate', 'offline', 'corporate', 1, 'corporate', 0);
  74.     REPLACE INTO `email_type` (`type_id`, `typename`, `media`, `groupname`, `isActive`, `linkname`, `campaigntype_id`) VALUES (25, 'Existing Patient', 'offline', 'existingpatient', 1, 'existingpatient', 0);
  75.     REPLACE INTO `email_type` (`type_id`, `typename`, `media`, `groupname`, `isActive`, `linkname`, `campaigntype_id`) VALUES (26, 'Other', 'offline', 'other', 1, 'other', 0);
  76.     REPLACE INTO `email_type` (`type_id`, `typename`, `media`, `groupname`, `isActive`, `linkname`, `campaigntype_id`) VALUES (28, 'SMS - External', 'online', 'Email', 1, 'smsexternal', 8);
  77.     REPLACE INTO `email_type` (`type_id`, `typename`, `media`, `groupname`, `isActive`, `linkname`, `campaigntype_id`) VALUES (29, 'Recall', 'online', 'Recall', 1, 'recall', 0);
  78.     REPLACE INTO `email_type` (`type_id`, `typename`, `media`, `groupname`, `isActive`, `linkname`, `campaigntype_id`) VALUES (30, 'Test Campaign', 'online', 'Hidden', 1, 'hidden', 99);
  79.     REPLACE INTO `email_type` (`type_id`, `typename`, `media`, `groupname`, `isActive`, `linkname`, `campaigntype_id`) VALUES (31, 'Affiliate (cpb)', 'online', 'Affiliate', 1, 'affiliate', 6);
  80.     REPLACE INTO `email_type` (`type_id`, `typename`, `media`, `groupname`, `isActive`, `linkname`, `campaigntype_id`) VALUES (33, 'GCN', 'online', 'Display', 1, 'gcn', 4);
  81.      REPLACE INTO `email_type` (`type_id`, `typename`, `media`, `groupname`, `isActive`, `linkname`, `campaigntype_id`) VALUES (34, 'Refer a friend', 'online', 'referafriend', 1, 'referafriend', 3);
  82.  
  83.  
  84.     CREATE TABLE `email_subtype` (
  85.     `subtype_id` INT(11) NOT NULL AUTO_INCREMENT,
  86.     `type_id` INT(11) NULL DEFAULT NULL,
  87.     `subtype` VARCHAR(30) NULL DEFAULT NULL,
  88.     `isActive` TINYINT(4) NOT NULL DEFAULT '1',
  89.     PRIMARY KEY (`subtype_id`),
  90.     INDEX `campaigntype_id` (`type_id`)
  91.     )
  92.     COLLATE='utf8_general_ci'
  93.     ENGINE=MyISAM
  94.     AUTO_INCREMENT=70;
  95.  
  96.  
  97.     REPLACE INTO `email_subtype` (`subtype_id`, `type_id`, `subtype`, `isActive`) VALUES (1, 2, 'Dormant', 1);
  98.     REPLACE INTO `email_subtype` (`subtype_id`, `type_id`, `subtype`, `isActive`) VALUES (2, 2, 'Thinker', 1);
  99.     REPLACE INTO `email_subtype` (`subtype_id`, `type_id`, `subtype`, `isActive`) VALUES (3, 2, 'Suitable', 1);
  100.     REPLACE INTO `email_subtype` (`subtype_id`, `type_id`, `subtype`, `isActive`) VALUES (4, 5, 'Static Banner', 1);
  101.     REPLACE INTO `email_subtype` (`subtype_id`, `type_id`, `subtype`, `isActive`) VALUES (5, 5, 'Facebook', 1);
  102.     REPLACE INTO `email_subtype` (`subtype_id`, `type_id`, `subtype`, `isActive`) VALUES (6, 5, 'Text Link', 1);
  103.     REPLACE INTO `email_subtype` (`subtype_id`, `type_id`, `subtype`, `isActive`) VALUES (7, 5, 'Exit Traffic', 1);
  104.     REPLACE INTO `email_subtype` (`subtype_id`, `type_id`, `subtype`, `isActive`) VALUES (8, 8, 'Lead Gen', 1);
  105.     REPLACE INTO `email_subtype` (`subtype_id`, `type_id`, `subtype`, `isActive`) VALUES (9, 8, 'Co-Reg', 1);
  106.     REPLACE INTO `email_subtype` (`subtype_id`, `type_id`, `subtype`, `isActive`) VALUES (10, 9, 'Keyword', 1);
  107.     REPLACE INTO `email_subtype` (`subtype_id`, `type_id`, `subtype`, `isActive`) VALUES (11, 9, 'Direct', 1);
  108.     REPLACE INTO `email_subtype` (`subtype_id`, `type_id`, `subtype`, `isActive`) VALUES (12, 10, 'Keyword', 1);
  109.     REPLACE INTO `email_subtype` (`subtype_id`, `type_id`, `subtype`, `isActive`) VALUES (13, 10, 'Direct', 1);
  110.     REPLACE INTO `email_subtype` (`subtype_id`, `type_id`, `subtype`, `isActive`) VALUES (14, 10, 'Other', 1);
  111.     REPLACE INTO `email_subtype` (`subtype_id`, `type_id`, `subtype`, `isActive`) VALUES (15, 5, 'Other', 1);
  112.     REPLACE INTO `email_subtype` (`subtype_id`, `type_id`, `subtype`, `isActive`) VALUES (16, 8, 'Telesurvey', 1);
  113.     REPLACE INTO `email_subtype` (`subtype_id`, `type_id`, `subtype`, `isActive`) VALUES (17, 17, 'ITV', 1);
  114.     REPLACE INTO `email_subtype` (`subtype_id`, `type_id`, `subtype`, `isActive`) VALUES (18, 17, 'Satellite', 1);
  115.     REPLACE INTO `email_subtype` (`subtype_id`, `type_id`, `subtype`, `isActive`) VALUES (19, 5, 'Behavioural', 1);
  116.     REPLACE INTO `email_subtype` (`subtype_id`, `type_id`, `subtype`, `isActive`) VALUES (20, 2, 'SMS - Dormant', 1);
  117.     REPLACE INTO `email_subtype` (`subtype_id`, `type_id`, `subtype`, `isActive`) VALUES (21, 5, 'Mobile Banner', 1);
  118.     REPLACE INTO `email_subtype` (`subtype_id`, `type_id`, `subtype`, `isActive`) VALUES (22, 1, 'CPM', 1);
  119.     REPLACE INTO `email_subtype` (`subtype_id`, `type_id`, `subtype`, `isActive`) VALUES (23, 1, 'CPL', 1);
  120.     REPLACE INTO `email_subtype` (`subtype_id`, `type_id`, `subtype`, `isActive`) VALUES (24, 1, 'SMS', 0);
  121.     REPLACE INTO `email_subtype` (`subtype_id`, `type_id`, `subtype`, `isActive`) VALUES (25, 2, 'SMS - Thinkers', 1);
  122.     REPLACE INTO `email_subtype` (`subtype_id`, `type_id`, `subtype`, `isActive`) VALUES (26, 2, 'Store', 1);
  123.     REPLACE INTO `email_subtype` (`subtype_id`, `type_id`, `subtype`, `isActive`) VALUES (27, 2, 'General', 1);
  124.     REPLACE INTO `email_subtype` (`subtype_id`, `type_id`, `subtype`, `isActive`) VALUES (28, 9, 'Mobile', 1);
  125.     REPLACE INTO `email_subtype` (`subtype_id`, `type_id`, `subtype`, `isActive`) VALUES (29, 9, 'Brand', 1);
  126.     REPLACE INTO `email_subtype` (`subtype_id`, `type_id`, `subtype`, `isActive`) VALUES (30, 9, 'Content', 1);
  127.     REPLACE INTO `email_subtype` (`subtype_id`, `type_id`, `subtype`, `isActive`) VALUES (31, 9, 'Generic', 1);
  128.     REPLACE INTO `email_subtype` (`subtype_id`, `type_id`, `subtype`, `isActive`) VALUES (32, 10, 'Mobile', 1);
  129.     REPLACE INTO `email_subtype` (`subtype_id`, `type_id`, `subtype`, `isActive`) VALUES (33, 10, 'Generic', 1);
  130.     REPLACE INTO `email_subtype` (`subtype_id`, `type_id`, `subtype`, `isActive`) VALUES (34, 10, 'Content', 1);
  131.     REPLACE INTO `email_subtype` (`subtype_id`, `type_id`, `subtype`, `isActive`) VALUES (35, 10, 'Brand', 1);
  132.     REPLACE INTO `email_subtype` (`subtype_id`, `type_id`, `subtype`, `isActive`) VALUES (36, 10, 'Social Media', 1);
  133.     REPLACE INTO `email_subtype` (`subtype_id`, `type_id`, `subtype`, `isActive`) VALUES (37, 2, 'Reviews', 1);
  134.     REPLACE INTO `email_subtype` (`subtype_id`, `type_id`, `subtype`, `isActive`) VALUES (38, 33, 'Behavioural', 1);
  135.     REPLACE INTO `email_subtype` (`subtype_id`, `type_id`, `subtype`, `isActive`) VALUES (39, 1, 'Half Price', 1);
  136.     REPLACE INTO `email_subtype` (`subtype_id`, `type_id`, `subtype`, `isActive`) VALUES (49, 5, 'Half Price', 1);
  137.     REPLACE INTO `email_subtype` (`subtype_id`, `type_id`, `subtype`, `isActive`) VALUES (40, 10, 'Treatmentsaver', 1);
  138.     REPLACE INTO `email_subtype` (`subtype_id`, `type_id`, `subtype`, `isActive`) VALUES (50, 10, 'Articles', 1);
  139.     REPLACE INTO `email_subtype` (`subtype_id`, `type_id`, `subtype`, `isActive`) VALUES (51, 8, 'Paper Surveys', 1);
  140.     REPLACE INTO `email_subtype` (`subtype_id`, `type_id`, `subtype`, `isActive`) VALUES (52, 34, 'Email', 1);
  141.     REPLACE INTO `email_subtype` (`subtype_id`, `type_id`, `subtype`, `isActive`) VALUES (53, 34, 'Facebook', 1);
  142.     REPLACE INTO `email_subtype` (`subtype_id`, `type_id`, `subtype`, `isActive`) VALUES (54, 34, 'Twitter', 1);
  143.     REPLACE INTO `email_subtype` (`subtype_id`, `type_id`, `subtype`, `isActive`) VALUES (55, 34, 'Other', 1);
  144.     REPLACE INTO `email_subtype` (`subtype_id`, `type_id`, `subtype`, `isActive`) VALUES (56, 10, 'Offline', 1);
  145.     REPLACE INTO `email_subtype` (`subtype_id`, `type_id`, `subtype`, `isActive`) VALUES (57, 10, 'QR code', 1);
  146.     REPLACE INTO `email_subtype` (`subtype_id`, `type_id`, `subtype`, `isActive`) VALUES (58, 1, 'Non-Win', 1);
  147.     REPLACE INTO `email_subtype` (`subtype_id`, `type_id`, `subtype`, `isActive`) VALUES (59, 5, 'Non-Win', 1);
  148.     REPLACE INTO `email_subtype` (`subtype_id`, `type_id`, `subtype`, `isActive`) VALUES (69, 28, 'Half Price', 1);
  149.     REPLACE INTO `email_subtype` (`subtype_id`, `type_id`, `subtype`, `isActive`) VALUES (68, 28, 'Win', 1);
  150.  
  151.     CREATE TABLE `email_dailytotal` (
  152.     `email_id` INT(11) NOT NULL DEFAULT '0',
  153.     `fullconversions` INT(11) NOT NULL DEFAULT '0',
  154.     `partnerconversions` INT(11) NOT NULL DEFAULT '0',
  155.     `summarydate` DATE NOT NULL DEFAULT '0000-00-00',
  156.     `oeweekno` INT(11) NOT NULL DEFAULT '0',
  157.     `oeyearno` INT(11) NOT NULL DEFAULT '0',
  158.     `opens` INT(11) NOT NULL DEFAULT '0',
  159.     `clicks` INT(11) NOT NULL DEFAULT '0',
  160.     `conversions` INT(11) NOT NULL DEFAULT '0',
  161.     `bookings` INT(11) NOT NULL DEFAULT '0',
  162.     `diarybookings` INT(11) NOT NULL DEFAULT '0',
  163.     `invalids` INT(11) NOT NULL DEFAULT '0',
  164.     `duplicates` INT(11) NOT NULL DEFAULT '0',
  165.     `consultsattended` INT(11) NOT NULL DEFAULT '0',
  166.     `consultsunattended` INT(11) NOT NULL DEFAULT '0',
  167.     `consultsnotdue` INT(11) NOT NULL DEFAULT '0',
  168.     `suitableforlaser` INT(11) NOT NULL DEFAULT '0',
  169.     `unsuitableforlaser` INT(11) NOT NULL DEFAULT '0',
  170.     `surgerybooked` INT(11) NOT NULL DEFAULT '0',
  171.     `surgerycancelled` INT(11) NOT NULL DEFAULT '0',
  172.     `surgerylayaway` INT(11) NOT NULL DEFAULT '0',
  173.     `thinkers` INT(11) NOT NULL DEFAULT '0',
  174.     `surgeryvalue` DECIMAL(10,2) NOT NULL DEFAULT '0.00',
  175.     `tcallbacks` INT(11) NOT NULL DEFAULT '0',
  176.     `friendreferrals` INT(11) NOT NULL DEFAULT '0',
  177.     `bookedexam` INT(11) NOT NULL DEFAULT '0',
  178.     `shortchecksbooked` INT(11) NOT NULL DEFAULT '0',
  179.     `shortchecksattended` INT(11) NOT NULL DEFAULT '0',
  180.     `shortchecksdna` INT(11) NOT NULL DEFAULT '0',
  181.     `shortchecksnotdue` INT(11) NOT NULL DEFAULT '0',
  182.     `paidexamsfromshortchecks` INT(11) NOT NULL DEFAULT '0',
  183.     `paidexamsbookedoutright` INT(11) NOT NULL DEFAULT '0',
  184.     `paidexamsattended` INT(11) NOT NULL DEFAULT '0',
  185.     `paidexamsdna` INT(11) NOT NULL DEFAULT '0',
  186.     `paidexamsnotdue` INT(11) NOT NULL DEFAULT '0',
  187.     PRIMARY KEY (`email_id`, `summarydate`),
  188.     INDEX `oeweekno` (`oeweekno`, `oeyearno`)
  189.     )
  190.     COLLATE='utf8_general_ci'
  191.     ENGINE=MyISAM;
  192.  
  193.  
  194.     REPLACE INTO `email_dailytotal` (`email_id`, `fullconversions`, `partnerconversions`, `summarydate`, `oeweekno`, `oeyearno`, `opens`, `clicks`, `conversions`, `bookings`, `diarybookings`, `invalids`, `duplicates`, `consultsattended`, `consultsunattended`, `consultsnotdue`, `suitableforlaser`, `unsuitableforlaser`, `surgerybooked`, `surgerycancelled`, `surgerylayaway`, `thinkers`, `surgeryvalue`, `tcallbacks`, `friendreferrals`, `bookedexam`, `shortchecksbooked`, `shortchecksattended`, `shortchecksdna`, `shortchecksnotdue`, `paidexamsfromshortchecks`, `paidexamsbookedoutright`, `paidexamsattended`, `paidexamsdna`, `paidexamsnotdue`) VALUES (12163, 1, 0, '2013-02-27', 9, 2013, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0.00, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
  195.     REPLACE INTO `email_dailytotal` (`email_id`, `fullconversions`, `partnerconversions`, `summarydate`, `oeweekno`, `oeyearno`, `opens`, `clicks`, `conversions`, `bookings`, `diarybookings`, `invalids`, `duplicates`, `consultsattended`, `consultsunattended`, `consultsnotdue`, `suitableforlaser`, `unsuitableforlaser`, `surgerybooked`, `surgerycancelled`, `surgerylayaway`, `thinkers`, `surgeryvalue`, `tcallbacks`, `friendreferrals`, `bookedexam`, `shortchecksbooked`, `shortchecksattended`, `shortchecksdna`, `shortchecksnotdue`, `paidexamsfromshortchecks`, `paidexamsbookedoutright`, `paidexamsattended`, `paidexamsdna`, `paidexamsnotdue`) VALUES (12163, 10, 0, '2013-02-26', 9, 2013, 0, 0, 10, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0.00, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
  196.     REPLACE INTO `email_dailytotal` (`email_id`, `fullconversions`, `partnerconversions`, `summarydate`, `oeweekno`, `oeyearno`, `opens`, `clicks`, `conversions`, `bookings`, `diarybookings`, `invalids`, `duplicates`, `consultsattended`, `consultsunattended`, `consultsnotdue`, `suitableforlaser`, `unsuitableforlaser`, `surgerybooked`, `surgerycancelled`, `surgerylayaway`, `thinkers`, `surgeryvalue`, `tcallbacks`, `friendreferrals`, `bookedexam`, `shortchecksbooked`, `shortchecksattended`, `shortchecksdna`, `shortchecksnotdue`, `paidexamsfromshortchecks`, `paidexamsbookedoutright`, `paidexamsattended`, `paidexamsdna`, `paidexamsnotdue`) VALUES (12163, 15, 0, '2013-02-25', 9, 2013, 0, 0, 15, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0.00, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
  197.     REPLACE INTO `email_dailytotal` (`email_id`, `fullconversions`, `partnerconversions`, `summarydate`, `oeweekno`, `oeyearno`, `opens`, `clicks`, `conversions`, `bookings`, `diarybookings`, `invalids`, `duplicates`, `consultsattended`, `consultsunattended`, `consultsnotdue`, `suitableforlaser`, `unsuitableforlaser`, `surgerybooked`, `surgerycancelled`, `surgerylayaway`, `thinkers`, `surgeryvalue`, `tcallbacks`, `friendreferrals`, `bookedexam`, `shortchecksbooked`, `shortchecksattended`, `shortchecksdna`, `shortchecksnotdue`, `paidexamsfromshortchecks`, `paidexamsbookedoutright`, `paidexamsattended`, `paidexamsdna`, `paidexamsnotdue`) VALUES (12163, 1, 0, '2013-02-22', 8, 2013, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0.00, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
  198.  
  199.  
  200.     CREATE TABLE `email_week` (
  201.     `email_id` INT(11) NOT NULL DEFAULT '0',
  202.     `week_id` INT(11) NOT NULL AUTO_INCREMENT,
  203.     `weekstartdate` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00',
  204.     `oeweekno` INT(11) NOT NULL DEFAULT '0',
  205.     `oeyearno` INT(11) NOT NULL DEFAULT '0',
  206.     `sent` INT(11) NULL DEFAULT NULL,
  207.     `cpl` DECIMAL(10,2) NULL DEFAULT NULL,
  208.     `adjustment` DECIMAL(10,2) NOT NULL DEFAULT '0.00',
  209.     `adjustmentreason` TEXT NOT NULL,
  210.     PRIMARY KEY (`email_id`, `week_id`),
  211.     INDEX `weekstartdate` (`weekstartdate`),
  212.     INDEX `oeweekno` (`oeweekno`, `oeyearno`)
  213.     )
  214.     COLLATE='utf8_general_ci'
  215.     ENGINE=MyISAM;
  216.  
  217.     REPLACE INTO `email_week` (`email_id`, `week_id`, `weekstartdate`, `oeweekno`, `oeyearno`, `sent`, `cpl`, `adjustment`, `adjustmentreason`) VALUES (12163, 1, '2013-02-25 00:00:00', 9, 2013, 0, 2.00, 0.00, '');
  218.  
  219.  
  220.     CREATE TABLE `email_costmethod` (
  221.     `costmethod_id` INT(11) NOT NULL AUTO_INCREMENT,
  222.     `costmethod` VARCHAR(25) NULL DEFAULT NULL,
  223.     PRIMARY KEY (`costmethod_id`)
  224.     )
  225.     COLLATE='utf8_general_ci'
  226.     ENGINE=MyISAM
  227.     AUTO_INCREMENT=13;
  228.  
  229.     REPLACE INTO `email_costmethod` (`costmethod_id`, `costmethod`) VALUES (1, 'No Cost');
  230.     REPLACE INTO `email_costmethod` (`costmethod_id`, `costmethod`) VALUES (2, 'Fixed Cost');
  231.     REPLACE INTO `email_costmethod` (`costmethod_id`, `costmethod`) VALUES (3, 'CPM');
  232.     REPLACE INTO `email_costmethod` (`costmethod_id`, `costmethod`) VALUES (4, 'CPL');
  233.     REPLACE INTO `email_costmethod` (`costmethod_id`, `costmethod`) VALUES (5, 'CPC');
  234.     REPLACE INTO `email_costmethod` (`costmethod_id`, `costmethod`) VALUES (6, 'Cost Per Consult Attended');
  235.     REPLACE INTO `email_costmethod` (`costmethod_id`, `costmethod`) VALUES (7, 'Internal : # Sent / 1000');
  236.     REPLACE INTO `email_costmethod` (`costmethod_id`, `costmethod`) VALUES (8, 'PPC Manual Entry');
  237.     REPLACE INTO `email_costmethod` (`costmethod_id`, `costmethod`) VALUES (9, 'CPL not counting partners');
  238.     REPLACE INTO `email_costmethod` (`costmethod_id`, `costmethod`) VALUES (10, 'Hybrid CPM/CPL');
  239.     REPLACE INTO `email_costmethod` (`costmethod_id`, `costmethod`) VALUES (11, 'Set Weekly Cost');
  240.     REPLACE INTO `email_costmethod` (`costmethod_id`, `costmethod`) VALUES (12, 'Cost per Booking');
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement