Jim Hu wrote:
Some users are reporting database errors for one of my extensions, UserRightsList.
http://www.mediawiki.org/wiki/User_talk:JimHu#Database_Error
The error reported is
1146: Table 'mw_.user' doesn't exist (localhost) or 1142: SELECT command denied to user 'cdy'@'srv83.one.com' for table 'user'
depending on how MySQL privileges are set. The extension works for me in 1.11. 1, and I'm not sure exactly where the problem is for the users. I suspect it's because I'm misusing $wgDBprefix, and the extension is looking for a db that doesn't exist. But since I don't use it in my wikis, it's hard to test on my local installs. I'm guessing the problem is somewhere in the method below (which should probably be rewritten anyway to use more MW style db access code).
I think you need to replace your FROM $wgDBprefix.tablename to FROM $wgDBprefix" . "tablename
ie. the DB prefix is prepended to the name, there's no dot between prefix & table name.