[ Index ]

MailPress 7.0.1

[ 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  $queries = array();
  14  
  15  $queries[] =
  16  "CREATE TABLE $wpdb->mp_tracks ( 
  17   id                bigint( 20 )      UNSIGNED NOT NULL AUTO_INCREMENT,
  18   user_id           bigint( 20 )      NOT NULL default '0',
  19   mail_id           bigint( 20 )      NOT NULL default '0',
  20   tmstp             timestamp       NOT NULL default '0000-00-00 00:00:00',
  21   mmeta_id          bigint( 20 )      NOT NULL default '0',
  22   context           varchar( 20 )     NOT NULL default 'html',
  23   ip                varchar( 100 )    NOT NULL default '',
  24   agent             varchar( 255 )    NOT NULL default '',
  25   track             longtext,
  26   referrer          longtext,
  27   PRIMARY KEY ( id ),
  28   UNIQUE KEY id ( id ),
  29   KEY user_id  ( user_id ),
  30   KEY mail_id  ( mail_id ),
  31   KEY mmeta_id ( mmeta_id )
  32   ) $charset_collate;";
  33  
  34  require_once( ABSPATH . 'wp-admin/includes/upgrade.php' );
  35  dbDelta( $queries );
  36  
  37  
  38  
  39  // some clean up
  40  $wpdb->query( "DELETE FROM $wpdb->mp_tracks WHERE mail_id NOT IN ( SELECT id FROM $wpdb->mp_mails );" );


Generated: Mon Jan 28 00:07:10 2019 Cross-referenced by PHPXref 0.7.1