Manage Relational Tables: Relational Table Not Updating
OK, after burning up way too many hours on this, I give up, I cannot get the MRT behavior to work. I'm trying to update the itemcolors table, which is a lookup table for my product options, linking ItemID to ColorID. I added the product options using the Insert Multiple Records behavior, that worked fine. Now I need to offer the ability to update that table, so after updating all other fields (product name, description, image, etc.,) the ItemID is passed in the URL to the item-update-options.php page.
STEPS. I created a checkbox list, bound the variables from the colors table, and applied a repeat region driven by a recordset from the colors table. I then applied the MRT behavior using the ItemID from the URL ($_GET['ItemID'] as the key value.
RESULTS. The checkbox list displays correctly, all the options are displayed and only the ones in the lookup table are checked. However, if I check or uncheck any options and submit, the page reloads (no redirect specified) and the original options are restored, i.e., the lookup table is not updated. I removed everything and started from scratch multiple times, I don't know what I'm doing wrong.
BTW, I've used the MRT before on another site and after a brief struggle I wrestled into submission. I've compared the code and the only differences I can see are that I previously used a session variable for the key value in step 2 of the wizard; and there is no repeat region outside of the DA repeat selection behavior, whereas in my current page DA left my repeat region and inserted it's repeat selection inside of it.
[Code removed for brevity.]