insert into muliple tables at once ( 6 Views )

no kitty!
  1. I want to inserts and initial record into muliple tables in one MySQL statement. I am tying these tables together with a common ID.

    I've never done it this way before, so I need help in building such a combined statement. Ideas?

    Thanks in advance for your help.

    (mehmet, Czech Republic)

  2. It isn't possible to insert into multiple tables simultaneously with any current versions of MySQL.

    (mutlu, Niue)

  3. Hi.

    I think only MySQL4 supports INSERTs into multiple tables.
    I guess that you probably want to get the last inserted id (probably by an AUTO_INCREMENTing field)? You can either use PHPs mysql_insert_id() or directly using MySQL's last_insert_id() function. Both return the id of the most recently inserted record.

    (pelin, Ukraine)



Related Topics ... (or search in 1.720.883 topics !)

muliple select - insert (25)
how do you insert into two tables from one insert? or even how would you using two i (40)
insert into two tables (3)
insert into 2 tables (6)
insert into two tables (6)
insert into 2 tables? (8)
insert into multiple tables - help! (6)
how to insert data into 2 tables at once (7)
trying to insert into 2 tables at same time? (3)




copyright © 2007-2031 Pfodere.COM ( 6 Pfoyihuee Online )

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 
1.0385