2 Replies Latest reply on Jun 14, 2008 6:53 PM by (charles_J)

    Insert one table and update another???


      I was wondering if it is possible to insert a record in one table and update another another record in a different table.

      I have a form on my company's intranet that allows employees to add comments (ADDT Insert transaction) about new products we are going to bring to the market. At the same time, I would like to count the numbers of comments on a particular product and update that number for each product to see which product is getting the most reviews.

      Right now the products are on the homepage with the title and inserted date. From there, the employees click on the product get the info and make comments about it. The problem for me is that I would like to see the comment counts for each product on the home page, which means I would have to update the product table with the count.

      Sorry, I am using PHP as the technology.

      When I used to do it in ASP, I would insert the comment using the POST from the form, but add another hidden field with the count in it and I would use the "Command" Server behavior to retrieve the number and update the other table field.

      I noticed that dreamweaver removed the "Command" server behavior when using PHP.

      All help is greatly appreciated