On 21/09/2007, Daniel Barrett danb@vistaprint.com wrote:
SELECT rev_user_text FROM {$wgDBprefix}page...
Actually, you should use the Database::tableName() method to obtain the fully-prefixed name for a table; this also respects shared table settings, e.g. for users.
In general, though, use the Database::select() and other query-builder/wrapper functions to perform queries, if at all possible - it does a lot of the work of escaping various bits and dealing with constructing IN ( ..., ... ) clauses, and all manner of options and other fun.
Rob Church