"Roan Kattouw" <[email protected]> wrote in message 
news:[email protected]...
> 2009/9/5 Helder Geovane Gomes de Lima <[email protected]>:
>> But I don't know what to use in the SQL instead of the "WHAT?".
>> Does anybody knows what should it be?
>>
> You should probably use "ORDER BY page_namespace, page_title" there,
> which will sort by namespace, then by title.

However, it should be noted that page_namespace is the numeric index for the 
namespace, NOT the textual representation of it, therefore in all languages 
they will be ordered as follows (with the namespace names being the 
appropriate ones for the language being used):

  Foo
  Talk:Foo
  User:Foo
  User talk:Foo
  Project:Foo
  Project talk:Foo
  File:Foo.jpg
  File talk:Foo.jpg
  MediaWiki:Foo
  MediaWiki talk:Foo
  Template:Foo
  Template talk:Foo
  Help:Foo
  Help talk:Foo
  Category:Foo
  Category talk:Foo

Rather than the following 'properly alphabetical' order (assuming 
language=en):

  Category talk:Foo
  Category:Foo
  File talk:Foo.jpg
  File:Foo.jpg
  Foo
  Help talk:Foo
  Help:Foo
  MediaWiki talk:Foo
  MediaWiki:Foo
  Project talk:Foo
  Project:Foo
  Talk:Foo
  Template talk:Foo
  Template:Foo
  User talk:Foo
  User:Foo

This is probably desirable, but I thought it worth pointing out...

- Mark Clements (HappyDog) 



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

Reply via email to