4 Replies Latest reply on Dec 18, 2007 7:05 PM by (chris_nield)

    multiple many to many - inserting data

      Hello, I am building an application like the student to courses one. Mine is a motocross site. I want to insert new series, new rounds into those series, riders in single or multiple classes into those rounds & points into those classes & rounds of the rider. My data base set up is > rider-table with rider name & rider id , class-table with class name & class id, points-table with points name & point id, round-table with round name & round id, series-table with series name & series id then I have a M2M table with all the above corrosponding ids. Every things fine except I cant insert the rider into another round, series etc.. Is this because of my database setup. Do I need to have more M2M tables like riders to class with those 2 id's then riders to rounds & those 2 id's & so on, if so could some explain the database setup. I've been at this for 2 weeks & my brain's a mess. Thanks for any help Chris
        • 1. Re: multiple many to many - inserting data
          Günter Schenk Level 4
          Hi Chris,

          ------
          I've been at this for 2 weeks & my brain's a mess
          ------

          I´m with you now -- my 3 brain cells immediately shut down when reading your post :-)

          However I *think* I know what you´re after and how to resolve this with just one "riders" table. You might want to consider setting up additional varchar columns (class, points, round, series) in your riders table, and in here store the selected e.g. class table ID´s (not the "names") as "comma separated" values.

          ADDT comes with a pretty cool Form Control named "Comma Separated Checkboxes", which ...

          a) basically requires an extra query like "SELECT id, name FROM class_table"

          b) needs a simple text input field related to the rider table´s "class" column, and

          c) will render this input field as series of checkboxes -- the stored value is the class table´s "id", and the displayed name is the class table´s "name"

          Cheers,
          Günter Schenk
          Adobe Community Expert, Dreamweaver
          • 2. Re: multiple many to many - inserting data
            Level 1
            Hi Gunter I will try what you have suggested. I have also posted this problem in the kollection forum & uploaded a screen shot of the data base set up & the form (but not sure how to see it there) I can send it to you if you are willing to have a look for me. Here is the link http://www.interaktonline.com/Products/Bundles/MXKollection/Product-Forum/Details/141450/ multiple+many+to+many+-+inserting+data.html if not i thank you for your asistance anyway. Thanks Chris
            • 3. Re: multiple many to many - inserting data
              Günter Schenk Level 4
              Hi Chris,

              yeah I have seen that other post already -- attachments posted over there can´unfortunately only be seen by the Adobe Romania staff, so the recommended procedure is to rather post screenshots and code (as .txt files) on your host and provide links to that.

              Cheers,
              Günter Schenk
              Adobe Community Expert, Dreamweaver
              • 4. Re: multiple many to many - inserting data
                Level 1
                Hi again Gunter here's the link to the screen shot http://fellsfarmmx.co.nz/M2MScreenShot.html I have added id's to the rider table & I'm mucking round with that like you said but still no luck. Thanks Chris