Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8415159
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T01:21:54+00:00 2026-06-10T01:21:54+00:00

I am trying to find corresponding text records for a category. For example if

  • 0

I am trying to find corresponding text records for a category.

For example if I have the ID 5 for a “categorylinks” record, how would I find which texts go into that category?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T01:21:56+00:00Added an answer on June 10, 2026 at 1:21 am

    Edit: I’m still not sure if you are asking for the text of a category page or the text of the pages in a category so here’s both:

    Text of a category page:

    select old_text from text, revision, page, categorylinks
    where rev_text_id = old_id
        and rev_id = page_latest
        and page_namespace = 14
        and page_title = cl_to
        and cl_from = <cl_from entry in categorylinks table>
    

    Text of a page in a category:

    select old_text from text, revision, page, categorylinks
    where rev_text_id = old_id
        and rev_id = page_latest
        and page_id = cl_from
        and cl_to = <cl_to entry in categorylinks table>
    

    More explanation:

    Basically, in categorylinks, the cl_title is the title of the category page. So you can look that up in the page table using page_title and page_namespace = 14 (the category namespace). Once you have the correct page, the page_latest field for that row equals the rev_id in the revision table. This gives you the latest revision for the category page. The revision table has a rev_text_id field which equals the old_id field in the text table. old_text in the text table is your text.

    Any time you want the text for a page it basically works like this. Find the page database record. Then: page.page_latest = revision.rev_id and revision.rev_text_id = text.old_id.

    See also: The MediaWiki database schema.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Trying to find an example that has css rollover using sprites & sliding door
I'm trying to find the best way to display text corresponding to specific options
I am trying to find the corresponding code to the buttons on the top,
I've been trying to modify a Google charts example in order to have three
I'm trying to find out two things. Can I optimize my code so that
I'm trying to find all strings of the format {{rdex|001|001|Bulbasaur|2|Grass|Poison}} in a large text
I'm trying to find a way to format a tree structure corresponding to a
While looping through records in one list, I want to find a corresponding line
Trying to find a standard. The CmdLet will process data - multiple input, defined
Trying to find a way to remove blank pages from a document I wrote

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.