From f3b787f6970f5a739b91a3de1f425179aae7fddb Mon Sep 17 00:00:00 2001 From: lshprung Date: Tue, 14 Sep 2021 14:10:21 -0700 Subject: Functional for --sql flag --- build_db.plx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'build_db.plx') diff --git a/build_db.plx b/build_db.plx index 141da03..7bb6072 100755 --- a/build_db.plx +++ b/build_db.plx @@ -219,7 +219,7 @@ if (!$options{append}){ else { for my $i (sort(keys %columns)){ $statement = "SELECT COUNT(*) AS CNTREC FROM pragma_table_info('$table_name') WHERE name='$i';"; - @db_output = array_handler(db_cmd($dbh, $statement)); + @db_output = flatten_array(db_cmd($dbh, $statement)); if (!$db_output[0]){ $statement = "ALTER TABLE $table_name ADD COLUMN \"$i\";"; db_cmd($dbh, $statement); @@ -251,7 +251,7 @@ for my $file (@file_list){ # If tag is an array, encode the array into semicolon-separated string if (ref($data{$i}) eq 'ARRAY'){ - for my $j (array_handler($data{$i})){ + for my $j (flatten_array($data{$i})){ $statement = $statement . "$j;"; } $statement =~ s/[;]+$//g; -- cgit