MediaWiki/tables

from HTYP, the free directory anyone can edit if they can prove to me that they're not a spambot
Jump to navigation Jump to search

page_props

Stores "page properties". I'm not quite sure how this is supposed to be used, but I've noticed some keys that are often present:

  • notoc presumably flags that the __NOTOC__ indicator is present in the page's content
  • noeditsection presumably flags that the __NOEDITSECTION indicator is present in the page's content
  • smw-semanticdata-status presumably flags that there are Semantic MediaWiki tags in the page's content

Names and values are kept in binary blobs, though (even though they are strings), so you have to do a modified query to see what's going on:

SELECT pp_page, CAST(pp_propname AS CHAR) AS Name, CAST(pp_value AS CHAR) AS Value, pp_sortkey FROM page_props;

A slightly more complex query to show the names of the pages (instead of just IDs):

SELECT 
    pp_page,
    page_namespace,
    page_title,
    CAST(pp_propname AS CHAR) AS Name,
    CAST(pp_value AS CHAR) AS Value,
    pp_sortkey
FROM
    page_props
        LEFT JOIN
    page ON pp_page = page_id