WordPress.org

Ready to get started?Download WordPress

Forums

Write data on another Database (2 posts)

  1. _OMEGA_
    Member
    Posted 4 years ago #

    Hi all, I have a little problem.
    I need to write data on another Database, not the standard WP one, just to do not make dull the standard Database.
    I've written all the code and everything works good (I can create a table and write in it, but it's unfortunatelly in the standard WP database), but when I try to modify my source to tell to my plugin to write in another database and when I try to use this code:

    $wpdb_otherdb->query( $wpdb_otherdb->prepare( "
    	INSERT INTO MyTable
    	( id, id_name, id_title )
    	VALUES ( %d, %s, %s )",
            'NULL', $id_name, $id_title ) );

    I have this error:

    Fatal error: Call to a member function query() on a non-object

    Anyone can help me about this?

  2. Hexa6oN
    Member
    Posted 4 years ago #

    I have the same problem. :(

    Been looking for hours for a solution. Have you found one, by chance?

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.