Remove optionvalues table.

git-svn-id: http://svn.automattic.com/wordpress/trunk@1594 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
saxmatt 2004-09-04 21:52:00 +00:00
parent 336bd345c4
commit 5e87dfc5df
4 changed files with 3 additions and 242 deletions

View File

@ -383,28 +383,6 @@ CREATE TABLE $wpdb->optiongroup_options (
"; ";
$q = $wpdb->query($query); $q = $wpdb->query($query);
// $query = "DROP TABLE IF EXISTS $wpdb->optionvalues";
// $q = mysql_query($query) or mysql_doh("doh, can't drop the table \"$wpdb->optionvalues\" in the database.");
$query = "
CREATE TABLE $wpdb->optionvalues (
option_id int(11) NOT NULL,
optionvalue tinytext,
optionvalue_desc varchar(255),
optionvalue_max int(11),
optionvalue_min int(11),
optionvalue_seq int(11),
UNIQUE (option_id, optionvalue(255)),
INDEX (option_id, optionvalue_seq)
)
";
$q = $wpdb->query($query);
?>
<?php
$option_data = array( $option_data = array(
"INSERT INTO $wpdb->optiontypes (optiontype_id, optiontype_name) VALUES (1, 'integer')", "INSERT INTO $wpdb->optiontypes (optiontype_id, optiontype_name) VALUES (1, 'integer')",
"INSERT INTO $wpdb->optiontypes (optiontype_id, optiontype_name) VALUES (2, 'boolean')", "INSERT INTO $wpdb->optiontypes (optiontype_id, optiontype_name) VALUES (2, 'boolean')",
@ -530,22 +508,6 @@ $option_data = array(
"INSERT INTO $wpdb->optiongroup_options (group_id, option_id, seq) VALUES(6,8,7)", "INSERT INTO $wpdb->optiongroup_options (group_id, option_id, seq) VALUES(6,8,7)",
"INSERT INTO $wpdb->optiongroup_options (group_id, option_id, seq) VALUES(6,54,8)", "INSERT INTO $wpdb->optiongroup_options (group_id, option_id, seq) VALUES(6,54,8)",
// select data for what to show
"INSERT INTO $wpdb->optionvalues (option_id, optionvalue, optionvalue_desc, optionvalue_max, optionvalue_min, optionvalue_seq) VALUES (49, 'days', 'days', null,null,1)",
"INSERT INTO $wpdb->optionvalues (option_id, optionvalue, optionvalue_desc, optionvalue_max, optionvalue_min, optionvalue_seq) VALUES (49, 'posts', 'posts', null,null,2)",
// select data for archive mode
"INSERT INTO $wpdb->optionvalues (option_id, optionvalue, optionvalue_desc, optionvalue_max, optionvalue_min, optionvalue_seq) VALUES (50, 'daily', 'daily', null,null,1)",
"INSERT INTO $wpdb->optionvalues (option_id, optionvalue, optionvalue_desc, optionvalue_max, optionvalue_min, optionvalue_seq) VALUES (50, 'weekly', 'weekly', null,null,2)",
"INSERT INTO $wpdb->optionvalues (option_id, optionvalue, optionvalue_desc, optionvalue_max, optionvalue_min, optionvalue_seq) VALUES (50, 'monthly', 'monthly', null,null,3)",
"INSERT INTO $wpdb->optionvalues (option_id, optionvalue, optionvalue_desc, optionvalue_max, optionvalue_min, optionvalue_seq) VALUES (50, 'postbypost','post by post',null,null,4)",
// select data for time diff
"INSERT INTO $wpdb->optionvalues (option_id, optionvalue, optionvalue_desc, optionvalue_max, optionvalue_min, optionvalue_seq) VALUES (51, 'hours', 'hours', 23, -23, null)",
// select data for start of week
"INSERT INTO $wpdb->optionvalues (option_id, optionvalue, optionvalue_desc, optionvalue_max, optionvalue_min, optionvalue_seq) VALUES (9, '0', 'Sunday', null,null,1)",
"INSERT INTO $wpdb->optionvalues (option_id, optionvalue, optionvalue_desc, optionvalue_max, optionvalue_min, optionvalue_seq) VALUES (9, '1', 'Monday', null,null,2)",
"INSERT INTO $wpdb->optionvalues (option_id, optionvalue, optionvalue_desc, optionvalue_max, optionvalue_min, optionvalue_seq) VALUES (9, '6', 'Saturday', null,null,3)",
// Add in a new page for POST DEFAULTS // Add in a new page for POST DEFAULTS
// default_post_status select one of publish draft private // default_post_status select one of publish draft private
@ -569,25 +531,6 @@ $option_data = array(
"INSERT INTO $wpdb->optiongroup_options (group_id, option_id, seq) VALUES(7,59,5 )", "INSERT INTO $wpdb->optiongroup_options (group_id, option_id, seq) VALUES(7,59,5 )",
"INSERT INTO $wpdb->optiongroup_options (group_id, option_id, seq) VALUES(7,83,5 )", "INSERT INTO $wpdb->optiongroup_options (group_id, option_id, seq) VALUES(7,83,5 )",
// select data for post_status
"INSERT INTO $wpdb->optionvalues (option_id, optionvalue, optionvalue_desc, optionvalue_max, optionvalue_min, optionvalue_seq) VALUES (55, 'publish', 'Publish', null,null,1)",
"INSERT INTO $wpdb->optionvalues (option_id, optionvalue, optionvalue_desc, optionvalue_max, optionvalue_min, optionvalue_seq) VALUES (55, 'draft', 'Draft', null,null,2)",
"INSERT INTO $wpdb->optionvalues (option_id, optionvalue, optionvalue_desc, optionvalue_max, optionvalue_min, optionvalue_seq) VALUES (55, 'private', 'Private', null,null,3)",
// select data for comment_status
"INSERT INTO $wpdb->optionvalues (option_id, optionvalue, optionvalue_desc, optionvalue_max, optionvalue_min, optionvalue_seq) VALUES (56, 'open', 'Open', null,null,1)",
"INSERT INTO $wpdb->optionvalues (option_id, optionvalue, optionvalue_desc, optionvalue_max, optionvalue_min, optionvalue_seq) VALUES (56, 'closed', 'Closed', null,null,2)",
// select data for ping_status (aargh duplication!)
"INSERT INTO $wpdb->optionvalues (option_id, optionvalue, optionvalue_desc, optionvalue_max, optionvalue_min, optionvalue_seq) VALUES (57, 'open', 'Open', null,null,1)",
"INSERT INTO $wpdb->optionvalues (option_id, optionvalue, optionvalue_desc, optionvalue_max, optionvalue_min, optionvalue_seq) VALUES (57, 'closed', 'Closed', null,null,2)",
// select data for pingback flag
"INSERT INTO $wpdb->optionvalues (option_id, optionvalue, optionvalue_desc, optionvalue_max, optionvalue_min, optionvalue_seq) VALUES (58, '1', 'Checked', null,null,1)",
"INSERT INTO $wpdb->optionvalues (option_id, optionvalue, optionvalue_desc, optionvalue_max, optionvalue_min, optionvalue_seq) VALUES (58, '0', 'Unchecked', null,null,2)",
// sql select data for default
"INSERT INTO $wpdb->optionvalues (option_id, optionvalue, optionvalue_desc, optionvalue_max, optionvalue_min, optionvalue_seq) VALUES (59, 'SELECT cat_id AS value, cat_name AS label FROM $wpdb->categories order by cat_name', '', null,null,1)",
); );
foreach ($option_data as $query) { foreach ($option_data as $query) {
@ -647,11 +590,6 @@ $links_option_data = array(
"INSERT INTO $wpdb->optiongroup_options (group_id, option_id, seq) VALUES(8,80,21)", "INSERT INTO $wpdb->optiongroup_options (group_id, option_id, seq) VALUES(8,80,21)",
"INSERT INTO $wpdb->optiongroup_options (group_id, option_id, seq) VALUES(8,81,22)", "INSERT INTO $wpdb->optiongroup_options (group_id, option_id, seq) VALUES(8,81,22)",
"INSERT INTO $wpdb->optiongroup_options (group_id, option_id, seq) VALUES(8,82,23)", "INSERT INTO $wpdb->optiongroup_options (group_id, option_id, seq) VALUES(8,82,23)",
// select data for rating_type
"INSERT INTO $wpdb->optionvalues (option_id, optionvalue, optionvalue_desc, optionvalue_max, optionvalue_min, optionvalue_seq) VALUES (62, 'number', 'Number', null,null,1)",
"INSERT INTO $wpdb->optionvalues (option_id, optionvalue, optionvalue_desc, optionvalue_max, optionvalue_min, optionvalue_seq) VALUES (62, 'char', 'Character', null,null,2)",
"INSERT INTO $wpdb->optionvalues (option_id, optionvalue, optionvalue_desc, optionvalue_max, optionvalue_min, optionvalue_seq) VALUES (62, 'image', 'Image', null,null,3)",
); );
foreach ($links_option_data as $query) { foreach ($links_option_data as $query) {

View File

@ -40,60 +40,6 @@ TEXTINPUT;
BOOLSELECT; BOOLSELECT;
//break; //break;
case 5: // select
$ret = <<<SELECT
<label for="$option_result->option_name">$option_result->option_name</label>$between
<select name="$option_result->option_name" id="$option_result->option_name" $disabled>
SELECT;
$select = $wpdb->get_results("SELECT optionvalue, optionvalue_desc "
."FROM $wpdb->optionvalues "
."WHERE option_id = $option_result->option_id "
."ORDER BY optionvalue_seq");
if ($select) {
foreach($select as $option) {
$ret .= '<option value="'.$option->optionvalue.'"';
//error_log("comparing [$option_result->option_value] == [$option->optionvalue]");
if ($option_result->option_value == $option->optionvalue) {
$ret .=' selected="selected"';
}
$ret .= ">$option->optionvalue_desc</option>\n";
}
}
$ret .= '</select>';
return $ret;
//break;
case 7: // SQL select
// first get the sql to run
$sql = $wpdb->get_var("SELECT optionvalue FROM $wpdb->optionvalues WHERE option_id = $option_result->option_id");
if (!$sql) {
return $option_result->option_name . $editable;
}
// now we may need to do table name substitution
eval("include('../wp-config.php');\$sql = \"$sql\";");
$ret = <<<SELECT
<label for="$option_result->option_name">$option_result->option_name</label>$between
<select name="$option_result->option_name" $disabled>
SELECT;
$select = $wpdb->get_results("$sql");
if ($select) {
foreach($select as $option) {
$ret .= '<option value="'.$option->value.'"';
//error_log("comparing [$option_result->option_value] == [$option->optionvalue]");
if ($option_result->option_value == $option->value) {
$ret .=' selected="selected"';
}
$ret .= ">$option->label</option>\n";
}
}
$ret .= '</select>';
return $ret;
//break;
} // end switch } // end switch
return $option_result->option_name . $editable; return $option_result->option_name . $editable;
} // end function get_option_widget } // end function get_option_widget
@ -102,16 +48,6 @@ SELECT;
function validate_option($option, $name, $val) { function validate_option($option, $name, $val) {
global $wpdb; global $wpdb;
$msg = ''; $msg = '';
switch ($option->option_type) {
case 6: // range
// get range
$range = $wpdb->get_row("SELECT optionvalue_max, optionvalue_min FROM $wpdb->optionvalues WHERE option_id = $option->option_id");
if ($range) {
if (($val < $range->optionvalue_min) || ($val > $range->optionvalue_max)) {
$msg = "$name is outside the valid range ($range->optionvalue_min - $range->optionvalue_max). ";
}
}
} // end switch
return $msg; return $msg;
} // end validate_option } // end validate_option

View File

@ -97,16 +97,6 @@ CREATE TABLE $wpdb->optiontypes (
optiontype_name varchar(64) NOT NULL default '', optiontype_name varchar(64) NOT NULL default '',
PRIMARY KEY (optiontype_id) PRIMARY KEY (optiontype_id)
); );
CREATE TABLE $wpdb->optionvalues (
option_id int(11) NOT NULL default '0',
optionvalue tinytext,
optionvalue_desc varchar(255) default NULL,
optionvalue_max int(11) default NULL,
optionvalue_min int(11) default NULL,
optionvalue_seq int(11) default NULL,
UNIQUE KEY option_id (option_id,optionvalue(255)),
KEY option_id_2 (option_id,optionvalue_seq)
);
CREATE TABLE $wpdb->post2cat ( CREATE TABLE $wpdb->post2cat (
rel_id int(11) NOT NULL auto_increment, rel_id int(11) NOT NULL auto_increment,
post_id int(11) NOT NULL default '0', post_id int(11) NOT NULL default '0',
@ -256,18 +246,6 @@ function upgrade_072() {
PRIMARY KEY (group_id, option_id) PRIMARY KEY (group_id, option_id)
) )
"); ");
maybe_create_table($wpdb->optionvalues, "
CREATE TABLE $wpdb->optionvalues (
option_id int(11) NOT NULL,
optionvalue tinytext,
optionvalue_desc varchar(255),
optionvalue_max int(11),
optionvalue_min int(11),
optionvalue_seq int(11),
UNIQUE (option_id, optionvalue(255)),
INDEX (option_id, optionvalue_seq)
)
");
// TODO: REWRITE THIS // TODO: REWRITE THIS
$option_types = array( $option_types = array(
@ -503,68 +481,6 @@ $guessurl = preg_replace('|/wp-admin/.*|i', '', 'http://' . $HTTP_HOST . $REQUES
} }
} }
$option_values = array(
// select data for what to show
"INSERT INTO $wpdb->optionvalues (option_id, optionvalue, optionvalue_desc, optionvalue_max, optionvalue_min, optionvalue_seq) VALUES (49, 'days', 'days', null,null,1)",
"INSERT INTO $wpdb->optionvalues (option_id, optionvalue, optionvalue_desc, optionvalue_max, optionvalue_min, optionvalue_seq) VALUES (49, 'posts', 'posts', null,null,2)",
// select data for archive mode
"INSERT INTO $wpdb->optionvalues (option_id, optionvalue, optionvalue_desc, optionvalue_max, optionvalue_min, optionvalue_seq) VALUES (50, 'daily', 'daily', null,null,1)",
"INSERT INTO $wpdb->optionvalues (option_id, optionvalue, optionvalue_desc, optionvalue_max, optionvalue_min, optionvalue_seq) VALUES (50, 'weekly', 'weekly', null,null,2)",
"INSERT INTO $wpdb->optionvalues (option_id, optionvalue, optionvalue_desc, optionvalue_max, optionvalue_min, optionvalue_seq) VALUES (50, 'monthly', 'monthly', null,null,3)",
"INSERT INTO $wpdb->optionvalues (option_id, optionvalue, optionvalue_desc, optionvalue_max, optionvalue_min, optionvalue_seq) VALUES (50, 'postbypost','post by post',null,null,4)",
// select data for time diff
"INSERT INTO $wpdb->optionvalues (option_id, optionvalue, optionvalue_desc, optionvalue_max, optionvalue_min, optionvalue_seq) VALUES (51, 'hours', 'hours', 23, -23, null)",
// select data for start of week
"INSERT INTO $wpdb->optionvalues (option_id, optionvalue, optionvalue_desc, optionvalue_max, optionvalue_min, optionvalue_seq) VALUES (9, '0', 'Sunday', null,null,1)",
"INSERT INTO $wpdb->optionvalues (option_id, optionvalue, optionvalue_desc, optionvalue_max, optionvalue_min, optionvalue_seq) VALUES (9, '1', 'Monday', null,null,2)",
"INSERT INTO $wpdb->optionvalues (option_id, optionvalue, optionvalue_desc, optionvalue_max, optionvalue_min, optionvalue_seq) VALUES (9, '6', 'Saturday', null,null,3)",
// Add in a new page for POST DEFAULTS
// default_post_status select one of publish draft private
// default_comment_status select one of open closed
// default_ping_status select one of open closed
// default_pingback_flag select one of checked unchecked
// default_post_category sql_select "SELECT cat_id AS value, cat_name AS label FROM $wpdb->categories order by cat_name"
// select data for post_status
"INSERT INTO $wpdb->optionvalues (option_id, optionvalue, optionvalue_desc, optionvalue_max, optionvalue_min, optionvalue_seq) VALUES (55, 'publish', 'Publish', null,null,1)",
"INSERT INTO $wpdb->optionvalues (option_id, optionvalue, optionvalue_desc, optionvalue_max, optionvalue_min, optionvalue_seq) VALUES (55, 'draft', 'Draft', null,null,2)",
"INSERT INTO $wpdb->optionvalues (option_id, optionvalue, optionvalue_desc, optionvalue_max, optionvalue_min, optionvalue_seq) VALUES (55, 'private', 'Private', null,null,3)",
// select data for comment_status
"INSERT INTO $wpdb->optionvalues (option_id, optionvalue, optionvalue_desc, optionvalue_max, optionvalue_min, optionvalue_seq) VALUES (56, 'open', 'Open', null,null,1)",
"INSERT INTO $wpdb->optionvalues (option_id, optionvalue, optionvalue_desc, optionvalue_max, optionvalue_min, optionvalue_seq) VALUES (56, 'closed', 'Closed', null,null,2)",
// select data for ping_status (aargh duplication!)
"INSERT INTO $wpdb->optionvalues (option_id, optionvalue, optionvalue_desc, optionvalue_max, optionvalue_min, optionvalue_seq) VALUES (57, 'open', 'Open', null,null,1)",
"INSERT INTO $wpdb->optionvalues (option_id, optionvalue, optionvalue_desc, optionvalue_max, optionvalue_min, optionvalue_seq) VALUES (57, 'closed', 'Closed', null,null,2)",
// select data for pingback flag
"INSERT INTO $wpdb->optionvalues (option_id, optionvalue, optionvalue_desc, optionvalue_max, optionvalue_min, optionvalue_seq) VALUES (58, '1', 'Checked', null,null,1)",
"INSERT INTO $wpdb->optionvalues (option_id, optionvalue, optionvalue_desc, optionvalue_max, optionvalue_min, optionvalue_seq) VALUES (58, '0', 'Unchecked', null,null,2)",
// sql select data for default
"INSERT INTO $wpdb->optionvalues (option_id, optionvalue, optionvalue_desc, optionvalue_max, optionvalue_min, optionvalue_seq) VALUES (59, 'SELECT cat_id AS value, cat_name AS label FROM $wpdb->categories order by cat_name', '', null,null,1)",
"INSERT INTO $wpdb->optionvalues (option_id, optionvalue, optionvalue_desc, optionvalue_max, optionvalue_min, optionvalue_seq) VALUES (62, 'number', 'Number', null,null,1)",
"INSERT INTO $wpdb->optionvalues (option_id, optionvalue, optionvalue_desc, optionvalue_max, optionvalue_min, optionvalue_seq) VALUES (62, 'char', 'Character', null,null,2)",
"INSERT INTO $wpdb->optionvalues (option_id, optionvalue, optionvalue_desc, optionvalue_max, optionvalue_min, optionvalue_seq) VALUES (62, 'image', 'Image', null,null,3)"
);
foreach ($option_values as $query) {
preg_match("|VALUES \(([0-9]+), '([^']+)'|", $query, $matches);
$option_id = $matches[1];
$value = $matches[2];
if(!$wpdb->get_var("SELECT * FROM $wpdb->optionvalues WHERE option_id = '$option_id' AND optionvalue = '$value'")) {
$wpdb->query($query);
}
}
if (file_exists('../wp-links/links.config.php')) { if (file_exists('../wp-links/links.config.php')) {
include('../wp-links/links.config.php'); include('../wp-links/links.config.php');
@ -636,25 +552,6 @@ function upgrade_100() {
('$gid', '$oid', '$seq')"); ('$gid', '$oid', '$seq')");
} }
if (!$wpdb->get_row("SELECT * FROM $wpdb->optionvalues WHERE option_id = $oid AND optionvalue = 'auto'")) {
$wpdb->query("INSERT INTO $wpdb->optionvalues
(option_id, optionvalue, optionvalue_desc, optionvalue_max, optionvalue_min, optionvalue_seq)
VALUES
('$oid','auto', 'Automatic', NULL, NULL, 3)");
}
if (!$wpdb->get_row("SELECT * FROM $wpdb->optionvalues WHERE option_id = $oid AND optionvalue = 'none'")) {
$wpdb->query("INSERT INTO $wpdb->optionvalues
(option_id, optionvalue, optionvalue_desc, optionvalue_max, optionvalue_min, optionvalue_seq)
VALUES
('$oid', 'none', 'None', NULL, NULL, 1)");
}
if (!$wpdb->get_row("SELECT * FROM $wpdb->optionvalues WHERE option_id = $oid AND optionvalue = 'manual'")) {
$wpdb->query("INSERT INTO $wpdb->optionvalues
(option_id, optionvalue, optionvalue_desc, optionvalue_max, optionvalue_min, optionvalue_seq)
VALUES
('$oid', 'manual', 'Manual', NULL, NULL, 2)");
}
if (!$wpdb->get_var("SELECT option_id FROM $wpdb->options WHERE option_name = 'moderation_notify'")) { if (!$wpdb->get_var("SELECT option_id FROM $wpdb->options WHERE option_name = 'moderation_notify'")) {
$wpdb->query("INSERT INTO $wpdb->options $wpdb->query("INSERT INTO $wpdb->options
(option_id, blog_id, option_name, option_can_override, option_type, option_value, option_width, option_height, option_description, option_admin_level) (option_id, blog_id, option_name, option_can_override, option_type, option_value, option_width, option_height, option_description, option_admin_level)
@ -720,7 +617,6 @@ function upgrade_100() {
(2, $optionid, 5)"); (2, $optionid, 5)");
} }
$wpdb->query("UPDATE $wpdb->optionvalues SET optionvalue_max = 23 , optionvalue_min = -23 WHERE option_id = 51");
// fix upload users description // fix upload users description
$wpdb->query("UPDATE $wpdb->options SET option_description = '...or you may authorize only some users. enter their logins here, separated by spaces. if you leave this variable blank, all users who have the minimum level are authorized to upload. example: \'barbara anne george\'' WHERE option_id = 37"); $wpdb->query("UPDATE $wpdb->options SET option_description = '...or you may authorize only some users. enter their logins here, separated by spaces. if you leave this variable blank, all users who have the minimum level are authorized to upload. example: \'barbara anne george\'' WHERE option_id = 37");
// and file types // and file types
@ -774,14 +670,7 @@ function upgrade_100() {
function upgrade_101() { function upgrade_101() {
global $wpdb; global $wpdb;
// Fix possible duplicate problem from CVS, we can REMOVE this later
$option59 = $wpdb->get_results("SELECT * FROM $wpdb->optionvalues WHERE option_id = '59'");
if (1 < count($option59)) {
$wpdb->query("DELETE FROM $wpdb->optionvalues WHERE option_id = '59' AND optionvalue LIKE('%FROM order%')");
}
// Remove 'automatic' option for comment moderation until it actually does something
$wpdb->query("DELETE FROM $wpdb->optionvalues WHERE optionvalue = 'auto'");
// Less intrusive default // Less intrusive default
$wpdb->query("ALTER TABLE `$wpdb->linkcategories` CHANGE `show_description` `show_description` ENUM( 'Y', 'N' ) DEFAULT 'N' NOT NULL"); $wpdb->query("ALTER TABLE `$wpdb->linkcategories` CHANGE `show_description` `show_description` ENUM( 'Y', 'N' ) DEFAULT 'N' NOT NULL");
@ -1014,7 +903,7 @@ function upgrade_130() {
update_option('active_plugins', $plugins); update_option('active_plugins', $plugins);
} }
$wpdb->query('DROP TABLE IF EXISTS ' . $table_prefix . 'optionvalues');
} }
// The functions we use to actually do stuff // The functions we use to actually do stuff

View File

@ -26,7 +26,6 @@ $wpdb->links = $table_prefix . 'links';
$wpdb->linkcategories = $table_prefix . 'linkcategories'; $wpdb->linkcategories = $table_prefix . 'linkcategories';
$wpdb->options = $table_prefix . 'options'; $wpdb->options = $table_prefix . 'options';
$wpdb->optiontypes = $table_prefix . 'optiontypes'; $wpdb->optiontypes = $table_prefix . 'optiontypes';
$wpdb->optionvalues = $table_prefix . 'optionvalues';
$wpdb->optiongroups = $table_prefix . 'optiongroups'; $wpdb->optiongroups = $table_prefix . 'optiongroups';
$wpdb->optiongroup_options = $table_prefix . 'optiongroup_options'; $wpdb->optiongroup_options = $table_prefix . 'optiongroup_options';
$wpdb->postmeta = $table_prefix . 'postmeta'; $wpdb->postmeta = $table_prefix . 'postmeta';
@ -42,7 +41,6 @@ $tablelinks = $wpdb->links;
$tablelinkcategories = $wpdb->linkcategories; $tablelinkcategories = $wpdb->linkcategories;
$tableoptions = $wpdb->options; $tableoptions = $wpdb->options;
$tableoptiontypes = $wpdb->optiontypes; $tableoptiontypes = $wpdb->optiontypes;
$tableoptionvalues = $wpdb->optionvalues;
$tableoptiongroups = $wpdb->optiongroups; $tableoptiongroups = $wpdb->optiongroups;
$tableoptiongroup_options = $wpdb->optiongroup_options; $tableoptiongroup_options = $wpdb->optiongroup_options;
$tablepostmeta = $wpdb->postmeta; $tablepostmeta = $wpdb->postmeta;