public_html/wp-content/plugins/google-document-embedder/functions.php
/**
 * Create/update database table to store dx log
 *
 * @since   2.5.2.1
 * @return  bool Whether or not table creation/update was successful
 */
Create/update database table to store dx log
@since   2.5.2.1
@return  bool Whether or not table creation/update was successful
Create / update database table to store dx log @since 2 . 5 . 2 . 1 @return bool Whether or not table creation / update was successful
function gde_dx_log_create() {
	global $wpdb, $gde_db_ver;
	$table = $wpdb->base_prefix . 'gde_dx_log';
	$db_ver_installed = get_site_option( 'gde_db_version', 0 );
	$sql = "CREATE TABLE " . $table . " (
			  id mediumint(9) UNSIGNED NOT NULL AUTO_INCREMENT,
			  blogid smallint(5) UNSIGNED NOT NULL,
			  data longtext NOT NULL,
			  UNIQUE KEY (id)
			) ENGINE=MyISAM  DEFAULT CHARSET=utf8; ";
	if ( version_compare( $gde_db_ver, $db_ver_installed, ">" ) ) {
		require_once( ABSPATH . 'wp-admin/includes/upgrade.php' );
		dbDelta( $sql );
	} elseif ( $wpdb->get_var( "SHOW TABLES LIKE '$table'" ) == $table ) {
		return true;
	} else {
		require_once( ABSPATH . 'wp-admin/includes/upgrade.php' );
		dbDelta( $sql );
		if ( $wpdb->get_var( "SHOW TABLES LIKE '$table'" ) == $table ) {
			return true;
		} else {
			return false;
		}
	}
}
function gde_dx_log_create ( ) { global $ wpdb , $ gde_db_ver ; $ table = $ wpdb -> base_prefix . 'gde_dx_log' ; $ db_ver_installed = get_site_option ( 'gde_db_version' , 0 ) ; $ sql = " CREATE TABLE  " . $ table . "  (
			  id mediumint(9) UNSIGNED NOT NULL AUTO_INCREMENT,
			  blogid smallint(5) UNSIGNED NOT NULL,
			  data longtext NOT NULL,
			  UNIQUE KEY (id)
			) ENGINE=MyISAM  DEFAULT CHARSET=utf8;  " ; if ( version_compare ( $ gde_db_ver , $ db_ver_installed , " > " ) ) { require_once ( ABSPATH . 'wp-admin/includes/upgrade.php' ) ; dbDelta ( $ sql ) ; } elseif ( $ wpdb -> get_var ( " SHOW TABLES LIKE ' $ table ' " ) == $ table ) { return true ; } else { require_once ( ABSPATH . 'wp-admin/includes/upgrade.php' ) ; dbDelta ( $ sql ) ; if ( $ wpdb -> get_var ( " SHOW TABLES LIKE ' $ table ' " ) == $ table ) { return true ; } else { return false ; } } }
Create/update database table to store dx log
 @since   2.5.2.1
 @return  bool Whether or not table creation/update was successful
Create / update database table to store dx log @since 2 . 5 . 2 . 1 @return bool Whether or not table creation / update was successful
// upgrade table if needed // table's OK // table doesn't exist, try to create // table's OK // can't create