On Mar 30, 2008, at 8:38 AM, Platonides wrote:
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.
Aha! That makes sense. I was using $wgDBprefix as if it was $wgDBname. Thanks! I really should change the code to use the appropriate db functions.
MediaWiki-l mailing list MediaWiki-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
===================================== Jim Hu Associate Professor Dept. of Biochemistry and Biophysics 2128 TAMU Texas A&M Univ. College Station, TX 77843-2128 979-862-4054