in reply to perl to write to more than one table in a database at the same time (or call anotherscript to do one)
If you really want to insert a row into two tables "at once", you will (at least with MySQL) need a transaction. See DBI for how to start/commit a transaction.
As an aside, you should really use DBI placeholders (see DBI, again), instead of interpolating Perl variables into your SQL statements. That way, you avoid needing to take special care of users like "O'Hara" and Bobby Tables.
|
|---|