in reply to Insering into 2 tables?
Kanji's diagnosis is correct, but his solution doesn't keep your executed statement handles around to be read. How about this?
You'll probably want to execute both these on a common set of data, which I'll just call @data without worrying how it got there - my @results = map {$_->execute(@data)} @sths;my @SQLs = map { "INSERT INTO $_ (address_1, address_2, county, city, zip, description, status, bedroom) VALUES (?, ?, ?, ?, ?, ?, ?, ?)" } qw( property property2 ); my @sths = map {$dbh->prepare($_)} @SQLs;
After Compline,
Zaxo
|
|---|