M_Alterfor12

The Membership 2 M Alterfor12 function.

Description

M_Alterfor12(); 

Usage

  1. if ( !function_exists( 'M_Alterfor12' ) ) { 
  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_Alterfor12(); 
  7.  

Defined (1)

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

/app_old/membershipincludes/classes/upgrade.php  
  1. function M_Alterfor14() { 
  2. global $wpdb; 
  3.  
  4. $sql = "ALTER TABLE " . membership_db_prefix($wpdb, 'coupons') . " ADD `coupon_apply_to` VARCHAR(20) NULL DEFAULT NULL AFTER `coupon_used`;"; 
  5.  
  6. $wpdb->query( $sql ); 
  7.  
  8.  
  9. function M_Alterfor12() { 
  10. global $wpdb; 
  11.  
  12. $sql = "CREATE TABLE IF NOT EXISTS `" . membership_db_prefix($wpdb, 'coupons') . "` ( 
  13. `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,  
  14. `site_id` bigint(20) DEFAULT '0',  
  15. `couponcode` varchar(250) DEFAULT NULL,  
  16. `discount` decimal(11, 2) DEFAULT '0.00',  
  17. `discount_type` varchar(5) DEFAULT NULL,  
  18. `discount_currency` varchar(5) DEFAULT NULL,  
  19. `coupon_startdate` datetime DEFAULT NULL,  
  20. `coupon_enddate` datetime DEFAULT NULL,  
  21. `coupon_sub_id` bigint(20) DEFAULT '0',  
  22. `coupon_uses` int(11) DEFAULT '0',