• Can anyone give me a quick breakdown of the process required to create a junction table (https://en.wikipedia.org/wiki/Junction_table) with all the correct links to their respective parent tables in DB Toolkit? Normally this would be a trivial thing to create in MySQL, but I need DB Toolkit for this as I need to have an interface for data entry attached to it.

    I’ve got all the parent tables all set up with data, but the process to create a junction table is less than intuitive.

    Any help would be appreciated.

    http://wordpress.org/extend/plugins/db-toolkit/

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author David Cramer

    (@desertsnowman)

    Take a look at the join table fieldtype.

    Although that is only for table A to B, you can then make a virtual field of the fieldtype then set it to a Join again linking to table C.

    You can technically go on forever like this.
    Hope that made sense.

    Thread Starter IcarusFW

    (@icarusfw)

    Join Tables only works if there is only one field in a table set with the Checkbox option, which creates its own junction table. For example, when checking MySQL’s input, if there is only one Join Table field with Checkbox set, it inserts the correct corresponding ID (starting with 1 for the first entry) into the “from” field in the automatically created junction table.

    But if there are two or more fields with Join Table and Checkbox selected, then the plugin will always insert a “0” in the “from” field in its junction table, no matter which entry it is.

    Is there a fix for this?

    Plugin Author David Cramer

    (@desertsnowman)

    that would be with the multi join. you can do a single join in which you connect a-b directly. I cant remember off hand how it works as I dont have it installed at present. but will see if i can find something and try relay it here.

    Thread Starter IcarusFW

    (@icarusfw)

    Any news on the problem with tables that have a number of multijoin tables in them? I’m almost at the point where I’ll be digging through the plugin code to find the problem, but would like some help on this issue before I resort to that.

    Plugin Author David Cramer

    (@desertsnowman)

    I dont have a solution just yet. I’ll explore more and hopefully find something.
    Sorry I cant answer directly.

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘Creating Junction Tables’ is closed to new replies.