Importing data from other than WordPress sources - relationships

Support MB Relationships Importing data from other than WordPress sources - relationshipsResolved

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #18587
    DonaldDonald
    Participant

    I need the advice of someone advanced. I will import data from sources other than WordPress into custom posts with custom fields created from metabox. How to prepare MB relationship data? Has anyone already performed such an operation to import data and automatically connect with the relationships of individual posts.

    #18601
    Anh TranAnh Tran
    Keymaster

    Hi Donald,

    You might want to take a look at the data structure of mb_relationships table, which is quite simple and easy to understand. It has 5 columns:

    • ID: connection ID (auto increment)
    • from: the ID of the "from" object
    • to: the ID of the "to" object
    • type: the connection type (ID)
    • order_from: the order for the "from" side
    • order_to: the order for the "to" side

    And based on that, you can prepare the data accordingly.

    When inserting into the database manually, you can omit the order_from and order_to for simplicity.

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.