Custom Fields
Re-Envisioned
Support MB Custom Table Custom Tables with Many to Many Relationship

  • Creator
    Topic
  • #20555
    Resolved IOANNISGIFTAKIS
    Participant

    Hi,

    I want to make a custom plugin and I would like to know how I could create Custom Tables that have Many-to-Many relationship.

    i.e.
    Quizs many-to-many Questions

    Br, John

Viewing 3 replies - 1 through 3 (of 3 total)
  • Author
    Replies
  • #20556
    Long Nguyen
    Moderator

    Hi John,

    A basic relationship is the many-to-many type and the relationship data is stored in a different table mb_relationships. For more information, please follow the documentation.

    #20557
    IOANNISGIFTAKIS
    Participant

    Hi!

    And this can be used for underlying functionality also right? I mean not only to use it in Admin area. I just want to have Custom Tables that have relationship many-to-many so I can do inner joins in my queries.
    i.e.
    https://share.getcloudapp.com/eDu154Kl

    Br,
    John

    #20561
    Long Nguyen
    Moderator

    Hi John,

    I’m following the same question in a topic from Facebook Group. The answer, in short, is impossible. The relationship only saves the data in the table mb_relationships. It helps you to connect posts, terms, and users while the main purpose of the extension Custom Table is to help you to save custom fields’ values to the custom table instead of the default WordPress meta table.

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