Tet banner

Custom Fields
Support MB Relationships Importing data from other than WordPress sources - relationships

  • Creator
  • #18587
    Resolved Donald

    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.

Viewing 1 replies (of 1 total)
  • Author
  • #18601
    Anh Tran

    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 1 replies (of 1 total)
  • You must be logged in to reply to this topic.