[ic] many-to-many update/Form Linking
Matt Johnston
matt at thebackpacker.com
Thu Nov 13 12:07:50 EST 2003
I am trying to use the table-editor tag to update a many-to-many table in
my database. Each product can be in multiple categories, so I created two
tables. The first table is just a list of all my categories. The second
table (called prodcat) references a product to a category. It only has two
columns, sku and catid. For example if product1 was in cat1 and cat2, then
the prodcat table would have two entries for this product:
sku, catid
----------
product1.sku, cat1.id
product1.sku, cat2.id
I have tried to figure out how to update this table through Interchange,
but I haven't found a solution. I tried using the "Form Linking" on the
item edit page, but ran into two problems. First, it that does not insert
new lines into the prodcat database. If I create a new item and try to
insert data through the Form Linking, the data is not inserted into the
database. Second, if I manually insert data into the database, the Form
Linking correctly shows the multiple lines from the prodcat table. However
when I enter the form, all lines in prodcat that reference product1.sku are
updated to have the same catid.
I'm sure someone has done something similar to this and knows the correct
method.
Matt Johnston
http://www.lattaoutdoors.com
http://www.thebackpacker.com
More information about the interchange-users
mailing list