2009/11/26 李琴 qli@ica.stc.sh.cn:
hi.sorry to borther again
I want to ask how to rewrite those statement ,too.
Like '>,<,LIMIT '.
And when I use 'order by ' how to change the order of 'ASC,DESC'?
LIMIT and ORDER BY are similar to GROUP BY, which Tim already demonstrated. ASC and DESC can just be appended to the order by column, like 'ORDER BY' => 'rc_id DESC' . Note that ASC is the default and never has to be specified explicitly. Tim also demonstrated how to do equalities (like 'rc_namespace' => 0 ); other conditions go in the same array, but as one string (like 'rc_namespace != 0', 'rc_namespace < 2' and 'rc_namespace=page_namespace' ).
There's also lots of examples in the MediaWiki codebase, just grep for 'select('.
Roan Kattouw (Catrope)