0

I simply have a quick question. I've found information related to this, but I'm not completely sure if this is possible. I know that I can create a second database connection using the wpdb object as follows:

$new_db = new wpdb(usr, pw, name, host);

However, is this compatible with an Oracle database that wouldn't have any of the Wordpress tables?

0

This should be possible. You can try

    function seconddb() {
         global $seconddb;
         $seconddb = new wpdb('Username','password','database name','localhost')
     }
     add_action('init','seconddb');

in your functions.php. Then you can fire a query to the new db like
$seconddb->get_row( "SELECT * FROM yourtable..." ); instead of $wpdb->get_row().

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.