• Resolved Nokaa

    (@nokaa)


    Hi,

    There’s a basic question : I presume it’s not possible but, I wonder if it was possible to get datas from another DB which is not a WP-DB, in order to use thoses datas in a WP template ? My company use a back-office which will be difficult to migrate (I don’t realy now why they choosed WP, I know that custom post-type and WP taxonomies are not the best solutions)…

    Thank you in advance,

    Nox

Viewing 2 replies - 1 through 2 (of 2 total)
  • Moderator bcworkz

    (@bcworkz)

    Hi Nox — You presumed wrong ??
    Instantiate your own new object from the wpdb class, passing the appropriate data needed to make a new DB connection. Your object can then use the same methods to interact with the DB as the global $wpdb does for the WP DB. Naturally some of the properties like $wpdb->posts will be useless, but I believe all the methods do not require a WP DB to work.

    Thread Starter Nokaa

    (@nokaa)

    Thank you, I’ll make some research on it ??

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Get data from non-WP DB ?’ is closed to new replies.