I've been trying to do: $mydb = new wpdb(SQL Database info);

Is there a way to check whether the database connection was established? It doesn't seem to be working since $mydb->get_results(query) doesn't return anything, but I get no errors so I don't know what is wrong.


As per the WordPress documentation you cannot connect to another DB using wpdb.


You best bet is to connect to the DB separately.

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