Page MenuHomePhabricator

DBQ-124 List of template categories
Closed, ResolvedPublic

Description

This issue was converted from https://jira.toolserver.org/browse/DBQ-124.
Summary: List of template categories
Issue type: Task - A task that needs to be done.
Priority: Minor
Status: Done
Assignee: Hoo man <hoo@online.de>


From: WOSlinker <c1541@hotmail.com>

Date: Sat, 05 Feb 2011 21:48:25

I'm after a list of the template categories on en.wiki that do not transclude the Template category template.

I've got a query although I'm not 100% sure if it is correct:

SELECT page_title
FROM page AS p
WHERE page_namespace = 14
AND page_title like '%template%'
AND NOT EXISTS (SELECT 1 FROM templatelinks AS tl
WHERE tl.tl_from = p.page_id
AND tl.tl_namespace = 10
AND tl.tl_title = 'Template category')


Version: unspecified
Severity: minor

Details

Reference
bz59377

Event Timeline

bzimport raised the priority of this task from to Needs Triage.Nov 22 2014, 2:26 AM
bzimport set Reference to bz59377.

From: Hoo man <hoo@online.de>

Date: Sat, 05 Feb 2011 22:10:25

Your query was fine and I could execute it without any changes ![][1]

Results:
http://toolserver.org/~hoo/dbq/dbq-124.txt

[1]: https://jira.toolserver.org/images/icons/emoticons/smile.gif

From: WOSlinker <c1541@hotmail.com>

Date: Sat, 05 Feb 2011 22:36:01

Thanks for running it. Unfortunatly, it didn't quite return the results I was after as it listed all categories with template in the name. The exists part didn't work properly. I think I should have put in an underscore rather than a space.

SELECT page_title
FROM page AS p
WHERE page_namespace = 14
AND page_title like '%template%'
AND NOT EXISTS (SELECT 1 FROM templatelinks AS tl
WHERE tl.tl_from = p.page_id
AND tl.tl_namespace = 10
AND tl.tl_title = 'Template_category')

Could you run it again?


From: Hoo man <hoo@online.de>

Date: Sun, 06 Feb 2011 00:28:57

I didn't notice that either... mediawiki always converts spaces to underscores in page_titles ![][1]

Results:
http://toolserver.org/~hoo/dbq/dbq-124.txt

[1]: https://jira.toolserver.org/images/icons/emoticons/smile.gif

From: WOSlinker <c1541@hotmail.com>

Date: Sun, 06 Feb 2011 09:04:38

thanks. it was perfect this time.

This bug was imported as RESOLVED. The original assignee has therefore not been
set, and the original reporters/responders have not been added as CC, to
prevent bugspam.

If you re-open this bug, please consider adding these people to the CC list:
Original assignee: hoo@online.de
CC list: hoo@online.de, c1541@hotmail.com