SitePoint Sponsor

User Tag List

Results 1 to 3 of 3

Hybrid View

  1. #1
    SitePoint Member
    Join Date
    Nov 2001
    Posts
    23
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    MYSQL ... SELECT... INSERT Statements

    Hi
    Can any one tell me whether one can INSERT statement to insert data into more than one table.... also in a form SELECT 5 tables to use for 5 dropdown lists and insert this data into a normalization table ?? have not been able to find any references to this anywhere ... how difficult is it to create 5 dropdown lists on one input FORM can you point me in any direction please or better advise ??

  2. #2
    What? Maelstrom's Avatar
    Join Date
    Oct 2001
    Location
    Whistler BC originally from Guelph Ontario
    Posts
    2,175
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I don't think mysql supports multiple table insertion. It is one of those advanced features.

    I will ask an advisor to move this to the proper forum where you may get some more detailed answers
    Maelstrom Personal - Apparition Visions
    Development - PhP || Mysql || Zend || Devshed
    Unix - FreeBSD || FreeBsdForums || Man Pages
    They made me a sitepoint Mentor - Feel free to PM me or Email me and I will see if I can help.

  3. #3
    SitePoint Evangelist CyberFuture's Avatar
    Join Date
    May 2001
    Location
    San Diego, CA
    Posts
    434
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I'm pretty sure that you can't INSERT into multiple tables with one query. Just do multiple INSERT queries. If you need to get the ID of the previous insert just use mysql_insert_id().

    As for your second question, it works the same for one pull-down menu as it does for 5. Just remeber to keep all the varibles different. I think Chapter 6 of Kevin Yank's book shows an example of this.


Bookmarks

Posting Permissions

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