Manual:Interwiki table

The interwiki table stores the interwiki prefixes with their targets.

+---++--+-+-+---+ +---++--+-+-+---+ +---++--+-+-+---+
 * Field    | Type       | Null | Key | Default | Extra |
 * iw_prefix | varchar(32)| NO  | PRI |         |       |
 * iw_url   | blob       | NO   |     |         |       |
 * iw_api   | blob       | NO   |     |         |       |
 * iw_wikiid | varchar(64)| NO  |     |         |       |
 * iw_local | bool       | NO   |     |         |       |
 * iw_trans | tinyint(1) | NO   |     | 0       |       |


 * iw_prefix is the prefix of the interwiki link; this is used the same way as a namespace is used when editing.
 * iw_url is the target of the link; the page name is substituted for $1.
 * iw_api is the URL of the file api.php
 * iw_wikiid is the name of the database (for a connection to be established with wfGetLB( 'wikiid' ))
 * iw_local informs MediaWiki how it should treat interwiki links coming from external sources. If iw_local is 1, then it will treat these links as though they were generated from within the local wiki.
 * For example, the interwiki link fr: on the en.wikipedia.org project has iw_local=1 set. Therefore, the link to http://en.wikipedia.org/wiki/fr:Accueil gracefully redirects you to the French Homepage (Accueil).  However, the Wikimedia foundation project site is flagged 0 on en.wikipedia.org; the link to http://en.wikipedia.org/wiki/wikimedia:Home does not work, even though Home would work if it were on a local Wikipedia page.
 * iw_trans: is used to allow transcluding templates (or other pages) from another MediaWiki installation. Both   and   need to be on.

+---++--+-+-+---+ +---++--+-+-+---+ +---++--+-+-+---+
 * Field    | Type       | Null | Key | Default | Extra |
 * iw_prefix | char(32)  | NO   | PRI |         |       |
 * iw_url   | blob       | NO   |     |         |       |
 * iw_api   | blob       | NO   |     |         |       |
 * iw_wikiid | char(64)  | NO   |     |         |       |
 * iw_local | bool       | NO   |     |         |       |
 * iw_trans | tinyint(1) | NO   |     | 0       |       |

The two fields iw_api and iw_wikiid were added in.

+---++--+-+-+---+ +---++--+-+-+---+ +---++--+-+-+---+
 * Field    | Type       | Null | Key | Default | Extra |
 * iw_prefix | char(32)  | NO   | PRI |         |       |
 * iw_url   | blob       | NO   |     |         |       |
 * iw_local | bool       | NO   |     |         |       |
 * iw_trans | tinyint(1) | NO   |     | 0       |       |

+---++--+-+-+---+ +---++--+-+-+---+ +---++--+-+-+---+
 * Field    | Type       | Null | Key | Default | Extra |
 * iw_prefix | char(32)  | NO   | PRI |         |       |
 * iw_url   | char(127)  | NO   |     |         |       |
 * iw_local | bool       | NO   |     |         |       |
 * iw_trans | tinyint(1) | NO   |     | 0       |       |

+---++--+-+-+---+ +---++--+-+-+---+ +---++--+-+-+---+
 * Field    | Type       | Null | Key | Default | Extra |
 * iw_prefix | char(32)  | NO   | PRI |         |       |
 * iw_url   | char(127)  | NO   |     |         |       |
 * iw_local | bool       | NO   |     |         |       |
 * iw_trans | tinyint(1) | NO   |     |         |       |