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().

0

Although this got asked some time ago, it came time to actually implement this and ran into issues (see: Connecting to external oracle database)

The answer is no. Oracle is not a mysql based database, thus wordpress will not be able to connect to it via wpdb.

For more information see the linked post.

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