in reply to Can't Insert Data To Multiple Table With DBI::Mysql [SOLVED]
Just to make sure I understand... The code you posted shows three insert statements, one for each table, and these all work okay, as expected, right?
You said: "when I used this methods to insert data into multiple or more tables, the data just insert into the 1st table and no activity in the 2nd and 3rd table" but you did not show any code that tried to do that, so you have not shown the code that fails to do you want. Do I have that right?
If so, then the problem is that in MySQL (and, I think, in any database that supports "Structured Query Language"), the "INSERT" statement only works on one table at a time. You cannot do anything like "INSERT into table1, table2, table3 ( table1.col_x, table2.col_y, table3_col_z ) values (?,?,?)".
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: Can't Insert Data To Multiple Table With DBI::Mysql
by chacham (Prior) on Jun 27, 2016 at 12:49 UTC | |
by pakeidoprek (Novice) on Jul 16, 2016 at 14:40 UTC | |
Re^2: Can't Insert Data To Multiple Table With DBI::Mysql
by pakeidoprek (Novice) on Jul 16, 2016 at 14:35 UTC |
In Section
Seekers of Perl Wisdom