Open main menu

Manual:templatelinks table


Other languages:
English • ‎polski • ‎中文 • ‎日本語
Manual:Contents MediaWiki database layout templatelinks table


MediaWiki version: 1.6

Contents

Contains for each current transclusion the id of the host page, the namespace number of the included page, and its title without namespace.

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][dead link]

FieldsEdit

tl_fromEdit

Key to the page_id of the page containing the link.

tl_from_namespaceEdit

MediaWiki version: 1.24

page_namespace of the page containing the link.

tl_namespaceEdit

Key to page_namespace of the target page. Used in conjunction with tl_title.

tl_titleEdit

Key to page_title of the target page. Used in conjunction with tl_namespace.

Schema summaryEdit

MediaWiki version: 1.26

DESCRIBE templatelinks;

+-------------------+------------------+------+-----+---------+-------+
| Field             | Type             | Null | Key | Default | Extra |
+-------------------+------------------+------+-----+---------+-------+
| tl_from           | int(10) unsigned | NO   | PRI | 0       |       |
| tl_from_namespace | int(11)          | NO   | MUL | 0       |       |
| tl_namespace      | int(11)          | NO   | PRI | 0       |       |
| tl_title          | varbinary(255)   | NO   | PRI |         |       |
+-------------------+------------------+------+-----+---------+-------+
MediaWiki versions: 1.24 – 1.25

DESCRIBE templatelinks;

+-------------------+---------------------+------+-----+-----------+-------+
| Field             | Type                | Null | Key | Default   | Extra |
+-------------------+---------------------+------+-----+-----------+-------+
| tl_from           | int(10) unsigned    | NO   | PRI | 0         |       |
| tl_from_namespace | int(11)             | NO   |     | 0         |       |
| tl_namespace      | int(11)             | NO   | PRI | 0         |       |
| tl_title          | varchar(255) binary | NO   | PRI | 0         |       |
+-------------------+---------------------+------+-----+-----------+-------+
MediaWiki versions: 1.10 – 1.23

DESCRIBE templatelinks;

+---------------+---------------------+------+-----+-----------+-------+
| Field         | Type                | Null | Key | Default   | Extra |
+---------------+---------------------+------+-----+-----------+-------+
| tl_from       | int(10) unsigned    | NO   | PRI | 0         |       |
| tl_namespace  | int(11)             | NO   | PRI | 0         |       |
| tl_title      | varchar(255) binary | NO   | PRI | 0         |       |
+---------------+---------------------+------+-----+-----------+-------+
MediaWiki versions: 1.6 – 1.9

DESCRIBE templatelinks;

+---------------+---------------------+------+-----+-----------+-------+
| Field         | Type                | Null | Key | Default   | Extra |
+---------------+---------------------+------+-----+-----------+-------+
| tl_from       | int(8) unsigned     | NO   | PRI | 0         |       |
| tl_namespace  | int(8)              | NO   | PRI | 0         |       |
| tl_title      | varchar(255) binary | NO   | PRI | 0         |       |
+---------------+---------------------+------+-----+-----------+-------+