Manual:pagelinks table
↑ Manual:Contents | MediaWiki database layout | pagelinks table |
Tracks all internal links in the Wiki. Each entry contains the source page's ID, and the namespace (number) and article name (in text) that is being linked to 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]
The table was introduced in version 1.5. It is the result of merging the links table and the brokenlinks table of version 1.4. Regenerating the pagelinks table always is possible using the rebuildall.php maintenance script.
Fields[edit | edit source]
pl_from[edit | edit source]
Key to the page_id of the page containing the link.
pl_from_namespace[edit | edit source]
MediaWiki version: | ≥ 1.24 |
page_namespace of the page containing the link.
pl_namespace[edit | edit source]
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[edit | edit source]
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.
Schema[edit | edit source]
MediaWiki version: | 1.24 |
mysql> explain 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 versions: | 1.19 – 1.20 |
mysql> 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 | varbinary(255) | NO | PRI | | | +--------------+------------------+------+-----+---------+-------+
MediaWiki version: | 1.18 |
DESCRIBE pagelinks; in version 1.18 gives the following:
+--------------+-----------------+------+-----+---------+-------+ | Field | Type | Null | Key | Default | Extra | +--------------+-----------------+------+-----+---------+-------+ | pl_from | int(8) unsigned | NO | | 0 | | | pl_namespace | int(11) | NO | | 0 | | | pl_title | varbinary(255) | NO | | | | +--------------+-----------------+------+-----+---------+-------+
MediaWiki version: | 1.12 |
+--------------+-----------------+------+-----+---------+-------+ | 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) | NO | PRI | NULL | | +--------------+-----------------+------+-----+---------+-------+
MediaWiki version: | 1.11 |
+--------------+------------------+------+-----+---------+-------+ | 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) | NO | PRI | | | +--------------+------------------+------+-----+---------+-------+
MediaWiki version: | 1.9 |
MediaWiki version: | 1.8 |
+--------------+-----------------+------+-----+---------+-------+ | 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) | NO | PRI | NULL | | +--------------+-----------------+------+-----+---------+-------+
MediaWiki version: | 1.5 |
+--------------+-----------------+------+-----+---------+-------+ | 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) | NO | PRI | | | +--------------+-----------------+------+-----+---------+-------+
![]() |
Engines: MySQL – Oracle – PostgreSQL – SQLite Technical documentation: Schema (tables) – API property associations – Field prefixes – Primary key storage in other fields – Wikimedia extension tables Configuration: Settings – Sharing Development: Access – Optimization – Policy – Updater – Extension schema updates – Patch file Core tables: archive – category – categorylinks – change_tag – config – externallinks – filearchive – hitcounter – image – imagelinks – interwiki – iwlinks – ipblocks – job – l10n_cache – langlinks – logging – log_search – msg_resource – msg_resource_links – module_deps – objectcache – oldimage – page – pagelinks – page_props – page_restrictions – protected_titles – querycache – querycachetwo – querycache_info – recentchanges – redirect – revision – searchindex – sites – site_stats – tag_summary – templatelinks – text – transcache – updatelog – uploadstash – user – user_former_groups – user_groups – user_newtalk – user_properties – valid_tag – watchlist |
---|
Language: | English • Deutsch • 日本語 • Tiếng Việt |
---|