Multiple Databases one one site
-
I’m a bit new and trying to get back into wordpress again. I have a wordpress website that needs to use the wordpress database that we first set up, and 2 external databases to obtain information and even at times to edit, and update information. Tried using external database but that is for one external database coming in. Want to use an external database to first set up login meaning when they enter username and password, it will find it through g h the external database. So my question is… What is the best way this situation? If it is coding, is there some tutorials that I can do this?
Did some research, and someone said that I can use this code in the functions.php to help access another database… Is it functions pho in main or themes?
$newdb = new wpdb($DB_USER, $DB_PASSWORD, $DB_NAME, $DB_HOST);
$newdb->show_errors();So I add this in the functions, but where do I put the second database’s info like host, username, password and etc? Where do I put the query code at?
Will this work to connect to an external databases?
Please Help!!!!
- You must be logged in to reply to this topic.