<?php
-require_once(dirname(dirname(__FILE__)).'/wp-config.php');
+$wp_only_load_config = true;
+require_once(dirname(dirname(__FILE__)).'/wp-load.php');
$debug = 0;
/**
** Returns: true if already exists or on successful completion
** false on error
*/
+if ( ! function_exists('maybe_create_table') ) :
function maybe_create_table($table_name, $create_ddl) {
global $wpdb;
foreach ($wpdb->get_col("SHOW TABLES",0) as $table ) {
}
return false;
}
+endif;
/**
** maybe_add_column()
** Returns: true if already exists or on successful completion
** false on error
*/
+if ( ! function_exists('maybe_add_column') ) :
function maybe_add_column($table_name, $column_name, $create_ddl) {
global $wpdb, $debug;
foreach ($wpdb->get_col("DESC $table_name",0) as $column ) {
}
return false;
}
-
+endif;
/**
** maybe_drop_column()