in reply to Re: Inserting Multiple Records in DB.
in thread Inserting Multiple Records in DB.

OK, to each foreach loop doing one line at a time with
$dbh->do("INSERT INTO test (overlay,billa,billb) VALUES ('$overlay','$billa','$billb')");
is duplicating the records in the database, because of the nesting on the foreach loops.

Replies are listed 'Best First'.
Re^3: Inserting Multiple Records in DB.
by doom (Deacon) on Feb 29, 2008 at 22:36 UTC
    Well, you could set-up the database with appropriate uniqueness constraints to prevent you from accidentally inserting duplicate rows...