手册:页面链接数据库表

From MediaWiki.org
Jump to navigation Jump to search
This page is a translated version of the page Manual:Pagelinks table and the translation is 28% complete.
Other languages:
Deutsch • ‎English • ‎Tiếng Việt • ‎Yorùbá • ‎español • ‎中文 • ‎日本語
手册:目录 MediaWiki数据库布局 pagelinks table/zh


MediaWiki版本: 1.5

pagelinks标签囊括所有wiki内部标签 Each entry contains the source page's ID and namespace (number), and the article name (in text) and namespace (number) that is being linked to from within that source page. There may be many instances of the source page's ID, as many as the internal links within it, but there can be only one entry per internal link for any page ID (or MySQL will yell out a fatal error).

Note that the target page may or may not exist, and due to renames and deletions may refer to different page records as time goes by.

此功能只在版本1.5适用。 It is the result of merging the links table and the brokenlinks table of version 1.4. Regenerating the pagelinks table is always possible using the rebuildall.php maintenance script.

字段

pl_from

Key to the page_id of the page containing the link.

pl_from_namespace

MediaWiki版本: 1.24

page_namespace of the page containing the link.

pl_namespace

Key to page_namespace of the target page. The target page may or may not exist, and due to renames and deletions may refer to different page records as time goes by.

pl_title

Key to page_title of the target page. The target page may or may not exist, and due to renames and deletions may refer to different page records as time goes by. Spaces are converted to underscores, and the first letter is automatically capitalized. So for example, a link to foo bar would have a pl_title of "Foo_bar".

模式摘要

MediaWiki版本: 1.26

DESCRIBE pagelinks;

+-------------------+------------------+------+-----+---------+-------+
| Field             | Type             | Null | Key | Default | Extra |
+-------------------+------------------+------+-----+---------+-------+
| pl_from           | int(10) unsigned | NO   | PRI | 0       |       |
| pl_from_namespace | int(11)          | NO   | MUL | 0       |       |
| pl_namespace      | int(11)          | NO   | PRI | 0       |       |
| pl_title          | varbinary(255)   | NO   | PRI |         |       |
+-------------------+------------------+------+-----+---------+-------+
MediaWiki版本: 1.24 – 1.25

DESCRIBE pagelinks;

+-------------------+------------------+------+-----+---------+-------+
| Field             | Type             | Null | Key | Default | Extra |
+-------------------+------------------+------+-----+---------+-------+
| pl_from           | int(10) unsigned | NO   | PRI | 0       |       |
| pl_from_namespace | int(11)          | NO   |     | 0       |       |
| pl_namespace      | int(11)          | NO   | PRI | 0       |       |
| pl_title          | varbinary(255)   | NO   | PRI |         |       |
+-------------------+------------------+------+-----+---------+-------+
MediaWiki版本: 1.10 – 1.23

DESCRIBE pagelinks;

+--------------+---------------------+------+-----+---------+-------+
| Field        | Type                | Null | Key | Default | Extra |
+--------------+---------------------+------+-----+---------+-------+
| pl_from      | int(10) unsigned    | NO   | PRI | 0       |       |
| pl_namespace | int(11)             | NO   | PRI | 0       |       |
| pl_title     | varchar(255) binary | NO   | PRI | NULL    |       |
+--------------+---------------------+------+-----+---------+-------+
MediaWiki版本: 1.5 – 1.9

DESCRIBE pagelinks;

+--------------+---------------------+------+-----+---------+-------+
| Field        | Type                | Null | Key | Default | Extra |
+--------------+---------------------+------+-----+---------+-------+
| pl_from      | int(8) unsigned     | NO   | PRI | 0       |       |
| pl_namespace | int(11)             | NO   | PRI | 0       |       |
| pl_title     | varchar(255) binary | NO   | PRI | NULL    |       |
+--------------+---------------------+------+-----+---------+-------+