Where to put code for second DB connection?
-
Hello!
In my theme I’m using a instance of “wpdb” to get some values from a second non-WP database. As this data is needed in my single.php theme file, I also put the code to connect to this DB in the single.php.
$phpbb_db = new wpdb('user','password','database_name','host');
Is this okay in terms of security or should the credentials be put somewhere else?
Thanks!
//Nils
Viewing 7 replies - 1 through 7 (of 7 total)
Viewing 7 replies - 1 through 7 (of 7 total)
- The topic ‘Where to put code for second DB connection?’ is closed to new replies.