1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
#!/usr/bin/perl use strict; use warnings; my %hash = ( foo => { bar => "SELECT * FROM mytable ", }, ); $hash{foo}{bar} .= "WHERE user=? "; $hash{foo}{bar} .= "AND email=? "; use Data::Dumper; print Dumper \%hash; __END__ $VAR1 = { 'foo' => { 'bar' => 'SELECT * FROM mytable WHERE user=? AND email=? ' } };
Guest whoopHi, Hab ein leichtes anfänger problem und zwar:
Ich habe einen hash
SELECT COUNT(article) as cnt, farbe FROM mytable GROUP BY farbe;
my $ref = $dbh->selectall_hashref('farbe');