CREATE TABLE $wpdb->blogs (blog_id bigint () not NULL auto_increment, site_id bigint (+) NOT null default ' 0 ', Dom Ain varchar (+) NOT null default ' ', path varchar (+) NOT null default ' ', registered datetime NOT NULL default ' 0000- 00-00 00:00:00 ', last_updated datetime NOT NULL default ' 0000-00-00 00:00:00 ', Public tinyint (2) NOT null default ' 1 ', Archived tinyint (2) NOT null default ' 0 ', mature tinyint (2) is not null default ' 0 ', spam tinyint (2) is not null default ' 0 ', Deleted tinyint (2) NOT null default ' 0 ', lang_id Int (one) not null default ' 0 ', PRIMARY key (blog_id), key domain (DOM Ain (+), path (5)), KEY lang_id (lang_id)) $charset _collate; CREATE TABLE {$db _prefix}reply (id int (TEN) unsigned not NULL auto_increment, Tid int (ten) unsigned NOT null default ' 0 ', Date bigint NOT NULL, name varchar (+) NOT null default ' ', content text not NULL, hide enum (' n ', ' Y ') is not null de Fault ' n ', IP varchar (+) not NULL default ' ', PRIMARY key (ID), key gid (TID), KEY Hide (hide)
What does it mean, especially in the latter section of the code KEY gid (tid)
?
Reply content:
CREATE TABLE $wpdb->blogs (blog_id bigint () not NULL auto_increment, site_id bigint (+) NOT null default ' 0 ', Dom Ain varchar (+) NOT null default ' ', path varchar (+) NOT null default ' ', registered datetime NOT NULL default ' 0000- 00-00 00:00:00 ', last_updated datetime NOT NULL default ' 0000-00-00 00:00:00 ', Public tinyint (2) NOT null default ' 1 ', Archived tinyint (2) NOT null default ' 0 ', mature tinyint (2) is not null default ' 0 ', spam tinyint (2) is not null default ' 0 ', Deleted tinyint (2) NOT null default ' 0 ', lang_id Int (one) not null default ' 0 ', PRIMARY key (blog_id), key domain (DOM Ain (+), path (5)), KEY lang_id (lang_id)) $charset _collate; CREATE TABLE {$db _prefix}reply (id int (TEN) unsigned not NULL auto_increment, Tid int (ten) unsigned NOT null default ' 0 ', Date bigint NOT NULL, name varchar (+) NOT null default ' ', content text not NULL, hide enum (' n ', ' Y ') is not null de Fault ' n ', IP varchar (+) not NULL default ' ', PRIMARY key (ID), key gid (TID), KEY Hide (hide)
What does it mean, especially in the latter section of the code KEY gid (tid)
?
From http://m.blog.csdn.net/article/details?id=51778816
Key (Sid,tid) represents the Federated primary key, and the whole of the two fields is unique