Possible Duplicate:
Mysql insert into 2 tables
is it possible to make this?
e.g. INSERT INTO tableA,tableB VALUES (sharedVal, valA) (sharedVal, valB)
Possible Duplicate:
Mysql insert into 2 tables
is it possible to make this?
e.g. INSERT INTO tableA,tableB VALUES (sharedVal, valA) (sharedVal, valB)
this is not posible
you can do something like :
begin transaction
Insert into table1(col1, col2, col3 ) values v1, v2, v3;
Insert into table2(col1, col2, col3 ) values v1, v2, v3 ;
commit
You can simply
$sql1 = "INSERT INTO tableA (shareda, vala) VALUES (sharedVal, valA)";
$sql2 = "INSERT INTO tableB (sharedb, valb) VALUES (sharedVal, valB)";
Each time you should specify the table column, where you're putting your values.