Manual:Page props table/de

The page_props table contains properties about pages set by the parser via, such as the display title and the default category sortkey. In particular, all double underscore magic words are automatically recorded here. Also, many extensions use this table to store their own data. Note that reparsing a page causes all of its properties to be purged from this table and replaced with the new ones, so this table is not suitable for storing data that can't be regenerated during a reparse.

pp_page
by which the name/value pair is indexed

pp_propname
Page property name

pp_value
Page property value

pp_sortkey
This is so pages can be efficiently queried and sorted by property value (see ).

Schema summary
+-+--+--+-+-+---+ +-+--+--+-+-+---+ +-+--+--+-+-+---+
 * Field      | Type             | Null | Key | Default | Extra |
 * pp_page    | int(10) unsigned | NO   | PRI | NULL    |       |
 * pp_propname | varbinary(60)   | NO   | PRI | NULL    |       |
 * pp_value   | blob             | NO   |     | NULL    |       |
 * pp_sortkey | float            | YES  |     | NULL    |       |

+-+---+--+-+-+---+ +-+---+--+-+-+---+ +-+---+--+-+-+---+
 * Field      | Type          | Null | Key | Default | Extra |
 * pp_page    | int(11)       | NO   | PRI | NULL    |       |
 * pp_propname | varbinary(60) | NO  | PRI | NULL    |       |
 * pp_value   | blob          | NO   |     | NULL    |       |
 * pp_sortkey | float         | YES  |     | NULL    |       |

+-+---+--+-+-+---+ +-+---+--+-+-+---+ +-+---+--+-+-+---+
 * Field      | Type          | Null | Key | Default | Extra |
 * pp_page    | int(11)       | NO   | PRI | NULL    |       |
 * pp_propname | varbinary(60) | NO  | PRI | NULL    |       |
 * pp_value   | blob          | NO   |     | NULL    |       |

Indexe
 +++--+--+-+---+-+--++--++-+---+ +++--+--+-+---+-+--++--++-+---+ +++--+--+-+---+-+--++--++-+---+
 * Table     | Non_unique | Key_name                 | Seq_in_index | Column_name | Collation | Cardinality | Sub_part | Packed | Null | Index_type | Comment | Index_comment |
 * page_props |         0 | PRIMARY                  |            1 | pp_page     | A         |           0 |     NULL | NULL   |      | BTREE      |         |               |
 * page_props |         0 | PRIMARY                  |            2 | pp_propname | A         |           0 |     NULL | NULL   |      | BTREE      |         |               |
 * page_props |         0 | pp_propname_page         |            1 | pp_propname | A         |           0 |     NULL | NULL   |      | BTREE      |         |               |
 * page_props |         0 | pp_propname_page         |            2 | pp_page     | A         |           0 |     NULL | NULL   |      | BTREE      |         |               |
 * page_props |         0 | pp_propname_sortkey_page |            1 | pp_propname | A         |           0 |     NULL | NULL   |      | BTREE      |         |               |
 * page_props |         0 | pp_propname_sortkey_page |            2 | pp_sortkey  | A         |           0 |     NULL | NULL   | YES  | BTREE      |         |               |
 * page_props |         0 | pp_propname_sortkey_page |            3 | pp_page     | A         |           0 |     NULL | NULL   |      | BTREE      |         |               |

Sample query
Here's a sample query to find the page properties in use (see also ).

Example of a simple extension that uses this table
Here is an example of an extension that stores its own page property in the  table. It defines two parser tags (hooks) &lt;getprop&gt; and &lt;setprop&gt; that manipulate its property named SimpleSetPropExtension. They allow a wiki editor to set the property's value in wikitext with Some random text, and display its value with (for the current page) or with (for its value on some other page).