prefix . "als_index"; $searches_log_table = $wpdb->prefix . "als_log"; if($wpdb->get_var("SHOW TABLES LIKE '$index_table'") == $index_table) { $sql = "DROP TABLE $index_table"; $wpdb->query($sql); } if($wpdb->get_var("SHOW TABLES LIKE '$searches_log_table'") == $searches_log_table) { $sql = "DROP TABLE $searches_log_table"; $wpdb->query($sql); } } }