Manual:Links table

From MediaWiki.org

Jump to: navigation, search
Manual:Contents MediaWiki database layout Links table


Note: The links and brokenlinks tables have been merged to a single pagelinks table, which records the namespace+title key pair of target links rather than the page ID or the prefixed title. See [1]

The links table stores all the links to existing articles. This is good for a variety of functions, from link caching in the output functions to the "what links here" page. It is the good twin of the brokenlinks table.

MediaWiki version: 1.3


+----------+------------------+------+-----+---------+-------+
| Field    | Type             | Null | Key | Default | Extra |
+----------+------------------+------+-----+---------+-------+
| l_from   | int(8) unsigned  | NO   | UNI | 0       |       |
| l_to     | int(8) unsigned  | NO   |     | 0       |       |
+----------+------------------+------+-----+---------+-------+

l_from is the cur_id of the article that contains the link. (This is a change from 1.2, wherein the title of the article was stored. This was not very wise, and has now been fixed.)

l_to is the cur_id of the "target" article.

MediaWiki version: 1.1
MediaWiki version: 1.1


+----------+------------------+------+-----+---------+-------+
| Field    | Type             | Null | Key | Default | Extra |
+----------+------------------+------+-----+---------+-------+
| l_from   | varchar(255)     | NO   | UNI | 0       |       |
| l_to     | int(8) unsigned  | NO   |     | 0       |       |
+----------+------------------+------+-----+---------+-------+