I have a the following code snippet :
could some tell me what kind of datastucture is $db_data{$table }[$n]{$column} ?
and some insight of what does the developer intend to do ?
Code:
foreach my $table (keys %config::db_columns)
{
my $select_stmt = 'select ' . lc(join(',', @{$config::db_columns{$table}}));
$select_stmt .= " from $table";
if ($table eq 'employeeview') { $select_stmt .= ' where present=1'; }
my %db_data = undef;
$sth = $dbh->prepare("$select_stmt");
if ($sth->execute)
{
my $n = 0;
while (my $hashref = $sth->fetchrow_hashref)
{
foreach my $column (@{$config::db_columns{$table}})
{
$db_data{$table}[$n]{$column} = $$hashref{$column};
}
$n++;
}
}
}
print "Database upload completed.\n";
and some insight of what does the developer intend to do ?
Comment