HTML-Puzzle
view release on metacpan - search on metacpan
view release on metacpan or search on metacpan
Puzzle/DBTable.pm view on Meta::CPAN
# array dei valori
my @values = values(%values);
# costruisco la stringa ?,?,?...
my $jolly = join(',',map('?',@values));
my $sql = qq/Insert into $self->{name} ($keys) values ($jolly)/;
debug($sql);
$self->{dbh}->do($sql,undef,@values) or
die "Unable to execute $sql with params " . join(';',@values);
}
sub update {
my $self = shift;
my $fields = shift;
my $filter = shift;
# create sql string
my $sql = qq/Update $self->{name} set /;
# built section field1 = ? for update
my $set = join(',',map("$_ = ? ",keys(%{$fields})));
# built where section
my $where = join(',',map("$_ = ? ",keys(%{$filter})));
# complete sql is...
view all matches for this distributionview release on metacpan - search on metacpan
( run in 1.362 second using v1.00-cache-2.02-grep-82fe00e-cpan-4673cadbf75 )