2009/1/18 Ankuj Gupta <[email protected]>:
> I am working on my project based on wikipedia. For that i require
> number of backlinks for each page in wiki.Is it possible to find them
> using the pagelinks table.

Yes, you can use the pagelinks table for that. You need something like

SELECT COUNT(*) FROM pagelinks WHERE pl_namespace=0 AND pl_title='Page_title'

> Or it there some other method. I tried the
> mediawiki-api as well but was not able to understand how they can be
> used.

AFAIK, there is no method to get a *count* of backlinks in the API;
you could get a complete list with something like
http://en.wikipedia.org/w/api.php?action=query&list=backlinks&bltitle=Ook
and count those, but that would be wasting resources.

HTH,
-- [[cs:User:Mormegil | Petr Kadlec]]

_______________________________________________
Wikipedia-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikipedia-l

Reply via email to