M_Alterfor6

The Membership 2 M Alterfor6 function.

Description

M_Alterfor6(); 

Usage

  1. if ( !function_exists( 'M_Alterfor6' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'membership-2/app_old/membershipincludes/classes/upgrade.php'; 
  3.  
  4.  
  5. // NOTICE! Understand what this does before running. 
  6. $result = M_Alterfor6(); 
  7.  

Defined (1)

The function is defined in the following location(s).

/app_old/membershipincludes/classes/upgrade.php  
  1. function M_Alterfor6() { 
  2. global $wpdb; 
  3.  
  4. $sql = "ALTER TABLE " . membership_db_prefix($wpdb, 'membership_relationships') . " ADD `usinggateway` varchar(50) NULL DEFAULT 'admin' AFTER `order_instance`;"; 
  5. $wpdb->query( $sql ); 
  6.  
  7. $sql = "ALTER TABLE " . membership_db_prefix($wpdb, 'membership_relationships') . " ADD INDEX (`user_id`);"; 
  8. $wpdb->query( $sql ); 
  9.  
  10. $sql = "ALTER TABLE " . membership_db_prefix($wpdb, 'membership_relationships') . " ADD INDEX (`sub_id`);"; 
  11. $wpdb->query( $sql ); 
  12.  
  13. $sql = "ALTER TABLE " . membership_db_prefix($wpdb, 'membership_relationships') . " ADD INDEX (`usinggateway`)";; 
  14. $wpdb->query( $sql ); 
  15.  
  16. $sql = "CREATE TABLE IF NOT EXISTS `" . membership_db_prefix($wpdb, 'member_payments') . "` ( 
  17. `id` bigint(11) NOT NULL auto_increment,  
  18. `member_id` bigint(20) default NULL,  
  19. `sub_id` bigint(20) default NULL,  
  20. `level_id` bigint(20) default NULL,  
  21. `level_order` int(11) default NULL,  
  22. `paymentmade` datetime default NULL,  
  23. `paymentexpires` datetime default NULL,  
  24. PRIMARY KEY (`id`) 
  25. );"; 
  26.  
  27. $wpdb->query($sql); 
  28.