aa
This commit is contained in:
@@ -205,28 +205,29 @@ sub setCompanyDBTables() {
|
|||||||
$sth_tb->execute()
|
$sth_tb->execute()
|
||||||
or die getTimeStamp("log") . " - pid $$ >> $DBI::errstr";
|
or die getTimeStamp("log") . " - pid $$ >> $DBI::errstr";
|
||||||
|
|
||||||
my $tables_list = $sth_tb->fetchall_arrayref( {} );
|
my $tables_list = $sth_tb->fetchall_arrayref;
|
||||||
|
|
||||||
foreach my $table ( @{$tables_list} ) {
|
foreach my $table ( @{$tables_list} ) {
|
||||||
my $sth_deft =
|
my $sth_deft =
|
||||||
$dbh->prepare( "CREATE TSBLE IF NOT EXISTS "
|
$dbh->prepare( "CREATE TABLE IF NOT EXISTS "
|
||||||
. $company_db_name . "."
|
. $company_db_name . "."
|
||||||
. $table
|
. $table->[0]
|
||||||
. " LIKE "
|
. " LIKE "
|
||||||
. $db_adm . "."
|
. $db_adm . "."
|
||||||
. $table
|
. $table->[0]
|
||||||
. ";" )
|
. ";" )
|
||||||
or die getTimeStamp("log") . " - pid $$ >> $DBI::errstr";
|
or die getTimeStamp("log") . " - pid $$ >> $DBI::errstr";
|
||||||
$sth_deft->execute()
|
$sth_deft->execute()
|
||||||
or die getTimeStamp("log") . " - pid $$ >> $DBI::errstr";
|
or die getTimeStamp("log") . " - pid $$ >> $DBI::errstr";
|
||||||
$sth_deft->finish;
|
$sth_deft->finish;
|
||||||
if ( $table ne 'ELABDATADISP' and $table ne 'RAWDATACOR' ) {
|
if ( $table->[0] ne 'ELABDATADISP' and $table->[0] ne 'RAWDATACOR' ) {
|
||||||
my $sth_cpyt =
|
my $sth_cpyt =
|
||||||
$dbh->prepare( "INSERT "
|
$dbh->prepare( "INSERT "
|
||||||
. $company_db_name . "."
|
. $company_db_name . "."
|
||||||
. $table
|
. $table->[0]
|
||||||
. " SELECT * FROM "
|
. " SELECT * FROM "
|
||||||
. $db_adm . "."
|
. $db_adm . "."
|
||||||
. $table
|
. $table->[0]
|
||||||
. ";" )
|
. ";" )
|
||||||
or die getTimeStamp("log") . " - pid $$ >> $DBI::errstr";
|
or die getTimeStamp("log") . " - pid $$ >> $DBI::errstr";
|
||||||
$sth_cpyt->execute()
|
$sth_cpyt->execute()
|
||||||
|
|||||||
Reference in New Issue
Block a user