3 Replies Latest reply on Nov 18, 2008 8:20 AM by DdoubleU

    Error message displayed twice?

      I have an insert transaction with a linked check unique key. The check unique key consists of two fields id_obj and id_usr and I have set the custom error message. When in development mode the raw sql error is shown with my custom error beneath. In production mode my custom error is shown twice which to the end user obviously looks a bit odd. What is going on?

      Thanks

      - Andrew
        • 1. Re: Error message displayed twice?
          Level 1
          Andrew,

          In Dreamweaver code view for for that page, look for duplicate error message output. Something like:

          <?php
          echo $tNGs->getErrorMsg();
          ?>

          I would think something like that is the problem. You should be fine deleting or commenting out one of them.

          Shane
          • 2. Re: Error message displayed twice?
            DdoubleU
            Check unique key for multiple fields

            Hi Shane and Andrew

            Shane I used your suggestion and deleted the extra ErrorMsg, works fine.

            However, I have an additional problem dealing with Linked Transactions:

            When using a Check Unique Key SB (or this solution: http://www.interaktonline.com/Documentation/MXKollection/049b40_checkmultiunique.htm), which is registered to the slave table, all works perfectly (no inserts) except my master table performs an auto increment. That is to say, no data is inserted into either the master or the slave table but the master table will auto increment by one. For example, to begin, the master and slave table are at 60. After the failed inserts, the master table is at 61 and the slave table is at 60. Additionally, if a user presses the submit button without fixing the problem the master table will continue to auto increment.

            Why does the master table auto increment with no insertion? I do not want the master table to auto increment.

            Is this a priority issue? I tried changing all to be different and to fire in different orders without success.

            Take note, this only happens when the error is related to one applied to the slave table. If an error is generated from the master table, no auto increment will occur on any table.

            The tables are InnoDB, PHP Version 5.2.5, mysql Version 4.1.22. The master table is generated via User Registration Wizard; the salve table is via Insert Record Form Wizard.

            Thanks for your help.
            • 3. Re: Error message displayed twice?
              DdoubleU Level 1
              Has anyone seen a posting that addresses this issue? Is this a rollback issue?