I've looked at the diagram on the mediawiki site -- and it still not clear to me what the page_latest column references (they don't seem to be page_ids)...
Can someone please clarify?
Thanks.
It refers the revision ID in the table "revision" ("rev_id") of the latest page revision. Note that this ID may be referenced in the URL as "oldid" (e.g. when showing an old revision).
I know the original query has been answered already, but I'd like to put in a good word for the database docs at MediaWiki.org - they're generally really quite good, with a page about each database table, including a quick explanation of what most fields are for, e.g.: http://www.mediawiki.org/wiki/Page_table#page_latest
-- All the best, Nick.