I'm trying to use the database functions to connect to an external database called wikibox_db using the following
$dbr =& wfGetDB( DB_SLAVE ); $dbr->debug(true); $dbr->selectDB('wikibox_db'); $output .= "\n\nQuery:".$dbr->lastQuery()."<br>\n\n"; $res = $dbr->select( 'wikibox_db.box', '*' );
This gives the following error on the special page I'm working on:
A database query syntax error has occurred. This may indicate a bug in the software. The last attempted database query was: (SQL query hidden) from within function "Database::select". MySQL returned error "1103: Incorrect table name 'wikibox_db.box' (jim-hus-computer.local)".
Not surprisingly, it works if I query a table in the mediawiki schema. Two questions: 1) Anyone know how to do this? 2) How do I set the wiki to not hide the sql query from me?
Thanks!
Jim ===================================== Jim Hu Associate Professor Dept. of Biochemistry and Biophysics 2128 TAMU Texas A&M Univ. College Station, TX 77843-2128 979-862-4054