Ask a Question related to Dreamweaver AppDev, Design and Development.

  1. #1

    Default FAO namcy Gill

    Hi Nancy

    I've posted my database structure. Hope you can help

    re: progress post



    Andy Guest

  2. #2

    Default Re: FAO namcy Gill

    Okay .. I assume you will have some method for having created a session
    variable for the userID on a prior page. On the form page .. create a
    Session object in the Data Bindings window and use the same name as the
    session variable you created so it will be available for the insert.

    Now in creating the form, you will need a recordset to populate the dropdown
    menu.

    SELECT ProductID, Product_title
    FROM Products

    and use the form list/menu item where you have the Product_title as the
    lable and ProductID as the value for the dropdown items. That will allow
    the user to select an item by its name in the dropdown, but insert the
    ProductID into your table. The rest of the items going into the Price table
    (price appears to be all you have) would be inserted via a text box set to
    price. Create a hidden variable within the insert form called user (or
    whatever) and the value of the variable will be the session object that is
    now available in the data bindings window.

    Just so we're clear, this all means that your form is going to have a
    list/menu item that drops down the names of the products, a text field where
    the user selects the price he wants to charge and a submit botton. Submit
    it to a success page or whatever you like.

    In the insert record behavior, you will bind the dropdown value to
    ProductID, the session variable to UserID, the Price to whatever price you
    had in the text box and the Price ID will be autocreated when you insert.

    Batta .. bing.


    --
    Nancy Gill
    Team Macromedia Volunteer for Dreamweaver MX/UltraDev
    [url]http://www.macromedia.com/go/team/[/url]
    Co-Author: Dreamweaver MX: Instant Troubleshooter (August, 2003)
    Technical Editor: DMX 2004: The Complete Reference, DMX 2004: A Beginner's
    Guide, Mastering Macromedia Contribute
    Technical Reviewer: Dynamic Dreamweaver MX/DMX: Advanced PHP Web Development



    Nancy Gill Guest

  3. #3

    Default Re: FAO namcy Gill

    Hi Nancy
    Thank you for taking the time to help!

    This method would work fine, the problem is that i need to assign all of the
    products to the user in one go.
    There are over 500 products that the user need assigning to, so using the
    dropdown menu method, i would have to select each individual product from
    the lsit and then insert it.

    Would there be a way of having a 'select all' option in the drop down?

    Thanks again
    Andy


    "Nancy Gill" <nancy@webwish.com> wrote in message
    news:d4r4ee$4n6$1@forums.macromedia.com...
    > Okay .. I assume you will have some method for having created a session
    > variable for the userID on a prior page. On the form page .. create a
    > Session object in the Data Bindings window and use the same name as the
    > session variable you created so it will be available for the insert.
    >
    > Now in creating the form, you will need a recordset to populate the
    > dropdown
    > menu.
    >
    > SELECT ProductID, Product_title
    > FROM Products
    >
    > and use the form list/menu item where you have the Product_title as the
    > lable and ProductID as the value for the dropdown items. That will allow
    > the user to select an item by its name in the dropdown, but insert the
    > ProductID into your table. The rest of the items going into the Price
    > table
    > (price appears to be all you have) would be inserted via a text box set to
    > price. Create a hidden variable within the insert form called user (or
    > whatever) and the value of the variable will be the session object that is
    > now available in the data bindings window.
    >
    > Just so we're clear, this all means that your form is going to have a
    > list/menu item that drops down the names of the products, a text field
    > where
    > the user selects the price he wants to charge and a submit botton. Submit
    > it to a success page or whatever you like.
    >
    > In the insert record behavior, you will bind the dropdown value to
    > ProductID, the session variable to UserID, the Price to whatever price you
    > had in the text box and the Price ID will be autocreated when you insert.
    >
    > Batta .. bing.
    >
    >
    > --
    > Nancy Gill
    > Team Macromedia Volunteer for Dreamweaver MX/UltraDev
    > [url]http://www.macromedia.com/go/team/[/url]
    > Co-Author: Dreamweaver MX: Instant Troubleshooter (August, 2003)
    > Technical Editor: DMX 2004: The Complete Reference, DMX 2004: A
    > Beginner's
    > Guide, Mastering Macromedia Contribute
    > Technical Reviewer: Dynamic Dreamweaver MX/DMX: Advanced PHP Web
    > Development
    >
    >
    >
    >


    Andy Guest

  4. #4

    Default Re: FAO namcy Gill

    something like Select * FROM Products WHERE userid = MMcolParam and then
    set MMcolParam to match the session variable? Sure .. but that would
    require the userID to be associated with the products table. You have it
    associated with the prices table .. so you could do a join on ProductID (I
    think that was common to both tables .. it's been a couple of hectic days
    since I looked at this. :)


    --
    Nancy Gill
    Team Macromedia Volunteer for Dreamweaver MX/UltraDev
    [url]http://www.macromedia.com/go/team/[/url]
    Co-Author: Dreamweaver MX: Instant Troubleshooter (August, 2003)
    Technical Editor: DMX 2004: The Complete Reference, DMX 2004: A Beginner's
    Guide, Mastering Macromedia Contribute
    Technical Reviewer: Dynamic Dreamweaver MX/DMX: Advanced PHP Web Development

    "Andy" <AndyjhughesNOSPAM@ntlworld.com> wrote in message
    news:d4tfbv$fnu$1@forums.macromedia.com...
    > Hi Nancy
    > Thank you for taking the time to help!
    >
    > This method would work fine, the problem is that i need to assign all of
    the
    > products to the user in one go.
    > There are over 500 products that the user need assigning to, so using the
    > dropdown menu method, i would have to select each individual product from
    > the lsit and then insert it.
    >
    > Would there be a way of having a 'select all' option in the drop down?
    >
    > Thanks again
    > Andy
    >
    >
    > "Nancy Gill" <nancy@webwish.com> wrote in message
    > news:d4r4ee$4n6$1@forums.macromedia.com...
    > > Okay .. I assume you will have some method for having created a session
    > > variable for the userID on a prior page. On the form page .. create a
    > > Session object in the Data Bindings window and use the same name as the
    > > session variable you created so it will be available for the insert.
    > >
    > > Now in creating the form, you will need a recordset to populate the
    > > dropdown
    > > menu.
    > >
    > > SELECT ProductID, Product_title
    > > FROM Products
    > >
    > > and use the form list/menu item where you have the Product_title as the
    > > lable and ProductID as the value for the dropdown items. That will
    allow
    > > the user to select an item by its name in the dropdown, but insert the
    > > ProductID into your table. The rest of the items going into the Price
    > > table
    > > (price appears to be all you have) would be inserted via a text box set
    to
    > > price. Create a hidden variable within the insert form called user (or
    > > whatever) and the value of the variable will be the session object that
    is
    > > now available in the data bindings window.
    > >
    > > Just so we're clear, this all means that your form is going to have a
    > > list/menu item that drops down the names of the products, a text field
    > > where
    > > the user selects the price he wants to charge and a submit botton.
    Submit
    > > it to a success page or whatever you like.
    > >
    > > In the insert record behavior, you will bind the dropdown value to
    > > ProductID, the session variable to UserID, the Price to whatever price
    you
    > > had in the text box and the Price ID will be autocreated when you
    insert.
    > >
    > > Batta .. bing.
    > >
    > >
    > > --
    > > Nancy Gill
    > > Team Macromedia Volunteer for Dreamweaver MX/UltraDev
    > > [url]http://www.macromedia.com/go/team/[/url]
    > > Co-Author: Dreamweaver MX: Instant Troubleshooter (August, 2003)
    > > Technical Editor: DMX 2004: The Complete Reference, DMX 2004: A
    > > Beginner's
    > > Guide, Mastering Macromedia Contribute
    > > Technical Reviewer: Dynamic Dreamweaver MX/DMX: Advanced PHP Web
    > > Development
    > >
    > >
    > >
    > >
    >
    >
    >

    Nancy Gill Guest

  5. #5

    Default Re: FAO namcy Gill

    Nancy

    What he is trying to do is create a new record for each product in the
    prices table for the new client that he has added. He needs to read the
    recordset of products and loop an insert statement in it. I sent him some
    code but he was not able to use it.



    --
    Regards

    Paul Whitham
    Macromedia Certified Professional for Dreamweaver MX2004
    Valleybiz Internet Design
    [url]www.valleybiz.net[/url]

    Team Macromedia Volunteer for Ultradev/Dreamweaver MX
    [url]www.macromedia.com/support/forums/team_macromedia[/url]

    "Nancy Gill" <nancy@webwish.com> wrote in message
    news:d53r8h$p51$1@forums.macromedia.com...
    > something like Select * FROM Products WHERE userid = MMcolParam and then
    > set MMcolParam to match the session variable? Sure .. but that would
    > require the userID to be associated with the products table. You have it
    > associated with the prices table .. so you could do a join on ProductID (I
    > think that was common to both tables .. it's been a couple of hectic days
    > since I looked at this. :)
    >
    >
    > --
    > Nancy Gill
    > Team Macromedia Volunteer for Dreamweaver MX/UltraDev
    > [url]http://www.macromedia.com/go/team/[/url]
    > Co-Author: Dreamweaver MX: Instant Troubleshooter (August, 2003)
    > Technical Editor: DMX 2004: The Complete Reference, DMX 2004: A
    Beginner's
    > Guide, Mastering Macromedia Contribute
    > Technical Reviewer: Dynamic Dreamweaver MX/DMX: Advanced PHP Web
    Development
    >
    > "Andy" <AndyjhughesNOSPAM@ntlworld.com> wrote in message
    > news:d4tfbv$fnu$1@forums.macromedia.com...
    > > Hi Nancy
    > > Thank you for taking the time to help!
    > >
    > > This method would work fine, the problem is that i need to assign all of
    > the
    > > products to the user in one go.
    > > There are over 500 products that the user need assigning to, so using
    the
    > > dropdown menu method, i would have to select each individual product
    from
    > > the lsit and then insert it.
    > >
    > > Would there be a way of having a 'select all' option in the drop down?
    > >
    > > Thanks again
    > > Andy
    > >
    > >
    > > "Nancy Gill" <nancy@webwish.com> wrote in message
    > > news:d4r4ee$4n6$1@forums.macromedia.com...
    > > > Okay .. I assume you will have some method for having created a
    session
    > > > variable for the userID on a prior page. On the form page .. create a
    > > > Session object in the Data Bindings window and use the same name as
    the
    > > > session variable you created so it will be available for the insert.
    > > >
    > > > Now in creating the form, you will need a recordset to populate the
    > > > dropdown
    > > > menu.
    > > >
    > > > SELECT ProductID, Product_title
    > > > FROM Products
    > > >
    > > > and use the form list/menu item where you have the Product_title as
    the
    > > > lable and ProductID as the value for the dropdown items. That will
    > allow
    > > > the user to select an item by its name in the dropdown, but insert the
    > > > ProductID into your table. The rest of the items going into the Price
    > > > table
    > > > (price appears to be all you have) would be inserted via a text box
    set
    > to
    > > > price. Create a hidden variable within the insert form called user
    (or
    > > > whatever) and the value of the variable will be the session object
    that
    > is
    > > > now available in the data bindings window.
    > > >
    > > > Just so we're clear, this all means that your form is going to have a
    > > > list/menu item that drops down the names of the products, a text field
    > > > where
    > > > the user selects the price he wants to charge and a submit botton.
    > Submit
    > > > it to a success page or whatever you like.
    > > >
    > > > In the insert record behavior, you will bind the dropdown value to
    > > > ProductID, the session variable to UserID, the Price to whatever price
    > you
    > > > had in the text box and the Price ID will be autocreated when you
    > insert.
    > > >
    > > > Batta .. bing.
    > > >
    > > >
    > > > --
    > > > Nancy Gill
    > > > Team Macromedia Volunteer for Dreamweaver MX/UltraDev
    > > > [url]http://www.macromedia.com/go/team/[/url]
    > > > Co-Author: Dreamweaver MX: Instant Troubleshooter (August, 2003)
    > > > Technical Editor: DMX 2004: The Complete Reference, DMX 2004: A
    > > > Beginner's
    > > > Guide, Mastering Macromedia Contribute
    > > > Technical Reviewer: Dynamic Dreamweaver MX/DMX: Advanced PHP Web
    > > > Development
    > > >
    > > >
    > > >
    > > >
    > >
    > >
    > >
    >
    >

    Paul Whitham TMM Guest

  6. #6

    Default Re: FAO namcy Gill

    Hi Nancy - Paul
    I've now got Paul's code to partly work.
    After inserting the new retailer the page redirects to the page with Paul's
    code in it.
    One product is also inserted but not all of them.

    Looks like it's nearly there, but why is it only inserting one product for
    the new retailer?

    Thanks
    Andy ( I know I'm a pain)





    "Paul Whitham TMM" <paul@valleybiz.net> wrote in message
    news:d544fe$62m$1@forums.macromedia.com...
    > Nancy
    >
    > What he is trying to do is create a new record for each product in the
    > prices table for the new client that he has added. He needs to read the
    > recordset of products and loop an insert statement in it. I sent him some
    > code but he was not able to use it.
    >
    >
    >
    > --
    > Regards
    >
    > Paul Whitham
    > Macromedia Certified Professional for Dreamweaver MX2004
    > Valleybiz Internet Design
    > [url]www.valleybiz.net[/url]
    >
    > Team Macromedia Volunteer for Ultradev/Dreamweaver MX
    > [url]www.macromedia.com/support/forums/team_macromedia[/url]
    >
    > "Nancy Gill" <nancy@webwish.com> wrote in message
    > news:d53r8h$p51$1@forums.macromedia.com...
    >> something like Select * FROM Products WHERE userid = MMcolParam and then
    >> set MMcolParam to match the session variable? Sure .. but that would
    >> require the userID to be associated with the products table. You have it
    >> associated with the prices table .. so you could do a join on ProductID
    >> (I
    >> think that was common to both tables .. it's been a couple of hectic days
    >> since I looked at this. :)
    >>
    >>
    >> --
    >> Nancy Gill
    >> Team Macromedia Volunteer for Dreamweaver MX/UltraDev
    >> [url]http://www.macromedia.com/go/team/[/url]
    >> Co-Author: Dreamweaver MX: Instant Troubleshooter (August, 2003)
    >> Technical Editor: DMX 2004: The Complete Reference, DMX 2004: A
    > Beginner's
    >> Guide, Mastering Macromedia Contribute
    >> Technical Reviewer: Dynamic Dreamweaver MX/DMX: Advanced PHP Web
    > Development
    >>
    >> "Andy" <AndyjhughesNOSPAM@ntlworld.com> wrote in message
    >> news:d4tfbv$fnu$1@forums.macromedia.com...
    >> > Hi Nancy
    >> > Thank you for taking the time to help!
    >> >
    >> > This method would work fine, the problem is that i need to assign all
    >> > of
    >> the
    >> > products to the user in one go.
    >> > There are over 500 products that the user need assigning to, so using
    > the
    >> > dropdown menu method, i would have to select each individual product
    > from
    >> > the lsit and then insert it.
    >> >
    >> > Would there be a way of having a 'select all' option in the drop down?
    >> >
    >> > Thanks again
    >> > Andy
    >> >
    >> >
    >> > "Nancy Gill" <nancy@webwish.com> wrote in message
    >> > news:d4r4ee$4n6$1@forums.macromedia.com...
    >> > > Okay .. I assume you will have some method for having created a
    > session
    >> > > variable for the userID on a prior page. On the form page .. create
    >> > > a
    >> > > Session object in the Data Bindings window and use the same name as
    > the
    >> > > session variable you created so it will be available for the insert.
    >> > >
    >> > > Now in creating the form, you will need a recordset to populate the
    >> > > dropdown
    >> > > menu.
    >> > >
    >> > > SELECT ProductID, Product_title
    >> > > FROM Products
    >> > >
    >> > > and use the form list/menu item where you have the Product_title as
    > the
    >> > > lable and ProductID as the value for the dropdown items. That will
    >> allow
    >> > > the user to select an item by its name in the dropdown, but insert
    >> > > the
    >> > > ProductID into your table. The rest of the items going into the
    >> > > Price
    >> > > table
    >> > > (price appears to be all you have) would be inserted via a text box
    > set
    >> to
    >> > > price. Create a hidden variable within the insert form called user
    > (or
    >> > > whatever) and the value of the variable will be the session object
    > that
    >> is
    >> > > now available in the data bindings window.
    >> > >
    >> > > Just so we're clear, this all means that your form is going to have a
    >> > > list/menu item that drops down the names of the products, a text
    >> > > field
    >> > > where
    >> > > the user selects the price he wants to charge and a submit botton.
    >> Submit
    >> > > it to a success page or whatever you like.
    >> > >
    >> > > In the insert record behavior, you will bind the dropdown value to
    >> > > ProductID, the session variable to UserID, the Price to whatever
    >> > > price
    >> you
    >> > > had in the text box and the Price ID will be autocreated when you
    >> insert.
    >> > >
    >> > > Batta .. bing.
    >> > >
    >> > >
    >> > > --
    >> > > Nancy Gill
    >> > > Team Macromedia Volunteer for Dreamweaver MX/UltraDev
    >> > > [url]http://www.macromedia.com/go/team/[/url]
    >> > > Co-Author: Dreamweaver MX: Instant Troubleshooter (August, 2003)
    >> > > Technical Editor: DMX 2004: The Complete Reference, DMX 2004: A
    >> > > Beginner's
    >> > > Guide, Mastering Macromedia Contribute
    >> > > Technical Reviewer: Dynamic Dreamweaver MX/DMX: Advanced PHP Web
    >> > > Development
    >> > >
    >> > >
    >> > >
    >> > >
    >> >
    >> >
    >> >
    >>
    >>
    >
    >
    >


    Andy Guest

  7. #7

    Default Re: FAO namcy Gill

    ohhh .. I see.

    "Paul Whitham TMM" <paul@valleybiz.net> wrote in message
    news:d544fe$62m$1@forums.macromedia.com...
    > Nancy
    >
    > What he is trying to do is create a new record for each product in the
    > prices table for the new client that he has added. He needs to read the
    > recordset of products and loop an insert statement in it. I sent him some
    > code but he was not able to use it.
    >
    >
    >
    > --
    > Regards
    >
    > Paul Whitham
    > Macromedia Certified Professional for Dreamweaver MX2004
    > Valleybiz Internet Design
    > [url]www.valleybiz.net[/url]
    >
    > Team Macromedia Volunteer for Ultradev/Dreamweaver MX
    > [url]www.macromedia.com/support/forums/team_macromedia[/url]
    >
    > "Nancy Gill" <nancy@webwish.com> wrote in message
    > news:d53r8h$p51$1@forums.macromedia.com...
    > > something like Select * FROM Products WHERE userid = MMcolParam and
    then
    > > set MMcolParam to match the session variable? Sure .. but that would
    > > require the userID to be associated with the products table. You have
    it
    > > associated with the prices table .. so you could do a join on ProductID
    (I
    > > think that was common to both tables .. it's been a couple of hectic
    days
    > > since I looked at this. :)
    > >
    > >
    > > --
    > > Nancy Gill
    > > Team Macromedia Volunteer for Dreamweaver MX/UltraDev
    > > [url]http://www.macromedia.com/go/team/[/url]
    > > Co-Author: Dreamweaver MX: Instant Troubleshooter (August, 2003)
    > > Technical Editor: DMX 2004: The Complete Reference, DMX 2004: A
    > Beginner's
    > > Guide, Mastering Macromedia Contribute
    > > Technical Reviewer: Dynamic Dreamweaver MX/DMX: Advanced PHP Web
    > Development
    > >
    > > "Andy" <AndyjhughesNOSPAM@ntlworld.com> wrote in message
    > > news:d4tfbv$fnu$1@forums.macromedia.com...
    > > > Hi Nancy
    > > > Thank you for taking the time to help!
    > > >
    > > > This method would work fine, the problem is that i need to assign all
    of
    > > the
    > > > products to the user in one go.
    > > > There are over 500 products that the user need assigning to, so using
    > the
    > > > dropdown menu method, i would have to select each individual product
    > from
    > > > the lsit and then insert it.
    > > >
    > > > Would there be a way of having a 'select all' option in the drop down?
    > > >
    > > > Thanks again
    > > > Andy
    > > >
    > > >
    > > > "Nancy Gill" <nancy@webwish.com> wrote in message
    > > > news:d4r4ee$4n6$1@forums.macromedia.com...
    > > > > Okay .. I assume you will have some method for having created a
    > session
    > > > > variable for the userID on a prior page. On the form page .. create
    a
    > > > > Session object in the Data Bindings window and use the same name as
    > the
    > > > > session variable you created so it will be available for the insert.
    > > > >
    > > > > Now in creating the form, you will need a recordset to populate the
    > > > > dropdown
    > > > > menu.
    > > > >
    > > > > SELECT ProductID, Product_title
    > > > > FROM Products
    > > > >
    > > > > and use the form list/menu item where you have the Product_title as
    > the
    > > > > lable and ProductID as the value for the dropdown items. That will
    > > allow
    > > > > the user to select an item by its name in the dropdown, but insert
    the
    > > > > ProductID into your table. The rest of the items going into the
    Price
    > > > > table
    > > > > (price appears to be all you have) would be inserted via a text box
    > set
    > > to
    > > > > price. Create a hidden variable within the insert form called user
    > (or
    > > > > whatever) and the value of the variable will be the session object
    > that
    > > is
    > > > > now available in the data bindings window.
    > > > >
    > > > > Just so we're clear, this all means that your form is going to have
    a
    > > > > list/menu item that drops down the names of the products, a text
    field
    > > > > where
    > > > > the user selects the price he wants to charge and a submit botton.
    > > Submit
    > > > > it to a success page or whatever you like.
    > > > >
    > > > > In the insert record behavior, you will bind the dropdown value to
    > > > > ProductID, the session variable to UserID, the Price to whatever
    price
    > > you
    > > > > had in the text box and the Price ID will be autocreated when you
    > > insert.
    > > > >
    > > > > Batta .. bing.
    > > > >
    > > > >
    > > > > --
    > > > > Nancy Gill
    > > > > Team Macromedia Volunteer for Dreamweaver MX/UltraDev
    > > > > [url]http://www.macromedia.com/go/team/[/url]
    > > > > Co-Author: Dreamweaver MX: Instant Troubleshooter (August, 2003)
    > > > > Technical Editor: DMX 2004: The Complete Reference, DMX 2004: A
    > > > > Beginner's
    > > > > Guide, Mastering Macromedia Contribute
    > > > > Technical Reviewer: Dynamic Dreamweaver MX/DMX: Advanced PHP Web
    > > > > Development
    > > > >
    > > > >
    > > > >
    > > > >
    > > >
    > > >
    > > >
    > >
    > >
    >
    >

    Nancy Gill Guest

  8. #8

    Default Re: FAO namcy Gill

    > Looks like it's nearly there, but why is it only inserting one product for
    > the new retailer?

    You didn't loop it? i.e. repeat region?

    Nancy


    Nancy Gill Guest

  9. #9

    Default Re: FAO namcy Gill

    Post me the code as it is now, because as Nancy has says it is not looping
    the recordset.

    --
    Regards

    Paul Whitham
    Macromedia Certified Professional for Dreamweaver MX2004
    Valleybiz Internet Design
    [url]www.valleybiz.net[/url]

    Team Macromedia Volunteer for Ultradev/Dreamweaver MX
    [url]www.macromedia.com/support/forums/team_macromedia[/url]

    "Andy" <AndyjhughesNOSPAM@ntlworld.com> wrote in message
    news:d57i8r$1em$1@forums.macromedia.com...
    > Hi Nancy - Paul
    > I've now got Paul's code to partly work.
    > After inserting the new retailer the page redirects to the page with
    Paul's
    > code in it.
    > One product is also inserted but not all of them.
    >
    > Looks like it's nearly there, but why is it only inserting one product for
    > the new retailer?
    >
    > Thanks
    > Andy ( I know I'm a pain)
    >
    >
    >
    >
    >
    > "Paul Whitham TMM" <paul@valleybiz.net> wrote in message
    > news:d544fe$62m$1@forums.macromedia.com...
    > > Nancy
    > >
    > > What he is trying to do is create a new record for each product in the
    > > prices table for the new client that he has added. He needs to read the
    > > recordset of products and loop an insert statement in it. I sent him
    some
    > > code but he was not able to use it.
    > >
    > >
    > >
    > > --
    > > Regards
    > >
    > > Paul Whitham
    > > Macromedia Certified Professional for Dreamweaver MX2004
    > > Valleybiz Internet Design
    > > [url]www.valleybiz.net[/url]
    > >
    > > Team Macromedia Volunteer for Ultradev/Dreamweaver MX
    > > [url]www.macromedia.com/support/forums/team_macromedia[/url]
    > >
    > > "Nancy Gill" <nancy@webwish.com> wrote in message
    > > news:d53r8h$p51$1@forums.macromedia.com...
    > >> something like Select * FROM Products WHERE userid = MMcolParam and
    then
    > >> set MMcolParam to match the session variable? Sure .. but that would
    > >> require the userID to be associated with the products table. You have
    it
    > >> associated with the prices table .. so you could do a join on ProductID
    > >> (I
    > >> think that was common to both tables .. it's been a couple of hectic
    days
    > >> since I looked at this. :)
    > >>
    > >>
    > >> --
    > >> Nancy Gill
    > >> Team Macromedia Volunteer for Dreamweaver MX/UltraDev
    > >> [url]http://www.macromedia.com/go/team/[/url]
    > >> Co-Author: Dreamweaver MX: Instant Troubleshooter (August, 2003)
    > >> Technical Editor: DMX 2004: The Complete Reference, DMX 2004: A
    > > Beginner's
    > >> Guide, Mastering Macromedia Contribute
    > >> Technical Reviewer: Dynamic Dreamweaver MX/DMX: Advanced PHP Web
    > > Development
    > >>
    > >> "Andy" <AndyjhughesNOSPAM@ntlworld.com> wrote in message
    > >> news:d4tfbv$fnu$1@forums.macromedia.com...
    > >> > Hi Nancy
    > >> > Thank you for taking the time to help!
    > >> >
    > >> > This method would work fine, the problem is that i need to assign all
    > >> > of
    > >> the
    > >> > products to the user in one go.
    > >> > There are over 500 products that the user need assigning to, so using
    > > the
    > >> > dropdown menu method, i would have to select each individual product
    > > from
    > >> > the lsit and then insert it.
    > >> >
    > >> > Would there be a way of having a 'select all' option in the drop
    down?
    > >> >
    > >> > Thanks again
    > >> > Andy
    > >> >
    > >> >
    > >> > "Nancy Gill" <nancy@webwish.com> wrote in message
    > >> > news:d4r4ee$4n6$1@forums.macromedia.com...
    > >> > > Okay .. I assume you will have some method for having created a
    > > session
    > >> > > variable for the userID on a prior page. On the form page ..
    create
    > >> > > a
    > >> > > Session object in the Data Bindings window and use the same name as
    > > the
    > >> > > session variable you created so it will be available for the
    insert.
    > >> > >
    > >> > > Now in creating the form, you will need a recordset to populate the
    > >> > > dropdown
    > >> > > menu.
    > >> > >
    > >> > > SELECT ProductID, Product_title
    > >> > > FROM Products
    > >> > >
    > >> > > and use the form list/menu item where you have the Product_title as
    > > the
    > >> > > lable and ProductID as the value for the dropdown items. That will
    > >> allow
    > >> > > the user to select an item by its name in the dropdown, but insert
    > >> > > the
    > >> > > ProductID into your table. The rest of the items going into the
    > >> > > Price
    > >> > > table
    > >> > > (price appears to be all you have) would be inserted via a text box
    > > set
    > >> to
    > >> > > price. Create a hidden variable within the insert form called user
    > > (or
    > >> > > whatever) and the value of the variable will be the session object
    > > that
    > >> is
    > >> > > now available in the data bindings window.
    > >> > >
    > >> > > Just so we're clear, this all means that your form is going to have
    a
    > >> > > list/menu item that drops down the names of the products, a text
    > >> > > field
    > >> > > where
    > >> > > the user selects the price he wants to charge and a submit botton.
    > >> Submit
    > >> > > it to a success page or whatever you like.
    > >> > >
    > >> > > In the insert record behavior, you will bind the dropdown value to
    > >> > > ProductID, the session variable to UserID, the Price to whatever
    > >> > > price
    > >> you
    > >> > > had in the text box and the Price ID will be autocreated when you
    > >> insert.
    > >> > >
    > >> > > Batta .. bing.
    > >> > >
    > >> > >
    > >> > > --
    > >> > > Nancy Gill
    > >> > > Team Macromedia Volunteer for Dreamweaver MX/UltraDev
    > >> > > [url]http://www.macromedia.com/go/team/[/url]
    > >> > > Co-Author: Dreamweaver MX: Instant Troubleshooter (August, 2003)
    > >> > > Technical Editor: DMX 2004: The Complete Reference, DMX 2004: A
    > >> > > Beginner's
    > >> > > Guide, Mastering Macromedia Contribute
    > >> > > Technical Reviewer: Dynamic Dreamweaver MX/DMX: Advanced PHP Web
    > >> > > Development
    > >> > >
    > >> > >
    > >> > >
    > >> > >
    > >> >
    > >> >
    > >> >
    > >>
    > >>
    > >
    > >
    > >
    >
    >
    >

    Paul Whitham TMM Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139