Eric Astor wrote:
Here we go:
SELECT from_page.page_title AS from_title, to_page.page_title AS to_title
FROM page from_page
INNER JOIN pagelinks pl ON pl.pl_from = from_page.page_id
INNER JOIN page to_page ON to_page.page_namespace = pl.pl_namespace
AND to_page.page_title = pl.pl_title
WHERE from_page.page_is_redirect=1;
I hope that helps!
Ah, that's a _much_ better query. Nice one!
Definitely disregard what I wrote about using a regex, and use this instead.
All the best,
Nick.