MediaWiki/Sql

From Freephile Wiki
< MediaWiki
Revision as of 06:34, 26 October 2008 by Freephile (talk | contribs) (New page: Here is a query that will show you the pages in your wiki that contain a particular string. In this example, I wanted to find all pages that were using the 'Icon' extension parser extens...)

(diff) ← Older revision | Approved revision (diff) | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Here is a query that will show you the pages in your wiki that contain a particular string. In this example, I wanted to find all pages that were using the 'Icon' extension parser extension magic word '#icon'.

SELECT DISTINCT page_title
FROM page
RIGHT JOIN revision ON page_id = rev_page
WHERE rev_text_id
IN (
    SELECT old_id
    FROM `text`
    WHERE old_text LIKE '%#icon%'
)