I've been staring at the mediawiki database for my site. I want to create a linear list of pages ordered by the original creation date of the page.
I can't find a timestamp anywhere that indicates the first creation date of the page.
I can find revision timestamps with no problem, in the revision table...but no original creation timestamp. Furthermore, "page_touched" won't work since all these pages were xml imported recently, so they were all touched.
Any ideas?
Based on the layout of the revision table. I did not test it, nor have seriously considered possible corner cases.
SELECT rev_page, rev_timestamp
FROM revision
WHERE rev_parent_id = 0
ORDER BY rev_timestamp
The first revision of a page has rev_parent_id = 0, so we take its timestamp as the creation timestamp.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With