WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] How can I close DB connection and open it again? (5 posts)

  1. tripbr
    Member
    Posted 4 years ago #

    Hello guys!

    I need to close the connection that WordPress have whit MySQL, execute some code and than open that conection again, is that possible?

    What I need is something like this:

    $wp->db_close(); // I need to knwo how to close it!!
    include('mycode.php');
    $wp->db_open(); // I need to know hot to open it!!

    I need this because my script need to connect to an external database and execute some queryes...

    Some one could help me?

  2. Shane G.
    Member
    Posted 4 years ago #

    Hi,

    Refer this article which may help to you:

    http://codex.wordpress.org/Function_Reference/wpdb_Class

    Thanks,

    Shane G.

  3. tripbr
    Member
    Posted 4 years ago #

    Thank you Shane G., but I have already readed it, and couldn't find the class that open and close the connection...

  4. tripbr
    Member
    Posted 4 years ago #

    No one?

  5. Mark / t31os
    Moderator
    Posted 4 years ago #

    I can't answer your question directly, but someone asked a related question on the hackers mailing list recently, perhaps this will shed a little light on the topic.

    http://lists.automattic.com/pipermail/wp-hackers/2010-March/030959.html

Topic Closed

This topic has been closed to new replies.

About this Topic