[ Index ]

MailPress 7.2

[ Index ]     [ Classes ]     [ Functions ]     [ Variables ]     [ Constants ]     [ Statistics ]    

title

Body

[close]

/mp-admin/includes/install/ -> tracking.php (source)

   1  <?php
   2  
   3  /* Tracking install */
   4  
   5  global $wpdb;
   6  
   7  //////////////////////////////////
   8  //// Install                  ////
   9  //////////////////////////////////
  10  
  11  $charset_collate = $wpdb->get_charset_collate();
  12  
  13  $mp_tables = "CREATE TABLE $wpdb->mp_tracks (
  14   id bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT,
  15   user_id bigint(20) NOT NULL default '0',
  16   mail_id bigint(20) NOT NULL default '0',
  17   tmstp timestamp NOT NULL default '0000-00-00 00:00:00',
  18   mmeta_id bigint(20) NOT NULL default '0',
  19   context varchar(40) NOT NULL default 'html',
  20   ip varchar(100) NOT NULL default '',
  21   agent varchar(255) NOT NULL default '',
  22   track longtext,
  23   referrer longtext,
  24   PRIMARY KEY (id),
  25   UNIQUE KEY id (id),
  26   KEY user_id  (user_id),
  27   KEY mail_id  (mail_id),
  28   KEY mmeta_id (mmeta_id)
  29  ) $charset_collate;\n";
  30  
  31  require_once( ABSPATH . 'wp-admin/includes/upgrade.php' );
  32  dbDelta( $mp_tables );
  33  
  34  
  35  // some clean up
  36  $wpdb->query( "DELETE FROM $wpdb->mp_tracks WHERE mail_id NOT IN ( SELECT id FROM $wpdb->mp_mails ) AND user_id NOT IN ( SELECT id FROM $wpdb->mp_users );" );


Generated: Tue May 19 15:55:14 2020 Cross-referenced by PHPXref 0.7.1