summaryrefslogtreecommitdiff
path: root/build_db.plx
diff options
context:
space:
mode:
authorlshprung <lshprung@yahoo.com>2021-09-14 14:10:21 -0700
committerlshprung <lshprung@yahoo.com>2021-09-14 14:10:21 -0700
commitf3b787f6970f5a739b91a3de1f425179aae7fddb (patch)
tree2c6ee4fafdd6fbf01590a756376c1c49cee93d47 /build_db.plx
parentd654b5c03c576bf8962960df9febf3ad37e29ea2 (diff)
Functional for --sql flag
Diffstat (limited to 'build_db.plx')
-rwxr-xr-xbuild_db.plx4
1 files changed, 2 insertions, 2 deletions
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;