• I would like to know how to call another MySQL non-WP database created outside my existing WP instance.

    I’ve tried called the database in functions.php like this:


    function db() {
    $link = mysql_connect("X.SERVER.com","user","pw") or die("connection failed");
    mysql_select_db("thedatabase") or die("database not found"); }
    db();

    The above function does enable to call the other database, but it shuts down the WP database call: none of my posts show up.

    What is the proper way to call another database within WP?

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘How to call an additional database’ is closed to new replies.