Thanks Richard,
It's nice you took time to answer. I'm writing an extension (another totally useless one) and I need to build a link table of the Category pages, but with the IDs. It's a complete mysql question, but I'm sure there are geeks here (as you seem to be) who know fairly well mediawiki and could help:
I need to have the cl_to and cl_from converted to the ID of these pages (exactly the same as for the normal links table)...This already gives me headaches:(
As for another constraint, I need to take into account only the links between category pages (from namespace=14 to namespace=14)
If you still have strength ... :D
François
Richard Holton wrote:
On Apr 9, 2005 9:09 AM, FxParlant f-x.p@laposte.net wrote:
Hello,
I'm trying to build a table with the IDs of the categorylinks table: Id of the cl_to | Id of the cl_from
It seems simple, by however I'm totally confused by its structure.
Please, help;
François
François,
I'm not certain I fully understand what you want to do. However, I'll give some information that I hope will help. If you need more, please let me know.
In the categoryLinks table:
cl_from is the id of the article where the [[category:foo]] entry appears. cl_to is the _title_ of the category page (in this example, "foo". The "category:" prefix is assumed).
Note that since there can be multiple category entries on any page, the cl_from field is not unique.
Note that cl_to is stored as a title instead of as an id because it is possible to add [[category:bar]] to a page when there is no category page named "bar".
The combination of (cl_from, cl_to) should be unique. Multiple instances of the same category entry in an article are only entered into categoryLinks once.
I hope this helps!
--Rich Holton
[[W:en:User:Rholton]]