"Roan Kattouw" roan.kattouw@gmail.com wrote in message news:f154f3a80909050742i90f5949vf0fad7962a154935@mail.gmail.com...
2009/9/5 Helder Geovane Gomes de Lima heldergeovane@gmail.com:
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)