• I’ve got a couple tables that are populated by a back-end process that will be used only by the front-end WP site. They are pretty flat and no-nonsense. Currently I have these tables in their own mysql database, but I’m starting to see that WP has some built in mechanisms for querying its own database that might be a little more efficient/wordpressy.

    Option A:
    leave tables in separate db, create an additional database connection using standard php/mysql functions and query away.

    Option B:
    put tables in WB db, use the wpdb->xxx() functions to access them.

    would love some opinions!
    /wp newb

    thanks
    david

Viewing 3 replies - 1 through 3 (of 3 total)
  • I would recommend the same database approach, for two reasons. First, managing separate db connections can lead to some pain, especially within a single (or collective set of) PHP document(s). Second, backing it all up together is so much easier. :)

    I agree with Kafkaesqui for exactly the same reasons. Why would you even consider a different db?

    Thread Starter seizethedave

    (@seizethedave)

    I just didn’t know if using the wordpress database for your own tables was something commonly done.
    Initially I didn’t know about the wpdb class and it seemed like tossing stuff in the WordPress database would be kinda like messing with underlying implementation details.

    so yes, thanks. i’ll toss the stuff in the wp db.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Place extra tables in WP db, or separate db?’ is closed to new replies.