fix header extraction from query
authorDobrica Pavlinusic <dpavlin@rot13.org>
Tue, 28 Dec 2010 16:52:22 +0000 (17:52 +0100)
committerDobrica Pavlinusic <dpavlin@rot13.org>
Tue, 28 Dec 2010 16:52:22 +0000 (17:52 +0100)
lib/MojoFacets/Import/SQL.pm

index 540328a..16c578f 100644 (file)
@@ -45,7 +45,7 @@ sub data {
        warn "# got ", $sth->rows, " rows\n";
 
        my $data = { items => [] };
-       $data->{header} = [ $sth->{NAME} ];
+       $data->{header} = $sth->{NAME};
 
        while( my $row = $sth->fetchrow_hashref ) {
                push @{ $data->{items} }, $row;