Title: Creating Junction Tables
Last modified: August 21, 2016

---

# Creating Junction Tables

 *  [IcarusFW](https://wordpress.org/support/users/icarusfw/)
 * (@icarusfw)
 * [13 years, 1 month ago](https://wordpress.org/support/topic/creating-junction-tables/)
 * Can anyone give me a quick breakdown of the process required to create a junction
   table ([https://en.wikipedia.org/wiki/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/](http://wordpress.org/extend/plugins/db-toolkit/)

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

 *  Plugin Author [David Cramer](https://wordpress.org/support/users/desertsnowman/)
 * (@desertsnowman)
 * [13 years, 1 month ago](https://wordpress.org/support/topic/creating-junction-tables/#post-3649414)
 * 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](https://wordpress.org/support/users/icarusfw/)
 * (@icarusfw)
 * [13 years, 1 month ago](https://wordpress.org/support/topic/creating-junction-tables/#post-3649439)
 * 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](https://wordpress.org/support/users/desertsnowman/)
 * (@desertsnowman)
 * [13 years ago](https://wordpress.org/support/topic/creating-junction-tables/#post-3649442)
 * 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](https://wordpress.org/support/users/icarusfw/)
 * (@icarusfw)
 * [13 years ago](https://wordpress.org/support/topic/creating-junction-tables/#post-3649454)
 * 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](https://wordpress.org/support/users/desertsnowman/)
 * (@desertsnowman)
 * [12 years, 12 months ago](https://wordpress.org/support/topic/creating-junction-tables/#post-3649459)
 * 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.

 * ![](https://s.w.org/plugins/geopattern-icon/db-toolkit_f3f3f3.svg)
 * [DB Toolkit](https://wordpress.org/plugins/db-toolkit/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/db-toolkit/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/db-toolkit/)
 * [Active Topics](https://wordpress.org/support/plugin/db-toolkit/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/db-toolkit/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/db-toolkit/reviews/)

## Tags

 * [MySQL](https://wordpress.org/support/topic-tag/mysql/)

 * 5 replies
 * 2 participants
 * Last reply from: [David Cramer](https://wordpress.org/support/users/desertsnowman/)
 * Last activity: [12 years, 12 months ago](https://wordpress.org/support/topic/creating-junction-tables/#post-3649459)
 * Status: not resolved