Hi,
just wondering how to achieve this. Want to query (PostgresSQL DB)
successively 3 different SQL.
1. delete from main_table
2. insert into main_table
3. update log_table
Can it be done successively w/o calling dbh->connect each time? how do I
put the prepare and the bind_param and the execute?
currently, only with #3, (Update)
$dbh_pg = DBI->connect
(
"DBI:Pg:host=$pg_server_name;
port=$pg_server_port,
database=$pg_default_db",
$pg_user, $pg_passwd,
{RaiseError => 0, PrintError => 0}
);
$sth_pg = $dbh_pg->prepare("update sync_log set last_sync=?,
record_update_date_time=current_timestamp where table_name=?");
$sth_pg->bind_param(1,$to_datetime);
$sth_pg->bind_param(2,$table_name);
$sth_pg->execute();