Dear All,
I just experienced that we have multiple page_id against one page_title in the page table.
for example:
mysql> select page_id, page_title from page where upper(page_title) = upper('Australia'); +---------+------------+ | page_id | page_title | +---------+------------+ | 693538 | Australia | | 1805288 | Australia | | 4689264 | Australia | | 8759165 | Australia | +---------+------------+ 4 rows in set (6.59 sec)
Can anyone please tell me how can i interpret this information?
Thanks a lot.
Best Regards, Fawad.
What is page_namespace?
On 10/20/07, Fawad Nazir fawad.nazir@gmail.com wrote:
Dear All,
I just experienced that we have multiple page_id against one page_title in the page table.
for example:
mysql> select page_id, page_title from page where upper(page_title) = upper('Australia'); +---------+------------+ | page_id | page_title | +---------+------------+ | 693538 | Australia | | 1805288 | Australia | | 4689264 | Australia | | 8759165 | Australia | +---------+------------+ 4 rows in set (6.59 sec)
Can anyone please tell me how can i interpret this information?
Thanks a lot.
Best Regards, Fawad.
Wikitech-l mailing list Wikitech-l@lists.wikimedia.org http://lists.wikimedia.org/mailman/listinfo/wikitech-l
Australia, Talk:Australia, Portal:Australia, Portal talk:Australia
Thanks Platonides. From where did u get this information. Is this information stored in the database as well?
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?
Thanks for your help...
On 10/21/07, Platonides Platonides@gmail.com wrote:
Australia, Talk:Australia, Portal:Australia, Portal talk:Australia
Wikitech-l mailing list Wikitech-l@lists.wikimedia.org http://lists.wikimedia.org/mailman/listinfo/wikitech-l
Fawad Nazir wrote:
Thanks Platonides. From where did u get this information. Is this information stored in the database as well?
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?
Thanks for your help...
page_is_redirect, see http://www.mediawiki.org/wiki/Page_table for details.
Kimon (Gribeco)
Thanks so much for the link Kimon. I was trying to find such a link, This connected all the dots now :)).
On 10/21/07, Kimon Berlin (gribeco) gribeco@deepskymarines.org wrote:
Fawad Nazir wrote:
Thanks Platonides. From where did u get this information. Is this information stored in the database as well?
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?
Thanks for your help...
page_is_redirect, see http://www.mediawiki.org/wiki/Page_table for details.
Kimon (Gribeco)
Wikitech-l mailing list Wikitech-l@lists.wikimedia.org http://lists.wikimedia.org/mailman/listinfo/wikitech-l
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.
Thanks a lot.
mysql> select page_id, page_namespace, page_title, page_is_redirect from page where page_namespace=0 and page_is_redirect=0 and page_title='Japan'; +---------+----------------+------------+------------------+ | page_id | page_namespace | page_title | page_is_redirect | +---------+----------------+------------+------------------+ | 15573 | 0 | Japan | 0 | +---------+----------------+------------+------------------+
now i got the intended results :)...
Now i can move to the next step.
The link made my life easier.
This link: http://www.mediawiki.org/wiki/Category:MediaWiki_database_tables is quite useful. Just incase anyone else reads this thread.
Thanks. Best Regards,
On 10/21/07, Platonides Platonides@gmail.com wrote:
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.
Wikitech-l mailing list Wikitech-l@lists.wikimedia.org http://lists.wikimedia.org/mailman/listinfo/wikitech-l
oooo... i got it:
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.
Thanks a lot, Bryan.
Best Regards, Fawad.
On 10/20/07, Bryan Tong Minh bryan.tongminh@gmail.com wrote:
What is page_namespace?
On 10/20/07, Fawad Nazir fawad.nazir@gmail.com wrote:
Dear All,
I just experienced that we have multiple page_id against one page_title in the page table.
for example:
mysql> select page_id, page_title from page where upper(page_title) = upper('Australia'); +---------+------------+ | page_id | page_title | +---------+------------+ | 693538 | Australia | | 1805288 | Australia | | 4689264 | Australia | | 8759165 | Australia | +---------+------------+ 4 rows in set (6.59 sec)
Can anyone please tell me how can i interpret this information?
Thanks a lot.
Best Regards, Fawad.
Wikitech-l mailing list Wikitech-l@lists.wikimedia.org http://lists.wikimedia.org/mailman/listinfo/wikitech-l
Wikitech-l mailing list Wikitech-l@lists.wikimedia.org http://lists.wikimedia.org/mailman/listinfo/wikitech-l
wikitech-l@lists.wikimedia.org