Fawad Nazir wrote:
Thanks Platonides. From where did u get this
information. Is this
information stored in the database as well?
I just guessed which namespaces would have Australia.
mysql> select page_id, page_title, page_namespace
from page where
upper(page_title) = upper('Australia');
+---------+------------+----------------+
| page_id | page_title | page_namespace |
+---------+------------+----------------+
| 693538 | Australia | 14 |
| 1805288 | Australia | 100 |
| 4689264 | Australia | 0 |
| 8759165 | Australia | 10 |
+---------+------------+----------------+
4 rows in set (6.53 sec)
0, is for english right.
NOOO! Each language has its own db.
You're facing with namespaces.
0 -> Main namespace
10 -> Template
14 -> Category
100 -> Portal (first custom namespace)
Thus:
+---------+------------+----------------+
| page_id | page_title | page_namespace |
+---------+------------+----------------+
| 693538 | Australia | 14 | Category:Australia
| 1805288 | Australia | 100 | Portal:Australia
| 4689264 | Australia | 0 | Australia
| 8759165 | Australia | 10 | Template:Australia
+---------+------------+----------------+
So it seems i had a 50% rate. However, the talk versions (which do exist
on en:) would be stored on the same way, with odd namespace number.
BTW i just tried same for Japan:
mysql> select page_id, page_title, page_namespace from page where
upper(page_title) = upper('Japan');
+---------+------------+----------------+
| page_id | page_title | page_namespace |
+---------+------------+----------------+
| 15554 | JapaN | 0 |
| 15573 | Japan | 0 |
| 359001 | JAPAN | 0 |
| 691585 | Japan | 14 |
| 907425 | Japan | 4 |
| 2604728 | Japan | 100 |
| 7221502 | Japan | 10 |
+---------+------------+----------------+
and then i went on wikipedia and searched for "JapaN" and "JAPAN".
Both of these pages are directed towards a single page "Japan". Is
there a way from the database we can know that which one is the main
page?
Include the page_is_redirect field to know if it's (not) a redirect.
If you wan to know the redirect target join with the redirect table.