amwd07 Posted December 3, 2007 Share Posted December 3, 2007 I really hope someone can help answer this question, I have tried everything and can't get this to work correctly. I have a ratings system working I now need to allow visitors to comment on each rating for example I have 6 ratings on the page and a sliding panel for each to post comment now this works fine until you submit a comment, the problem is the comment is inserted 6 times the reason for this is KT_Insert1 my submit button so what seems to be happening is all the forms are inserting, the submit button has to be different for each one KT_Insert<?php echo $row_rs3['rating_id']?> Now here comes the main problem Registertrigger won't allow this variable but insert will? maybe this can't be done with dreamweaver developer toolbox, if this is the case can someone please provide me with a simular altenative? // Make an insert transaction instance $ins_restaurant_comments = new tNG_insert($conn_connDW); $tNGs->addTransaction($ins_restaurant_comments); // Register triggers $ins_restaurant_comments->registerTrigger("STARTER", "Trigger_Default_Starter", 1, "POST", "KT_Insert{rs3.rating_id}"); $ins_restaurant_comments->registerTrigger("BEFORE", "Trigger_Default_FormValidation", 10, $formValidation); // Add columns $ins_restaurant_comments->setTable("restaurant_comments"); $ins_restaurant_comments->addColumn("name", "STRING_TYPE", "POST", "name"); $ins_restaurant_comments->addColumn("rating_id", "NUMERIC_TYPE", "VALUE", "{rs3.rating_id}"); $ins_restaurant_comments->addColumn("message", "STRING_TYPE", "POST", "message"); $ins_restaurant_comments->addColumn("created", "DATE_TYPE", "POST", "created", "{NOW_DT}"); $ins_restaurant_comments->addColumn("onhold", "NUMERIC_TYPE", "POST", "onhold", "1"); $ins_restaurant_comments->setPrimaryKey("comment_id", "NUMERIC_TYPE"); Quote Link to comment Share on other sites More sharing options...
amwd07 Posted December 3, 2007 Author Share Posted December 3, 2007 Maybe can someone suggest a alternative method ? Quote Link to comment Share on other sites More sharing options...
trq Posted December 3, 2007 Share Posted December 3, 2007 Showing the calling code really does not help. Maybe if we could see the registerTrigger() method. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.