membership_newsstreamcreatetables

The Membership 2 membership newsstreamcreatetables function.

Description

membership_newsstreamcreatetables( (constant) $installed = false ); 

Parameters (1)

0. $installed — Optional. (constant) => false
The installed.

Usage

  1. if ( !function_exists( 'membership_newsstreamcreatetables' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'membership-2/app_old/membershipincludes/addons/newsstream.php'; 
  3.  
  4. // The installed. 
  5. $installed = false; 
  6.  
  7. // NOTICE! Understand what this does before running. 
  8. $result = membership_newsstreamcreatetables($installed); 
  9.  

Defined (1)

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

/app_old/membershipincludes/addons/newsstream.php  
  1. function membership_newsstreamcreatetables($installed = false) { 
  2.  
  3. global $wpdb; 
  4.  
  5. if($installed !== false) { 
  6. $sql = "RENAME TABLE " . membership_db_prefix($wpdb, 'membership_news', false) . " TO " . membership_db_prefix($wpdb, 'membership_news') . ";"; 
  7. $wpdb->query($sql); 
  8. } else { 
  9. // Added for RC 
  10. $sql = "CREATE TABLE `" . membership_db_prefix($wpdb, 'membership_news') . "` ( 
  11. `id` bigint(11) NOT NULL auto_increment,  
  12. `newsitem` text,  
  13. `newsdate` datetime default NULL,  
  14. PRIMARY KEY (`id`) 
  15. );"; 
  16.  
  17. $wpdb->query($sql); 
  18.