• shadynicnack

    (@shadynicnack)


    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. So my question is… What is the best way to approach this situation? If it is coding, is there some tutorials that I can do this?

Viewing 1 replies (of 1 total)
  • Thread Starter shadynicnack

    (@shadynicnack)

    Did some research, and someone said that I can use this code in the functions.php to help access another database…

    $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?

Viewing 1 replies (of 1 total)
  • The topic ‘Set up Multiple Database’ is closed to new replies.